How to use MessageResources effectively?

2004-03-18 Thread Timo Tjäder
Hello,

I have a Bean that my form uses directly to display a 
HTML control . This requires localizied
access to the message bundle. Currenty I do not have
user session available in this Bean and i get the
handle to the message resources as follows.

this.resources =
MessageResources.getMessageResources("ApplicationMessageResources");

Everything works just fine, but what makes me worry is that
the debug log seems to download the whole bundle. Is there a more 
clever  way to solve this problem (just switch to another
language bundle), without reading the MessageResource again.

Any good ideas or solutions are wery welcome. However, it seems
that only this way the user language was really changed.

Thanks,

Timo


public Collection getBeanDiscTypeCollection() {
String myL = getMyLocale().getLanguage();
String myC = getMyLocale().getCountry();
Locale l = new Locale(myL,myC);
if (beanDiscTypeCollection == null) {
   if (this.resources == null) {
  this.resources =
  MessageResources.getMessageResources("ApplicationMessageResources");
}
...
Vector entries = new Vector(maxDiscTypes + 1);
for (int i = 0; i <= maxDiscTypes; i++) {
... 
codeLabel =
resources.getMessage(l,"option.media.disctype." + i);
entries.add(new LabelValueBean(codeLabel, "" + i));
}
beanDiscTypeCollection = entries;
}
 return (beanDiscTypeCollection);
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using optionsCollection - LabelValueBean

2004-03-14 Thread Timo Tjäder
Hi,

Thanks Hubert, the problem was on the html page.

1. I forgot to add second form tag to handle page linking system on footer.
2. Also as you mentioned all the parameters must be match with the form beans I am 
posting. 

After making those changes the combox box was redered nicely on same lone
with navigation numbers.

1 2 3 4 5 next COMBOBOX v

I have one rule when writing jsp pages and it is "no scriplets anymore".
The Struts handles everything nicely if some time is offered in designing 
the beans and linking system.

In this case mine is

WEB->FORM->ACTION->SERVICE->BEAN
WEB<-FORM<-ACTION<-SERVICE<-BEAN

Service sets the values and they are read from the page using
struts tags (equal/iterate/present). The totalNumOfPagesCollection 
comes actually from BEAN.

Thanks,

Timo


>
>The  needs to be provided with the property it's associated to,
>the one on your form bean that will hold the actual value selected.
>
>property="goTo" size="1">
>name="PageDetailView"
>property="totalNumOfPagesCollection"
>/>
>
>
>"mySelectValue" should be a property on your form bean.
>
>hth,
>
>Hubert
>
>
>
>--- Timo_Tjäder <[EMAIL PROTECTED]> wrote:
>> Hi,
>> 
>> I have problems with optionsCollection, when used with 
>> custom tag.
>> 
>> 1. I set up in a bean LabelValueBean object in a Vector
>> 2. pass it back to form and try to create a 
>> 
>> This part should display a combo box with options, but
>> it just does not work. It does not display anything.
>> 
>> Html code is as follows:
>> 
>> 
>> > property="totalNumOfPagesCollection"/>
>> 
>> 
>> I have checked using struts "bean:write" the contents of 
>> the object. Bean write claims that totalNumOfPages really 
>> contains LabelValueBean-objects (14 peaces).
>> LabelValueBeanÄ1, 1Å, LabelValueBeanÄ2, 2Å, LabelValueBeanÄ3, 3Å, 
>> ...
>> 
>> So, does anyone know how to reference to this object correctly.
>> Current solution does not diaplay anything to the screen.
>> 
>> Thanks,
>> 
>> Timo
>> 
>> So what I'd like to do is display a selection list of
>> all availabele pages from which user choose one and press
>> a goTo page button. This is quite common web control in
>> any web pages.
>> 
>> 
>> 
>> > value="add-total-num-of-pages-collection">
>> > property="LabelValueBean"/>  
>> 
>> 
>> > property="totalNumOfPagesCollection"/>
>> 
>>
>>  
>> 
>> 
>> Ä1Å  2 3 4 5 next +  Result 14 pages. 
>> 
>> ÄLabelValueBeanÄ1, 1Å, LabelValueBeanÄ2, 2Å, LabelValueBeanÄ3, 3Å, 
>> LabelValueBeanÄ4, 4Å, LabelValueBeanÄ5, 5Å, LabelValueBeanÄ6, 6Å, 
>> LabelValueBeanÄ7, 7Å, LabelValueBeanÄ8, 8Å, LabelValueBeanÄ9, 9Å, 
>> LabelValueBeanÄ10, 10Å, LabelValueBeanÄ11, 11Å, LabelValueBeanÄ12, 
>> 12Å, LabelValueBeanÄ13, 13Å, LabelValueBeanÄ14, 14ÅÅ
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>
>
>__
>Do you Yahoo!?
>Yahoo! Mail - More reliable, more storage, less spam
>http://mail.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using optionsCollection - LabelValueBean

2004-03-14 Thread Timo Tjäder
Hi,

I have problems with optionsCollection, when used with 
custom tag.

1. I set up in a bean LabelValueBean object in a Vector
2. pass it back to form and try to create a 

This part should display a combo box with options, but
it just does not work. It does not display anything.

Html code is as follows:





I have checked using struts "bean:write" the contents of 
the object. Bean write claims that totalNumOfPages really 
contains LabelValueBean-objects (14 peaces).
LabelValueBean[1, 1], LabelValueBean[2, 2], LabelValueBean[3, 3], 
...

So, does anyone know how to reference to this object correctly.
Current solution does not diaplay anything to the screen.

Thanks,

Timo

So what I'd like to do is display a selection list of
all availabele pages from which user choose one and press
a goTo page button. This is quite common web control in
any web pages.




  




  



[1]  2 3 4 5 next »  Result 14 pages. 

ÄLabelValueBeanÄ1, 1Å, LabelValueBeanÄ2, 2Å, LabelValueBeanÄ3, 3Å, 
LabelValueBeanÄ4, 4Å, LabelValueBeanÄ5, 5Å, LabelValueBeanÄ6, 6Å, 
LabelValueBeanÄ7, 7Å, LabelValueBeanÄ8, 8Å, LabelValueBeanÄ9, 9Å, 
LabelValueBeanÄ10, 10Å, LabelValueBeanÄ11, 11Å, LabelValueBeanÄ12, 
12Å, LabelValueBeanÄ13, 13Å, LabelValueBeanÄ14, 14ÅÅ


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple Action invokations in a single JSP / request via *include*?

2004-01-31 Thread Timo --Blazko-- Boewing
Hello all,

For long time now i am trying to make several invokations of
Struts Actions whose outputs are to be rendered into one single
JSP using JSTL's c:import or jsp:import.
However, when the first Action called reaches a larger response length
(bytes); the request gets cut; thus the page is not fully loaded.

I think it has to do that a Action is intended to do a flush after
the ActionForward has been returned to the master Struts servlet (i
could not measure it, but i would not wonder if the request gets cut at
exactly 8192 bytes). I think even for my problem there is a bugzilla
entry, but i cannot find it again.

But i wonder if one JSP called by an Action cannot call a subsequent
Action of Struts as an imported page fragment.

FYI i am using up to date JSTL, struts and Tomcat 5.0.18; same results
w/ J2 SDKs 1.4.1_02 and 1.5 beta.
I think i know that Tiles is intended for similar things, but porting to
it is not an option in my current project.
Is there any chance of doing that; meaning having several Actions making
up one single request?

Any help is very appreciated!

Thanks you!

-- 
greetings,   |  /"\ 
 |  \ /  ASCII-Ribbon-Campaign
Timo |   X Against HTML Mail
 |  / \ 
--
PUBLIC KEY:
52F3311A Timo Boewing  <[EMAIL PROTECTED]> 2003/10/30
Fingerprint = F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A


signature.asc
Description: This is a digitally signed message part


Re: Very Troubled in Finding Ways to Pass a Variable to a Class

2003-12-06 Thread Timo
Caroline,
The best way I use it to pass parameters to the action class is via a hidden
attribute in the form, in your case the "articleForm"
you can define the hidden attribute using


Good luck.

- Original Message - 
From: "Caroline Jen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 05, 2003 8:17 PM
Subject: Very Troubled in Finding Ways to Pass a Variable to a Class


> I have a class FindEditorData.java.  I want to pass a
> vairable 'username' to this class for some processing.
>  This class is invoked from a JSP:
>
> 
> View Articles
>
> and the value of the 'username' is obtained this way:
>
> String username = request.getRemoteUser();
>
> Due to my limited knowledge in Struts,  I cannot
> figure out what to do.  Let me explain the problem:
>
> 1. This class has this method:
>
>public Object execute() throws Exception { ... }
>
>I do not make this class extends HttpServlet or
> extends Action.  I cannot nest a method inside a
> doGet/doPost or the Action's excute().
>
> 2. The action mapping in the struts-config.xml is this
> way:
>  roles="editor"
> path="/find/Category"
>
> type="org.apache.struts.scaffold.ProcessAction"
> parameter="org.XYZ.article.FindEditorData"
> name="articleForm"
> validate="false">
> name="success"
> path=".article.Result"/>
> 
>
> I am stuck because I do not know how to pass
> 'username' to the FindEditorData.java.  I cannot
> state:
>
>String username = request.getRemoteUser();
>or
>String username = (String)session.getAttribute(
> "EditorName" );
>
>because the FindEditorData is not a servlet and
> does not extend Action.
>
> I cannot pass a hidden variable from the JSP because I
> do not know how to retrieve the value of a hidden
> variable in a Java class.
>
> Need clever ideas.  Please help.
>
>
>
>
> __
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about Tiles Defs...

2003-11-28 Thread Timo
Because Internatilization is a big concern, I am using the struts localization 
technique to resolve labels, texts etc.
But now, I am using the tiles-defs.xml to display the pages.
one problem is to replace the title property, I know if I am using a regular jsp I can 
use the 
 and then use

   


The question is, if I am using definition xml, what would be the equivalent? 

Re: Tiles Help! Help with Tiles...

2003-11-28 Thread Timo
Ricky,
Thanks Alot I re-read your email over and over (before I get some sleep)
and did not understand it.
Just re-read it again today, and got my mistake fixed. thanks a lot.
- Original Message - 
From: "Ricky" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 28, 2003 9:00 AM
Subject: Re: Tiles Help! Help with Tiles...


> you don't need to put the value again..after you define your definiton in
> tile-config.xml,.change your code below :
>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ include  file="/Layout/stdDefinition.jspf"%>
> 
>  key='title.statusreport' /> 
> 
> 
> 
> 
>
> to a simple code just like this:
>
> 
>
> within the page you will be display the tiles.(not the layout page)
>
>
>
> - Original Message -
> From: "Timo" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Saturday, November 29, 2003 12:48 AM
> Subject: Tiles Help! Help with Tiles...
>
>
> Hi all,
> I tried to use tiles-defs.xml to define a tile, but got the following
error:
>
> 500 Internal Server Error
> javax.servlet.jsp.JspException: Error - Tag Insert : No value defined for
> bean 'stdLayoutDef' with property 'null' in scope 'null'.
> here is my tiles-defs.xml
> 
> Tiles Configurations 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
> 
> 
>
>
>
>   
>
>
> 
>
> and here where I used the definition:
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ include  file="/Layout/stdDefinition.jspf"%>
> 
>  key='title.statusreport' /> 
> 
> 
> 
> 
> Here where I loaded the definition in struts-config.xml...   className="org.apache.struts.tiles.TilesPlugin"> property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
> 
>   ...so,
> what did I do wrong?!!! please help..thanks in advance.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles Help! Help with Tiles...

2003-11-28 Thread Timo
Thanks Ricky,
as a matter of fact, if you mean the extra include for /stdDefinition.jspf
it containts a totally different definition. even if I remove it, I still
get the same results.

any idea?
- Original Message - 
From: "Ricky" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 28, 2003 9:00 AM
Subject: Re: Tiles Help! Help with Tiles...


> you don't need to put the value again..after you define your definiton in
> tile-config.xml,.change your code below :
>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ include  file="/Layout/stdDefinition.jspf"%>
> 
>  key='title.statusreport' /> 
> 
> 
> 
> 
>
> to a simple code just like this:
>
> 
>
> within the page you will be display the tiles.(not the layout page)
>
>
>
> - Original Message -
> From: "Timo" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Saturday, November 29, 2003 12:48 AM
> Subject: Tiles Help! Help with Tiles...
>
>
> Hi all,
> I tried to use tiles-defs.xml to define a tile, but got the following
error:
>
> 500 Internal Server Error
> javax.servlet.jsp.JspException: Error - Tag Insert : No value defined for
> bean 'stdLayoutDef' with property 'null' in scope 'null'.
> here is my tiles-defs.xml
> 
> Tiles Configurations 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
> 
> 
>
>
>
>   
>
>
> 
>
> and here where I used the definition:
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ include  file="/Layout/stdDefinition.jspf"%>
> 
>  key='title.statusreport' /> 
> 
> 
> 
> 
> Here where I loaded the definition in struts-config.xml...   className="org.apache.struts.tiles.TilesPlugin"> property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
> 
>   ...so,
> what did I do wrong?!!! please help..thanks in advance.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tiles Help! Help with Tiles...

2003-11-28 Thread Timo
Hi all,
I tried to use tiles-defs.xml to define a tile, but got the following error:
 
500 Internal Server Error
javax.servlet.jsp.JspException: Error - Tag Insert : No value defined for bean 
'stdLayoutDef' with property 'null' in scope 'null'.
here is my tiles-defs.xml   http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
and here 
where I used the definition:<%@ taglib uri="/WEB-INF/struts-tiles.tld" 
prefix="tiles"%><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%><%@ include  
file="/Layout/stdDefinition.jspf"%>   Here where I loaded the definition in 
struts-config.xml...  

  ...so, what did I do wrong?!!! 
please help..thanks in advance.

Using Tiles!! Loading Tile definition and use it as a bean!!!

2003-11-26 Thread Timo
Hi all,
I am trying to standardize the look and feel to my web app, first idea was to use 
filters that modifies the contents of all web pages and format it to the desired 
layout.
of course, there were Tiles to do that, so why re-invent the wheel?
I went through a little problem, when tried to register the tile definition and use it 
as a bean to load up during application startup.. as per Ted Husted tutorials (thanks 
a lot Ted :)) here is my situation :
-Struts 1.1
-Jdeveloper 10g

tiles-defs.xml:
 
  http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>










struts-config.xml:
...
  



  
...

Jsp file: stdStatusReport.jsp
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ include  file="/Layout/stdDefinition.jspf"%>



   






The Log report with the error:
500 Internal Server Error
javax.servlet.jsp.JspException: Error - Tag Insert : No value defined for bean 
'stdLayoutDef' with property 'null' in scope 'null'.
at org.apache.struts.taglib.tiles.InsertTag.processBean(InsertTag.java:667)
at 
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:491)
at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:451)
at _res._error._resStatusReport._jspService(resStatusReport.jsp:5)
[/res/error/resStatusReport.jsp]
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:348)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:356)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:614)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:356)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:614)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:784)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:536)


Re: Validate values in collection?

2003-09-26 Thread Timo Neumann
Natalie D Rassmann wrote:

Hi Natalie and everybody,

do you know if I can do a requiredif check against a second property in 
the same bean?

something like:



	
	
		field[0]
		funds.valueNeeded
	
	
		fieldTest[0]
		EQUAL
	
	
		fieldValue[0]
		true
	



Timo

It depends on if it is indexed or not.

Here is an example that I have...

 
  
   
I am using a multi-page for that is why I have the page attribute.

The prepTime property is a String[].

Here is an example of a property that is part of the defectsList collection.
defectsList is an ArrayList.  I wrote the isFieldEmpty validation.
   
  
   
Does this help?

Natalie

Timo Neumann wrote:


Natalie D Rassmann wrote:

So this works if "forms" is a collection of beans with a property "value"?


   
   
   

Like you would any other type of form.  Do you know how to set up the
validator framework?  If not try this link below:
http://jakarta.apache.org/struts/userGuide/dev_validator.html

Timo Neumann wrote:



Natalie D Rassmann wrote:



yes
how?



Timo Neumann wrote:




Hi all,

is it possible to use the validator framework to check values of beans
that are stored in a collection in a DynaValidatorForm?
TIA,

Timo
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to remove DynaForm from session the struts way?

2003-09-25 Thread Timo Neumann
Chen, Gin wrote:

I use session.removeAttribute
That's what I do now. To be exact I user
session.removeAttribute(dvForm.getDynaClass().getName());
That makes it more robust than hard coding the DynaForm's name.

Timo

-Tim

-Original Message-----
From: Timo Neumann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 25, 2003 4:07 AM
To: Struts Users Mailing List
Subject: How to remove DynaForm from session the struts way?

Hi guys!

How would I remove a DynaValidatorForm from the session after I do not 
need it anymore? Is there a struts specific way or should I simply use 
session.removeAttribute(...)? Or would you recommend simply calling 
form.initialize()?


--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote:

Hi Natalie,

now I got it. Thanks a lot.

Timo

It depends on if it is indexed or not.

Here is an example that I have...

 
  
   
I am using a multi-page for that is why I have the page attribute.

The prepTime property is a String[].

Here is an example of a property that is part of the defectsList collection.
defectsList is an ArrayList.  I wrote the isFieldEmpty validation.
   
  
   
Does this help?

Natalie

Timo Neumann wrote:


Natalie D Rassmann wrote:

So this works if "forms" is a collection of beans with a property "value"?


   
   
   

Like you would any other type of form.  Do you know how to set up the
validator framework?  If not try this link below:
http://jakarta.apache.org/struts/userGuide/dev_validator.html

Timo Neumann wrote:



Natalie D Rassmann wrote:



yes
how?



Timo Neumann wrote:




Hi all,

is it possible to use the validator framework to check values of beans
that are stored in a collection in a DynaValidatorForm?


--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote:

So this works if "forms" is a collection of beans with a property "value"?







Like you would any other type of form.  Do you know how to set up the
validator framework?  If not try this link below:
http://jakarta.apache.org/struts/userGuide/dev_validator.html

Timo Neumann wrote:


Natalie D Rassmann wrote:


yes
how?


Timo Neumann wrote:



Hi all,

is it possible to use the validator framework to check values of beans
that are stored in a collection in a DynaValidatorForm?
TIA,

Timo
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote:

yes
how?

Timo Neumann wrote:


Hi all,

is it possible to use the validator framework to check values of beans
that are stored in a collection in a DynaValidatorForm?
TIA,

Timo
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Validate values in collection?

2003-09-25 Thread Timo Neumann
Hi all,

is it possible to use the validator framework to check values of beans 
that are stored in a collection in a DynaValidatorForm?

TIA,

Timo
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How to remove DynaForm from session the struts way?

2003-09-25 Thread Timo Neumann
Hi guys!

How would I remove a DynaValidatorForm from the session after I do not 
need it anymore? Is there a struts specific way or should I simply use 
session.removeAttribute(...)? Or would you recommend simply calling 
form.initialize()?

Any help would be apreciated.

Timo
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Poll] action mappings

2003-09-25 Thread Timo Neumann
Mainguy, Mike wrote:

I started with #1 but then switched to #2.
As this is my first big struts project I might be wrong but I had the
impression that #2 would be preferrable because with #1 I would have to 
repeat the action mapping as a string in my action classes.
I saw that most of the respondents went with #1 so I wonder why they 
prefer it?

cheers,

Timo

What are folks currently doing for action mappings in relation to CRUD
operations?  
Are you:

#1  creating a unique Action mapping for each atomic operation 
(potentially mapped to the same action class)
	/createUser.do ->>  UserAction.java
	/readUser.do   ->>  UserAction.java
	/updateUser.do ->>  UserAction.java
	/deleteUser.do ->>  UserAction.java
	

#2  creating a unique Action mapping for each atmoic operation 
with each action having a unique class
	/createUser.do ->>  CreateUserAction.java
	/readUser.do   ->>  ReadUserAction.java
	/updateUser.do ->>  UpdateUserAction.java
	/deleteUser.do ->>  DeleteUserAction.java

#3  creating an aggregate action class with a unique action mapping with 
multiple operations and using form/request variable to accomplish CUD
	/editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
?OP=Delete)
	/displayUser.do->> UserAction.java

#4  creating an aggregate action class with a unique action mapping with 
multiple operations
	/editUser.do   ->> EditUserAction.java   
	/displayUser.do->> DisplayUserAction.java

Some other way (or a combination) ...
--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:messages

2003-09-12 Thread Timo Neumann
Stan Reinis wrote:

Simply use


This should do the trick.

Timo

My Action includes the following code:

   ActionMessages messages = new ActionMessages();
...
   messages.add(
   ActionMessages.GLOBAL_MESSAGE,
   new 
ActionMessage("adminUpdateProfileAction.profile.has.been.updated"));
...
   saveMessages(request, messages);
   forward = mapping.findForward("success");

My jsp has
   
   
   
   
   
And yet no messages are appearing in the response.  The source code shows
   
   

Perusing the javadocs, I find the following description for the 
saveMessages()
method:
"Save the specified messages keys into the appropriate request attribute 
for use by the
 tag (if messages="true" is set), if any messages are 
required."

My question is:   how do we set messages="true"?

Thanks,
Stan Reinis
RIGCI, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
F&F Computer AnwendungenTel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195 Mail: [EMAIL PROTECTED]
D-80686 Muenchenhttp://www.ff-muenchen.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts: JSP expression not evaluated

2003-03-26 Thread Timo Nentwig
Craig R. McClanahan wrote:
> Using a JSP expression to set an attribute value requires you to
> create 
> the *entire* value, not just part of it, with the expression.
> 
>   

Why?!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts: JSP expression not evaluated

2003-03-26 Thread Timo Nentwig
Jacob Hookom wrote:
> No, you will need to use single quotes for it to work properly.  You

Already tried this, same issue.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



struts: JSP expression not evaluated

2003-03-25 Thread Timo Nentwig
Hi!

I do have a very weird problem which I don't even know struts or jasper to
address to so I post it to both mailing lists.

Below is a small piece of JSP code, the struts  tag contains an
JSP expression in the href attribute which is not evaluated, i.e. the
actuall link contains the expression just as it is printed in the source
code below as string. Please note that pre-building a Java String
containing the complete href link and putting that string expression into
the tag's attribute does work just well.

This does only apply to struts'  tag;  works just as it
should!

<%@ page language="java" %>
<%@ page contentType="text/html;charset=WINDOWS-1252"%>

<%@ taglib uri='/WEB-INF/struts-html.tld' prefix='html' %>




Test


<%
int var = 1;
%>



Link




This works:


<%
int var = 1;
String href = "blah.do?arg=" + var;
%>



Can't I see the woods for the trees or is this a bug?

Timo
--
http://nitwit.de/
http://www.jeigh.com/werk/admin/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



struts: JSP expression not evaluated

2003-03-25 Thread Timo Nentwig
Hi!

I do have a very weird problem which I don't even know struts or jasper to
address to so I post it to both mailing lists.

Below is a small piece of JSP code, the struts  tag contains an
JSP expression in the href attribute which is not evaluated, i.e. the
actuall link contains the expression just as it is printed in the source
code below as *string*. Please note that pre-building a Java String
containing the complete href link and putting that string expression into
the tag's attribute does work just well.

This does only apply to struts'  tag;  works just as it
should!

<%@ page language="java" %>
<%@ page contentType="text/html;charset=WINDOWS-1252"%>

<%@ taglib uri='/WEB-INF/struts-html.tld' prefix='html' %>




Test


<%
int var = 1;
%>



Link




This works:


<%
int var = 1;
String href = "blah.do?arg=" + var;
%>



Can't I see the woods for the trees or is this a bug?

Timo
--
http://nitwit.de/
http://www.jeigh.com/werk/admin/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: How to organize your software in proper version control structure

2003-01-15 Thread Timo Riikonen
Hello,

Here ia a question that may not have only one correct answer, 
but I hope you will try to give me your answer still.

How to organize your software in proper version control structure?

Background:
- We are a small company <20 employees to whom this concerns, so expenses
are a concern.
- We do straight sales, not OEM sales. So our products are often more of
product frameworks.
  There is customization always to each customer.
- Our solutions are more of GUI solutions not server solutions.
- You can assume that we use Struts, maybe with tiling or XML.
- For now we are using MS Visual SourceSafe and JSP without EJB.

Component based model seems more attractive due to modular design, but we
have hard time to 
find solutions to problems that arise when components go to the GUI layer
also.
We would need several Web Archive (WAR) structures, one for each GUI
component. 
But using several WAR's might cause problems with application servers
(shared session etc) 
and would cause problems with GUI tailoring: same GUI lookout for all
components.

With simple model we could organize projects, products and common library so
that GUI 
customization would be more advanced, thanks to tiling. But then by default
it would be easier
to copy all standard library functionality to all products & projects so
there would
be unused code.

Here are two alternatives what we thought of:

Common to both solutions

(root)/
  products/
product1/

product2/

...

  projects/
customer1/
  project A/

  ...
DoneSolutions/  (testing & demo
applications)
  demo A/

  treetest

...

Component based model
-
(root)/
  components/
tree/   tree
component
  
doc/tree
documentation
cache/  cache
component
  
doc/tree
documentation
...

  templates/
empty-webapp/
  
empty-jarcomponent/
  
...

No Web archive in the standard library.


Simple model
-
(root)/
  stdlib/
   common to all
standard library features
install/
SQL scripts, server.xml additions
src/
com.done.tree   tree component
com.done.cache  cache component
doc/common to
all standard library features

No individual components or only very few components with the structure
above.

Thank you in advance for any comments or votes.

--
Timo Riikonen
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Problem using Servlet 2.3 DTD with Struts

2002-12-05 Thread Weber Timo
Hi,

there seems to be a problem with Xerces. Have a look at

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13282

hth,

Timo


> -Original Message-
> From: Mark Woon [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 04, 2002 3:15 PM
> To:   [EMAIL PROTECTED]
> Subject:  Problem using Servlet 2.3 DTD with Struts
> 
> Hi all.
> 
> I've been wanting to use filters lately and finally got around to trying 
> it out, but am having trouble with my web.xml file (which only has 
> Struts related entries) and Struts.  The first thing I did was update 
> the DOCTYPE in my web.xml to use web-app_2_3.dtd.  Now, I'm getting:
> 
> Parse Fatal Error at line 551 column 44: The string "--" is not 
> permitted within comments.
> org.xml.sax.SAXParseException: The string "--" is not permitted within 
> comments.
>  at 
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> 
> Source)
>  at 
> org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
>  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
> Source)
>  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
> Source)
>  at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown 
> Source)
>  at org.apache.xerces.impl.XMLScanner.scanComment(Unknown Source)
>  at org.apache.xerces.impl.XMLDTDScannerImpl.scanComment(Unknown 
> Source)
>  at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown 
> Source)
>  at 
> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown 
> Source)
>  at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unkno
> wn 
> Source)
>  at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> 
> Source)
>  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
> Source)
>  at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
>  at javax.xml.parsers.SAXParser.parse(SAXParser.java:89)
>  at org.apache.struts.digester.Digester.parse(Digester.java:755)
>  at 
> org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1434
> )
>  at 
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:474)
>  at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>  at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
> 934)
>  at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
>  at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.jav
> a:3420)
>  at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
>  at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>  at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>  at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>  at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>  at 
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
>  at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>  at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>  at
> org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:324)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> 
> 
> I've gone through web.xml (attached) and stripped out all comments, and 
> I'm still seeing this problem.  It's not even 551 lines long!  I've also 
> checked Tomcat's default web.xml, and it doesn't have any problems 
> either.  I'm using Tomcat 4.0.6 (and have tested this out on 4.1.16 as 
> well) on WinXP with JDK 1.4.1 and Struts 1.0.2.  Does anyone have any 
> ideas what my problem might be?
> 
> 
> Thanks,
> -Mark << File: web.xml >>  << File: ATT162076.txt >> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>