Re: struggling with indexed/repeating input fields
Kevin, I finally got logic:iterate ... html:text ... indexed=true/ ... /logic:iterate to work. The sample code came from http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html Thank you Dave. I built Dave's code on top of struts-example. All necessary code is attached. On the index.jsp page there are two links html:link page=/indexed.doIterate html:text indexed example/html:link html:link page=/ShowParameters.doFrom Dave Iterate html:text indexed example/html:link The first one, indexed.do, doesn't work. Gives IndexOutOfBoundException. The second, ShowParameters.do, works. :D I still trying to figure out the differences between those two... Good luck! Leo From: Kevin HaleBoyes [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 07:10:15 -0800 (PST) I've asked this question several times on this mailing list but I've never received an answer that would help. I've dug a bit deeper and understand more about the problem but I'm still really struggling with indexed/repeating input fields so I thought I'd ask again. I'm starting to wonder if it is possible. In my ActionForm I have an array property that is initialized to null (I don't know the values until the Action executes). I have a getter that returns the entire array and a setter that takes an array. I also have indexed getters and setters. The array is of another class (that simply has two strings in it with the default/empty constructor and getters and setters). In my (edit) action I construct an array and call the setter in the action form instance (that I just created). I then forward to a JSP page that has a logic:iterate tag and html:text tags all within a form tag. The form has a html:submit that calls my save action. The save action simply forwards to a confirmation JSP page that has a similar iteration to display the input values. The initial edit form gets displayed properly - the expected number of iterations are performed and the expected values of the input fields is shown. When I press the submit button things break. I know that isn't terribly descriptive but how it breaks depends on how I form the html:text tags - there are two cases that I've tried. In the first case, I use the following in the edit JSP form: logic:iterate id=li name=IndexedForm property=lineItem html:text name=li property=itemNo indexed=true/ html:text name=li property=desc indexed=true/ /logic:iterate As I said, it displays properly. I change the desc text and hit the submit button and end up getting an exception: ApplicationDispatcher[/cml] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: No collection found In the save action I printed the toString() of the input form before forwarding to the JSP page and can see that the array is in fact null. Why is it null? Who is responsible for instantiating an array for that field - struts or the application? If it is the application, how can it know how big to make the array? In the second case, I use the following in the edit JSP form: logic:iterate id=li name=IndexedForm property=lineItem indexId=i % String prop1 = lineItem[ + i + ].itemNo; % html:text property=%= prop1 % size=30/ % String prop2 = lineItem[ + i + ].desc; % html:text property=%= prop2 % size=30/ /logic:iterate Again, it displays properly. I change the desc text and hit the submit button and end up getting an exception: StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate ... Caused by: java.lang.NullPointerException at com.illuminat.cml.IndexedForm.getLineItem(IndexedForm.java:286) This happens even before it calls the save action. So, I'm at a loss as to how to handle indexed or repeating fields. I've looked at the code in html-setters.jsp and TestBean from the exercise-taglib in the distribution but that uses fixed size arrays and static initializers. It hasn't been simple to go from that to a variable number of array elements and non-static (from a database) initialization. I've also looked in the archives and on the current mailing list and found nothing. Actually, I've been seeing more questions regarding indexed properties lately (mostly using DynaBeans) but they are generally going un-answered or not coming up with solutions, just more questions. This is not a complaint as I know everyone is very busy but it does mean that I've not found anything in the archives. Help would be most appreciated. Sample code would be even nicer! Is it even possible with Struts (version 1.1b2)? I can furnish code or a better explaination if needed. Kevin __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- To
Re: struggling with indexed/repeating input fields
I GOT IT! I forgot to send the struts-config.xml and there were the difference VERY-IMPORTANT if I set the action scope=request I get: javax.servlet.ServletException: BeanUtils.populate ... Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 or Caused by: java.lang.NullPointerException make sure you don't have scope=request in your action ... /action /VERY-IMPORTANT === my struts-config.xml === form-beans ... form-bean name=IndexedForm type=test.IndexedForm / form-bean name=ParametersForm type=test.ParametersForm / /form-beans ... action path=/indexed type=test.IndexedAction name=IndexedForm validate=false forward name=success path=/indexed.jsp/ /action action path=/indexedResult type=test.IndexedResultAction name=IndexedForm validate=false forward name=success path=/indexedResult.jsp/ /action action path=/ShowParameters type=test.ShowParametersAction name=ParametersForm validate=false forward name=success path=/parameters.jsp / /action !-- Save parameters -- action path=/SaveParameters type=test.SaveParametersAction name=ParametersForm validate=false forward name=success path=/indextest.jsp / /action === Try it out. Cheers, Leo From: Leonardo Maciel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 15:33:04 + Kevin, I finally got logic:iterate ... html:text ... indexed=true/ ... /logic:iterate to work. The sample code came from http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html Thank you Dave. I built Dave's code on top of struts-example. All necessary code is attached. On the index.jsp page there are two links html:link page=/indexed.doIterate html:text indexed example/html:link html:link page=/ShowParameters.doFrom Dave Iterate html:text indexed example/html:link The first one, indexed.do, doesn't work. Gives IndexOutOfBoundException. The second, ShowParameters.do, works. :D I still trying to figure out the differences between those two... Good luck! Leo From: Kevin HaleBoyes [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 07:10:15 -0800 (PST) I've asked this question several times on this mailing list but I've never received an answer that would help. I've dug a bit deeper and understand more about the problem but I'm still really struggling with indexed/repeating input fields so I thought I'd ask again. I'm starting to wonder if it is possible. In my ActionForm I have an array property that is initialized to null (I don't know the values until the Action executes). I have a getter that returns the entire array and a setter that takes an array. I also have indexed getters and setters. The array is of another class (that simply has two strings in it with the default/empty constructor and getters and setters). In my (edit) action I construct an array and call the setter in the action form instance (that I just created). I then forward to a JSP page that has a logic:iterate tag and html:text tags all within a form tag. The form has a html:submit that calls my save action. The save action simply forwards to a confirmation JSP page that has a similar iteration to display the input values. The initial edit form gets displayed properly - the expected number of iterations are performed and the expected values of the input fields is shown. When I press the submit button things break. I know that isn't terribly descriptive but how it breaks depends on how I form the html:text tags - there are two cases that I've tried. In the first case, I use the following in the edit JSP form: logic:iterate id=li name=IndexedForm property=lineItem html:text name=li property=itemNo indexed=true/ html:text name=li property=desc indexed=true/ /logic:iterate As I said, it displays properly. I change the desc text and hit the submit button and end up getting an exception: ApplicationDispatcher[/cml] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: No collection found In the save action I printed the toString() of the input form before forwarding to the JSP page and can see that the array is in fact null. Why is it null? Who is responsible for instantiating an array for that field - struts or the application? If it is the application, how can it know how big to make the array? In the second case, I use the following in the edit JSP form: logic:iterate id=li name=IndexedForm property=lineItem indexId=i % String prop1 = lineItem[ + i + ].itemNo; % html:text property=%= prop1 % size=30/ % String prop2 = lineItem[ + i + ].desc; % html:text property=%= prop2 % size=30/ /logic:iterate Again, it displays properly. I change
RE: Re: struggling with indexed/repeating input fields
I wish I had another solution to the problem. I am using ArrayList and it is initialized on IndexedAction (see attached) = for ( int i=0; i10; i++ ) { NameValue nv = new NameValue( ,new Integer(i) ); al.add( nv ); } = The values show on the page. But when you submit the form, the ArrayList vanish. Where is the ArrayList size 10 initialize ? The exception happens on BeanUtils.populate before execute the submit action. If you can make the code attached work with scope=request I will be surprised Please take a look in the code before suggested what is already implemented. Thank you, Leo From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 17:52:52 +0100 HI, I think u are suggesting that every form has to be in session scope which is dangerous and will unnecessarily clog the session object. If u have problems when calling setters on u r form because the list on form is smaller, i will suggest following approach. public class MyForm { private List objectList = new ArrayList(); //use arrayList instead of array as it does not force u to declare size public Object getObject(index i){ while(index = this.getList().size() ){ this.getList().add(new Object()); } return this.getList().getObject(index); } } So in this case, when the setter is called,the form will be added with bean first nd then the setter will be called. Try this approach and let me know. Regards, Shirish -Original Message- From: leomaciel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 5:43 PM To: struts-user Cc: leomaciel Subject: Re: struggling with indexed/repeating input fields I GOT IT! I forgot to send the struts-config.xml and there were the difference VERY-IMPORTANT if I set the action scope=request I get: javax.servlet.ServletException: BeanUtils.populate ... Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 or Caused by: java.lang.NullPointerException make sure you don't have scope=request in your action ... /action /VERY-IMPORTANT === my struts-config.xml === form-beans ... form-bean name=IndexedForm type=test.IndexedForm / form-bean name=ParametersForm type=test.ParametersForm / /form-beans ... action path=/indexed type=test.IndexedAction name=IndexedForm validate=false forward name=success path=/indexed.jsp/ /action action path=/indexedResult type=test.IndexedResultAction name=IndexedForm validate=false forward name=success path=/indexedResult.jsp/ /action action path=/ShowParameters type=test.ShowParametersAction name=ParametersForm validate=false forward name=success path=/parameters.jsp / /action !-- Save parameters -- action path=/SaveParameters type=test.SaveParametersAction name=ParametersForm validate=false forward name=success path=/indextest.jsp / /action === Try it out. Cheers, Leo From: Leonardo Maciel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 15:33:04 + Kevin, I finally got logic:iterate ... html:text ... indexed=true/ ... /logic:iterate to work. The sample code came from http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html Thank you Dave. I built Dave's code on top of struts-example. All necessary code is attached. On the index.jsp page there are two links html:link page=/indexed.doIterate html:text indexed example/html:link html:link page=/ShowParameters.doFrom Dave Iterate html:text indexed example/html:link The first one, indexed.do, doesn't work. Gives IndexOutOfBoundException. The second, ShowParameters.do, works. :D I still trying to figure out the differences between those two... Good luck! Leo From: Kevin HaleBoyes [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 07:10:15 -0800 (PST) I've asked this question several times on this mailing list but I've never received an answer that would help. I've dug a bit deeper and understand more about the problem but I'm still really struggling with indexed/repeating input fields so I thought I'd ask again. I'm starting to wonder if it is possible. In my ActionForm I have an array property that is initialized to null (I don't know the values until the Action executes). I have a getter that returns the entire array and a setter that takes an array. I also have indexed getters and setters. The array is of another class (that simply has two strings in it with the default/empty constructor and getters and setters). In my (edit) action I construct an array and call the setter in the action form instance (that I just created). I then forward to a JSP
RE: iterate tag - can you set an increment?
%=idx.toString()% or %=idx.intValue()% From: Karr, David [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: iterate tag - can you set an increment? Date: Tue, 19 Nov 2002 09:34:17 -0800 Certainly. It's available as a scripting variable within the loop (and as a page-scoped attribute). -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED]] Is it possible to access the idx variable in a scriplet during iteration? -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED]] Is there any way to set an iteration increment on the iterate tag? For example, iterate through the array returning every 2nd item. If not, can anyone tell me how I might do this without resorting to scriplets (or only using them minimally)? Here's the code I'm trying to use. The first TD is the long_desc field of array[idx] in myBean. How can I increment idx so I can get the next item? (maybe I'm being slow since I haven't had my coffee yet) logic:iterate id=idx name=myBean property=array scope=session tr tdbean:write name=idx property=long_desc//td tdbean:write name=??? property=long_desc//td /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: iterate tag - can you set an increment?
Yes I do it to set the row bgcolor. logic:iterate id=result indexId=inx name=test.SEARCH_RESULT type=test.SearchResult % if ( inx.intValue() % 2 == 0 ) { % tr % } else { % tr bgcolor=#cc % } % From: Andy Kriger [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: iterate tag - can you set an increment? Date: Tue, 19 Nov 2002 12:43:37 -0500 And last but not least, is it possible to do test in logic:equal that involve equations? For example, is index%2==0? (or do I need JSTL for this)? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 12:34 To: Struts Users Mailing List Subject: RE: iterate tag - can you set an increment? Certainly. It's available as a scripting variable within the loop (and as a page-scoped attribute). -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED]] Is it possible to access the idx variable in a scriplet during iteration? -Original Message- From: Andy Kriger [mailto:[EMAIL PROTECTED]] Is there any way to set an iteration increment on the iterate tag? For example, iterate through the array returning every 2nd item. If not, can anyone tell me how I might do this without resorting to scriplets (or only using them minimally)? Here's the code I'm trying to use. The first TD is the long_desc field of array[idx] in myBean. How can I increment idx so I can get the next item? (maybe I'm being slow since I haven't had my coffee yet) logic:iterate id=idx name=myBean property=array scope=session tr tdbean:write name=idx property=long_desc//td tdbean:write name=??? property=long_desc//td /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Re: struggling with indexed/repeating input fields
ic... So it is a feature :) I will try it out. Thank you, Jim and Shirish, for the help Leo From: Jim Krygowski [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 12:52:36 -0500 Leo, I don't know if this will help, but we experienced a similar issue. I do believe you are right: it is an artifact of a Request scoped ActionForm. Our solution was to modify the indexed getters and setters so that they automatically sized the the internal array list representation upon request. This approach eliminated the IndexOutOfBoundsError on submit of our form. -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 12:18 PM To: [EMAIL PROTECTED] Subject: RE: Re: struggling with indexed/repeating input fields I wish I had another solution to the problem. I am using ArrayList and it is initialized on IndexedAction (see attached) = for ( int i=0; i10; i++ ) { NameValue nv = new NameValue( ,new Integer(i) ); al.add( nv ); } = The values show on the page. But when you submit the form, the ArrayList vanish. Where is the ArrayList size 10 initialize ? The exception happens on BeanUtils.populate before execute the submit action. If you can make the code attached work with scope=request I will be surprised Please take a look in the code before suggested what is already implemented. Thank you, Leo From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 17:52:52 +0100 HI, I think u are suggesting that every form has to be in session scope which is dangerous and will unnecessarily clog the session object. If u have problems when calling setters on u r form because the list on form is smaller, i will suggest following approach. public class MyForm { private List objectList = new ArrayList(); //use arrayList instead of array as it does not force u to declare size public Object getObject(index i){ while(index = this.getList().size() ){ this.getList().add(new Object()); } return this.getList().getObject(index); } } So in this case, when the setter is called,the form will be added with bean first nd then the setter will be called. Try this approach and let me know. Regards, Shirish -Original Message- From: leomaciel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 5:43 PM To: struts-user Cc: leomaciel Subject: Re: struggling with indexed/repeating input fields I GOT IT! I forgot to send the struts-config.xml and there were the difference VERY-IMPORTANT if I set the action scope=request I get: javax.servlet.ServletException: BeanUtils.populate ... Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 or Caused by: java.lang.NullPointerException make sure you don't have scope=request in your action ... /action /VERY-IMPORTANT === my struts-config.xml === form-beans ... form-bean name=IndexedForm type=test.IndexedForm / form-bean name=ParametersForm type=test.ParametersForm / /form-beans ... action path=/indexed type=test.IndexedAction name=IndexedForm validate=false forward name=success path=/indexed.jsp/ /action action path=/indexedResult type=test.IndexedResultAction name=IndexedForm validate=false forward name=success path=/indexedResult.jsp/ /action action path=/ShowParameters type=test.ShowParametersAction name=ParametersForm validate=false forward name=success path=/parameters.jsp / /action !-- Save parameters -- action path=/SaveParameters type=test.SaveParametersAction name=ParametersForm validate=false forward name=success path=/indextest.jsp / /action === Try it out. Cheers, Leo From: Leonardo Maciel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: struggling with indexed/repeating input fields Date: Tue, 19 Nov 2002 15:33:04 + Kevin, I finally got logic:iterate ... html:text ... indexed=true/ ... /logic:iterate to work. The sample code came from http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html Thank you Dave. I built Dave's code on top of struts-example. All necessary code is attached. On the index.jsp page there are two links html:link page=/indexed.doIterate html:text indexed example/html:link html:link page=/ShowParameters.doFrom Dave Iterate html:text indexed example/html:link The first one, indexed.do, doesn't work. Gives IndexOutOfBoundException. The second, ShowParameters.do
preselect radio button
Sorry bother with basic stuff, but does preselect value works on radio button? -- I have the JSP code: TRTD bean:write name=SurveyDetailForm property=bFlag / html:radio property=bFlag value=YesYes/html:radio html:radio property=bFlag value=NoNo/html:radio /TD/TR -- That produces: Yes O Yes O No Wasn't Yes suppose to be checked? Thank you a lot, Leo _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: preselect radio button
Never mind! I included name=SurveyDetailForm on html:radio html:radio name=SurveyDetailForm property=bFlag value=YesYes/html:radio html:radio name=SurveyDetailForm property=bFlag value=NoNo/html:radio and works For some reason the name that is suppose to be: Is not picking the bean associated with the form tag. Name: The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized. Thank you Leo From: Leonardo Maciel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: preselect radio button Date: Wed, 20 Nov 2002 00:16:04 + Sorry bother with basic stuff, but does preselect value works on radio button? -- I have the JSP code: TRTD bean:write name=SurveyDetailForm property=bFlag / html:radio property=bFlag value=YesYes/html:radio html:radio property=bFlag value=NoNo/html:radio /TD/TR -- That produces: Yes O Yes O No Wasn't Yes suppose to be checked? Thank you a lot, Leo _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Example of indexed properties and DynaBean?
When I submit my data. The first display with input fields is fine. Even the HTML source code has the indexed fields in the input form paramete[0].name, so on. From: Christoph Kulla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Example of indexed properties and DynaBean? Date: Sun, 17 Nov 2002 22:23:40 +0100 Hi, I had a quick look at the beanutil code. I can't find any code wich instantiates an empty array of the required size (given by the form data in the request). I wonder whether that ever worked. IMHO you have to specify the array size with an inital value in the form config. But then you'll have a fixed size array :( My idea is to write a new kind of List implementation which extends itself in size when the set method is called. So the List will resize itself to the number of indexed form elements. Btw, does your exception gets thrown when you submit your form data or when you display the form the first time? Regards Christoph Leonardo Maciel schrieb: You are not alone :( I also have tried several combinations same BeanUtils exceptions. My environment is jakarta-struts-1.1-b2 on Apache Tomcat/4.1.12 JSDK=1.4.1_01-b01 I also tried with JSDK1.3.1-06 where I got the exception: java.lang.reflect.InvocationTargetException: java.lang.IndexOutOfBoundsException: Index: 7, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:486) at java.util.ArrayList.get(ArrayList.java:302) at test.IndexedForm.getParameter(IndexedForm.java:28) at java.lang.reflect.Method.invoke(Native Method) I post my testing code on message: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg48968.html Please help, Thank you so much. Leo From: Christoph Kulla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Example of indexed properties and DynaBean? Date: Sun, 17 Nov 2002 20:07:09 +0100 Hi, can anyone point me to a working example of indexed properties and struts 1.1 (b2 or nightly). All my tests failed so far with various exceptions in the BeanUtils. Thanks in advance Christoph -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Example of indexed properties and DynaBean?
You are not alone :( I also have tried several combinations same BeanUtils exceptions. My environment is jakarta-struts-1.1-b2 on Apache Tomcat/4.1.12 JSDK=1.4.1_01-b01 I also tried with JSDK1.3.1-06 where I got the exception: java.lang.reflect.InvocationTargetException: java.lang.IndexOutOfBoundsException: Index: 7, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:486) at java.util.ArrayList.get(ArrayList.java:302) at test.IndexedForm.getParameter(IndexedForm.java:28) at java.lang.reflect.Method.invoke(Native Method) I post my testing code on message: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg48968.html Please help, Thank you so much. Leo From: Christoph Kulla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Example of indexed properties and DynaBean? Date: Sun, 17 Nov 2002 20:07:09 +0100 Hi, can anyone point me to a working example of indexed properties and struts 1.1 (b2 or nightly). All my tests failed so far with various exceptions in the BeanUtils. Thanks in advance Christoph -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How can I access the form bean object from JSP?
bean:define id=pickAName name=theForm property=beanInForm type=type.of.the.bean / %=pickAName.getMethod()% From: Zsolt Koppany [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: How can I access the form bean object from JSP? Date: Sat, 16 Nov 2002 08:20:52 +0100 Hi, how can I access the bean associated to my form? I would like to call some getter and setter methods. Zsolt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
logic:iterate......html:text... indexed=true/.../logic:iterate
Quick question: logic:iterate... html:text... indexed=true/ /logic:iterate Is this feature on jakarta-struts-1.1-b2 or I need to recompile struts as suggested by Dave on article http://husted.com/struts/resources/indexed-tags.htm Thank you, Leo _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: IndexOutOfBounds error, Struts 1.1b2, J2SDK 1.4.1
Good Saturday! I believe I am getting the same bug. I am getting: Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:508) at java.util.ArrayList.get(ArrayList.java:320) at test.IndexedForm.getParameter(IndexedForm.java:28) ... 46 more running jakarta-struts-1.1-b2 on Apache Tomcat/4.1.12 JSDK=1.4.1_01-b01 Trying to do this simple indexed ArrayList I built on top of the struts-example webapp. See source code attached. What are the alternatives here. Go back to JDK 1.3.1 ? Thank you so much, Leo From: Jim Krygowski [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: IndexOutOfBounds error, Struts 1.1b2, J2SDK 1.4.1 Date: Fri, 15 Nov 2002 10:01:35 -0500 We've run some more tests, and documented them. The results are totally consistent and reproducible across all my developers' machines. We develop targeting JRun, but we've tested against Tomcat and seen the same IndexOutOfBoundsException. The cause is always due to the misidentification of an ArrayList attribute as a PropertyDescriptor instead of an IndexedPropertyDescriptor. In the table below are our testing outcomes. Success means that the ArrayList attribute was correctly identified as a IndexedPropertyDescriptor and the code ran without exceptions. Fail consistently means that the ArrayList was misidentified causing an exception to be thrown. We see the problem in JRun and Tomcat, so we can rule out the App Servers. We see the problem in 1.1b2+1.4.1 and Nightly+1.4.1. I've written a test case independent of struts that examines my ActionForm (Introspector.getBeanInfo, beanInfo.getPropertyDescriptors) and regardless of which JDK I'm using, the results come out correctly each time. That leads me to believe that something funny is happening to my ActionForm somewhere in the Struts code. Has anyone else seen this?? I have three developers who came across this error independently so I have to imagine that some of you out there bumped into it too when you moved up to JDK 1.4.1. App Svr; Struts Rel; JDK; Outcome; ---; --; -; ---; JRun 4.1; 1.1b2; 1.3.1; Success; JRun 4.1; 1.1b2; 1.4.1; Fail; Tomcat4.0.9; 1.1b2; 1.3.1; Success; Tomcat4.0.9; 1.1b2; 1.4.1; Fail; JRun 4.1; Nightly; 1.3.1; Success; JRun 4.1; Nightly; 1.4.1; Fail; NONE; NONE; 1.3.1; Success; NONE; NONE; 1.4.1; Success; thanks in advance for you suggestions. jk _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % head titleIndexed Test/title /head body bgcolor=white h3Indexed Form/h3 logic:iterate id=parameter name=indexedForm property=pair bean:write name=parameter property=value / nbsp;nbsp; bean:write name=parameter property=name / brbr /logic:iterate /body /html:html %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % head titleIndexed Test/title /head body bgcolor=white h3Indexed Form/h3 html:form action=/indexedResult logic:iterate id=parameter name=indexedForm property=pair bean:write name=parameter property=value / nbsp;nbsp; html:text name=parameter property=name indexed=true/ brbr /logic:iterate html:submit value=Submit/ /html:form /body /html:html ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; !-- This is the Struts configuration file for the example application, using the proposed new syntax. NOTE: You would only flesh out the details in the form-bean declarations if you had a generator tool that used them to create the corresponding Java classes for you. Otherwise, you would need only the form-bean element itself, with the corresponding name and type attributes. -- struts-config !-- == Data Source Configuration === -- !-- data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Example Data Source Configuration/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password
RE: [OT]Need magic incantation [Friday alert!]
If you don't have a car, no problem, walkToYourCar throws CarException() So your Friday would be like this: === try{ walkToYourCar(); } catch(CarException e) { getToNearestPub(); // don't mater how } === Just a suggestion, I haven't try. Let me know if it works ;) Leo From: Drew Zimber [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT]Need magic incantation [Friday alert!] Date: Fri, 15 Nov 2002 14:16:15 -0500 one of the most brilliant solutions I've ever come across, you're a true software engineer! ;) dz Here's the solution: - Look around the case to your PC. You should find a power switch. - Turn the switch to the off position (sometimes shown as a 0). - Put your coat on. - Get your keys and wallet. Walk to your car. - Drive to nearest pub. The bartender there will provide you with your next instructions. K. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
html:text indexed=true inside logic:iterate help!
Hi all, I search the list and found some good samples, but I'm still unable to execute the following code. The newEntryContinue.do action shows the correct name and description values with the bean:write and the text boxes When I submit I get: javax.servlet.ServletException: BeanUtils.populate ... root cause: java.lang.reflect.InvocationTargetException ... Caused by: java.lang.NullPointerException SurveyDetailForm.getParameter(SurveyDetailForm.java:816) ... THE JSP: logic:iterate id=parameter name=SurveyDetailForm property=labArray TRTD align=right bean:write name=parameter property=name/nbsp; /TD TD html:text size=10 maxlength=10 name=parameter property=quantity indexed=true / bean:write name=parameter property=description/ /TD /TR /logic:iterate THE FORM: = public class SurveyDetailForm extends ActionForm { private ArrayList labArray; public ArrayList getLabArray() { return labArray; } public void setLabArray(ArrayList labArray) { this.labArray = labArray; } public LabValues getParameter(int index) { return (LabValues)labArray.get(index); } STRUTS-CONFIG: == action path=/newEntryContinue type=NewEntryContinueAction name=SurveyDetailForm input=/newEntry.do validate=true scope=request forward name=success path=/WEB-INF/nyclt/detailEntry.jsp/ /action action path=/newEntrySave type=NewEntrySaveAction name=SurveyDetailForm validate=false scope=request forward name=success path=/newEntry.do/ /action THE newEntryContinue: = Populates the array with detailForm.setLabArray( new ArrayList( pro.getLabValueList() ) ); LabValues objects that has get and set for public final class LabValues implements Serializable { private Integer value; private String name; private String description; private String quantity; private String date; What is wrong?? I appreciate any help. Thank you Leo _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Need Urgent help
logic:present name=beaninstance property=method logic:equal name=beaninstance property=method value=A DO SOME. /logic:equal /logic:present -Original Message- From: Yaman Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:40 AM To: Struts Users Mailing List Subject: Need Urgent help Hi, I have a problem in using logic:equal tag given below logic:equal name=beaninstance property=method value=A DO SOME. /logic:equal This code is working fine when it is not null. But when ever it { beaninstance.getMethod() } is becoming null, page is getting exception as below... javax.servlet.jsp.JspException: Cannot compare null variable to value A at org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193) at org.apache.jsp.HNCTemplate$jsp._jspService(HNCTemplate$jsp.java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) Can any one help me out in this, I tried to break this in logic:equal source file.. TIA rayaku -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ActionForm question
Isn't it the input attribute of the action tag in the struts-config.xml file? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:40 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: ActionForm question I am looking into the same problem... I just read chapter 7 and did not see anything about it... HELP? -Original Message- From: msoomar [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:25 PM To: struts-user Subject: RE: ActionForm question Dont have to answer this. Sorry, for posting it. Got the answer - Chuck's Chapter 7 talks about it. Thanks. Muki Soomar Where do we define where the view gets forwarded to by the ActionServlet when we encounter validation errors from an ActionForm in the struts-config.xml file? Or do we not need to do that at all and the original view gets selected and uses the html:errors/ tag which displays the errors in the ActionErrors object ? Anybody .. any help .. ? Muki Soomar -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Javascript and Struts
a href=javascript:openWindow('reportDelivery', '/budsDev/jsp/reportDeliveryQP.jsp',1,350,300) or if you want open the page with reportNav action (that's what I use): a href=javascript:openWindow('reportDelivery','fullPath/reportNav.do?action=Load',1,350,300) or, not sure if they work, if you realy wants to use html:link: html:link page= onclick=javascript:openWindow('reportDelivery','fullPath/reportNav.do?action=Load',1,350,300) or html:link href=javascript:openWindow('reportDelivery','fullPath/reportNav.do?action=Load',1,350,300) -Original Message- From: Villegas, Courtney [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:54 PM To: 'Struts Users Mailing List' Subject: Javascript and Struts Is it possible to mix javascript and struts? I want to create a popup window that is opened through an action. There was some talk of doing this about a month ago, but I looked on the user-list archives and couldn't find any information. Any help would be greatly appreciated. Thanks!!! Courtney -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: max length on html:textarea
not on Struts 1.0.2 :( -Original Message- From: Tim Sawyer [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 8:24 AM To: [EMAIL PROTECTED] Cc: Tim Sawyer Subject: max length on html:textarea Can I set a maximum length of text in an html:textarea ? Tim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: max length on html:textarea
not on Struts 1.0.2 :( -Original Message- From: Tim Sawyer [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 8:24 AM To: [EMAIL PROTECTED] Cc: Tim Sawyer Subject: max length on html:textarea Can I set a maximum length of text in an html:textarea ? Tim. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mapping
request.getHeader(referer);returns the URL of the caller page. or you can set different property names previous and summary on your html:submit button -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 1:54 PM To: 'Struts Users Mailing List' Subject: RE: mapping The reason I ask is, to return to the previous page, just use onclick=javascript:history.go(-1). If you really need to know the URI of the requesting page, go through an action mapping and get it from the servlet Request object from an action class (see the API). Mark -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 1:40 PM I keep that to myself, if you know how to do it, I'd appreciate your answer and help, otherwise thanks! Carlos Fernandez www.s1.com -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 1:09 PM Why do you need to know which page invokes the data entry page? -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:00 PM To: Struts Subject: mapping Hi There, Can someone tell me the best way to know which page I am coming from?. I have a clue using mapping object in the action class. This is the scenario : The first page is a data entry one. Once you put the fields you click continue and go to the summary one that will ask to confirm the values just entered. This second page has two buttons edit and continue. If I click edit button, I have to come back to the first page with the values I entered before in the fields. The question is : The first page gets invoked from two different pagesthe previous one (that invokes it the first time) and from the summary one. I need to know which page invoked it. Any ideas? Carlos Fernandez www.s1.com http://www.s1.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple search on single page - approach
paging. http://jsptags.com/tags/navigation/pager/ -Original Message- From: stsrut strut [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 4:58 PM To: Struts Users Mailing List Subject: Multiple search on single page - approach Hello All, I have single page ( JSP) which has multiple (5) search criteria where user enters corresponding ids . User can eneter id's and onchange event populates the corresponding drop down lists. Lists are popultaed from DB so there is server trip for every onchange event. Page refreshes every time. I am looking forward to implement some thing simple which will avoid multiple trips to server so that single server submit can help. Drop downs still needs to be populated from DB and has more than 1 records. Are there any other good approaches ? thanx in advance __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
set the property on JSP file: html:submit property=edit value=Edit/ on action class: if (request.getParameter(edit) != null ) { // means edit was pressed } -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos.
RE: Help needed.........Need to Pass values from the popup to the ac tion handler
write a JavaScript function on your parent window !-- function fromPopup(par1, par2, ...) { document.forms[0].field1.value = par1; document.forms[0].field2.value = par2; ... } -- from the popup, when exiting, call the parent window function !-- function exiting(par1, par2, ...) { window.opener.fromPopup(par1, par2, ...); window.opener.focus(); self.close(); } -- -Original Message- From: Susmita Pati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:01 PM To: 'Struts Users Mailing List' Subject: Help needed.Need to Pass values from the popup to the ac tion handler Hi All I need to popup a window from the click of a button. select some values. Then pass this value to the action handler. Can someone help me pls. Thanks in advance susmita -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how do i pass multiple parameters
whenever I want to pass multiple parameters I use anchor a href='index.do?value=bean:write name=bean property=p/value1=bean:write name=bean property=p1/value2=bean:write name=bean property=p2/' bean:write name=bean property=label/ /a -Original Message- From: siraj [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 20, 2000 6:34 AM To: Struts Users Mailing List Subject: how do i pass multiple parameters hello team , can some one help in passing multiple parameters with a html link i have a link index.do where i need to pass around 10 parameters which have dynamic values sy index.do?value=leve1?value1=xyz?value2=4 any how i used html:link page=index.do paramid=value pramName=xyz parampropery=value which allows me to pass only one parameter i would highly appreciate for the help thanks in advance Siraj -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Calendar in XML/java script
http://www.mattkruse.com/javascript/calendarpopup/documentation.html -Original Message- From: Uma Munugala [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 1:20 PM To: '[EMAIL PROTECTED]' Subject: Calendar in XML/java script Hi All I want a help. Iam using Apache, tomcat 4.0.3 and struts on windows NT In my project i need to display a calendar and user can select any date and i need to display that on my web page. Is there any software already existing for this in XML/Java script. If so please any body point to that. Any help is very much appreciated. Thanks Uma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: stuts-config.xml file
The javadocs has a brief explanation of the properties defined on struts-config.xml See Class ActionMapping at: http://jakarta.apache.org/struts/doc-1.0.2/api/index.html For me, the only not too intuitive tag is name. But since it is a reference to the form name declared on the form-bean section it sounds good enough. Definitely not form-class -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 2:28 PM To: Struts Users Mailing List Subject: Re: stuts-config.xml file Muki-- The names in the config files/DTDs can seem very counter intuitive. Managing the files by hand in general is cumbersome and that's why I developed the Struts Console software. http://www.jamesholmes.com/struts/ I'm adding some functionality in the near future that will give explanations for each element and their attributes thus making it easier for newbies to get up to speed. -james [EMAIL PROTECTED] --- Soomar, Muki (R.) [EMAIL PROTECTED] wrote: I am still new to struts and going through the documentation. Here are some general questions for the gurus who understand the DTDs for struts-config.xml file and its usage. action element 1. Why is the attribute type for the action element named so. Wouldnt the attribute name action-class be more intuitive here ? 2(a). Attribute name for the same action element refers to the form. Again form-class would have been more intuitive. 2(b) Attribute attribute also refers to the form class for the example application. I am confused between the usage of the two. (Still need to do a bit more digging, but intuitive attribute names would have helped in the first reading very much !) 3. Attribute input is intuitive, but input-uri or input-url would have been more intuitive 4. Sub-element forward has attribute name that refers to the type of result based on which forwards could be redirected. Wouldnt it be simpler to just call this attribute result-type instead of name. Any particular reasons for this naming convention. I just figured, I have to carry another mapper in my head to figure out the true meaning of these attributes. Maybe, I need to interpret them in a different manner. Any feed back would be much appreciated. Thanks and Regards, Muki Soomar -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: stuts-config.xml file
I thought it was Polish notation -Original Message- From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 4:52 PM To: Struts Users Mailing List Subject: RE: stuts-config.xml file Like I said, no negative criticism or finger-pointing from my quarter, just an observation. Thanks for telling me this--it actually bolsters my point. They probably settled on these terms because they were familiar to people who were hip to the current nomenclature at the time. Ah, screw it, let's just use Hungarian notation for everything--everybody's familiar with it, right?! (just kidding) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 1:11 PM To: 'Struts Users Mailing List' Subject: RE: stuts-config.xml file The Struts team didn't invent these terms - they adapted them from (then) current nomenclature. For example, see David Geary's Advanced JavaServer Pages, Chapter 6 (Sun/Prentice-Hall, 2001). Mark -Original Message- From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 3:04 PM I agree 100% with Muki's observations. Some of the Struts tag-libs also suffer from similar non-intuitive naming schemes. Identifiers should be meaningful and descriptive, period, no matter what file format or local context they are found in. This is not a negative criticism, so everyone sheath their fangs please; it is a common problem of our industry that intimate familiarity can create results that lack clarity for those without that degree of familiarity. Unfortunately, we don't have enough time to become experts at everything, else this would not be an issue. ...but at least with Struts, it's well-documented. :) Were it not for the comprehensive JavaDocs, I would've been in serious trouble. -Original Message- From: Soomar, Muki (R.) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 11:43 AM To: 'Struts Users Mailing List' Subject: RE: stuts-config.xml file Leonardo, Make sense for the cross-reference in the form-bean element. I am not too hung up on anything - really, just that I had to scratch my head a few times on some of the element names and their attribute names, which completely defeats the purpose of XML config files. XML has to be readable ..and understandable, as should any code be - right ? ;) Muki -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 2:33 PM To: Struts Users Mailing List Subject: RE: stuts-config.xml file The javadocs has a brief explanation of the properties defined on struts-config.xml See Class ActionMapping at: http://jakarta.apache.org/struts/doc-1.0.2/api/index.html For me, the only not too intuitive tag is name. But since it is a reference to the form name declared on the form-bean section it sounds good enough. Definitely not form-class -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 2:28 PM To: Struts Users Mailing List Subject: Re: stuts-config.xml file Muki-- The names in the config files/DTDs can seem very counter intuitive. Managing the files by hand in general is cumbersome and that's why I developed the Struts Console software. http://www.jamesholmes.com/struts/ I'm adding some functionality in the near future that will give explanations for each element and their attributes thus making it easier for newbies to get up to speed. -james [EMAIL PROTECTED] --- Soomar, Muki (R.) [EMAIL PROTECTED] wrote: I am still new to struts and going through the documentation. Here are some general questions for the gurus who understand the DTDs for struts-config.xml file and its usage. action element 1. Why is the attribute type for the action element named so. Wouldnt the attribute name action-class be more intuitive here ? 2(a). Attribute name for the same action element refers to the form. Again form-class would have been more intuitive. 2(b) Attribute attribute also refers to the form class for the example application. I am confused between the usage of the two. (Still need to do a bit more digging, but intuitive attribute names would have helped in the first reading very much !) 3. Attribute input is intuitive, but input-uri or input-url would have been more intuitive 4. Sub-element forward has attribute name that refers to the type of result based on which forwards could be redirected. Wouldnt it be simpler to just call this attribute result-type instead of name. Any particular reasons for this naming convention. I just figured, I have to carry another mapper in my head to figure out the true meaning of these attributes. Maybe, I need to interpret them in a different manner. Any feed back
RE: logic:match question
In some programming languages '0' is a character while 0 is a string. try to use 0 instead. -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: logic:match question Hello all, I'm not sure what is happening here but I think it's an obvious fix, I just can't see it. When I'm looping through a logic:iterate tag, I want to display a message on the first iteration. I used the IndexId attribute and created an index and compare it to the value 0. For some reason, this evalutates to true for 0 and 10 (and maybe 20 etc... my results don't go that high). logic:match name='index' value='0' I like cheese! /logic:match Any Ideas? Graham -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: class cast exception
Is MyActionForm the name (form-bean) for the action on struts-config.xml file ? form-bean name=MyActionFormBean type=path.to.MyActionForm/ action ... name = MyActionFormBean -Original Message- From: Thorsten Maus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:10 AM To: struts-user Subject: class cast exception hi there ... i always get a class cast excpetion when trying to cast the form-class is there anybody who is able to tell me what is wrong in my form-class public class StrutsAction extends Action{ public StrutsAction() { } public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { MyActionForm myActionForm = (MyActionForm) form; //myActionForm.setParam1(_new value); return mapping.findForward(forward); } } public class MyActionForm extends ActionForm { private String param1; public String getParam1(){ return param1; } public void setParam1(String param){ this.param1=param; } } thanks in advance thorsten -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Applying struts submit and reset button tags functionality to images
use html:img tag -Original Message- From: Yaman Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 9:26 AM To: Struts Users Mailing List Subject: Applying struts submit and reset button tags functionality to images Hi, Can any one help in applying struts submit /reset buttons to images. html:submitsubmit/html:submit html:submitreset/html:submit To img src=bean:write name=ctxtPath//images/submit.gif width=42 height=22 border=0 img src=bean:write name=ctxtPath//images/reset.gif width=42 height=22 border=0 Many Thanks, rayaku -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Applying struts submit and reset button tags functionality to images
you are right use html:image instead from_working_code ... html:image property=login src=/images/butn_go_white_bg.gif alt=login / ... /from_working_code -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:37 AM To: Struts Users Mailing List Subject: RE: Applying struts submit and reset button tags functionality to images I think the html:image tag renders as input type=image .../ which is what you need. At least that is what I'm using in Struts 1.0. robert -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:28 AM To: Struts Users Mailing List Subject: RE: Applying struts submit and reset button tags functionality to images use html:img tag -Original Message- From: Yaman Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 9:26 AM To: Struts Users Mailing List Subject: Applying struts submit and reset button tags functionality to images Hi, Can any one help in applying struts submit /reset buttons to images. html:submitsubmit/html:submit html:submitreset/html:submit To img src=bean:write name=ctxtPath//images/submit.gif width=42 height=22 border=0 img src=bean:write name=ctxtPath//images/reset.gif width=42 height=22 border=0 Many Thanks, rayaku -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Auto-resending the information on refreshing
I want to refresh the opener window. I don't know the opener window URL, I use: window.opener.history.go(0) Is there a way to auto-resending the info and NOT to show the warning message? The page cannot be refreshed without resending the information. click retry to send the information again, or click Cancel to return to the page you try to view Thanks Leo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Auto-resending the information on refreshing
Yes re-post it. The parent window opens a child window. Once you click OK on the child window it should refresh the parent and close itself. window.opener.history.go(0); self.close(); But since the parent window is a struts .do I get the warning message. Thanks Leo -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 5:44 PM To: Struts Users Mailing List Subject: RE: Auto-resending the information on refreshing You are trying to re-post a page? Can you tell us a little more about what you are trying to do? JM -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 5:34 PM To: 'Struts Users Mailing List' Subject: Auto-resending the information on refreshing I want to refresh the opener window. I don't know the opener window URL, I use: window.opener.history.go(0) Is there a way to auto-resending the info and NOT to show the warning message? The page cannot be refreshed without resending the information. click retry to send the information again, or click Cancel to return to the page you try to view Thanks Leo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Comparing Null using Logic:Equal
logic:notPresent ... /logic:notPresent if not Present it is null -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:25 PM To: Struts Users Mailing List Subject: Comparing Null using Logic:Equal Guys, Thanks for the help on the previous post. Can anyone tell me how do I compare a value null using logic equal or someother tag. This is the requirement.. If the value returned by a getter method is null in iterator tag then I have got to display something else something else.. Thanks a lot in advance! Cheerio, Taati -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Comparing Null using Logic:Equal
so use both logic:present ... display column /logic:present logic:notPresent ... display some other data /logic:notPresent hope I am clear!! -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:37 PM To: Struts Users Mailing List Subject: RE: Comparing Null using Logic:Equal Leo and Jim, Thanks a lot it works but not exactly the way my requirement demands. I will explain to you the scenario.Take the struts-examples for instance. When we click on the edit registration we get a table with the heading host,autoconnect,etc.. Now if the subscriptions bean is null it will not display the column, that is the results array in the bean user is returned null for the first time and hence the table rows are not printed. When I use the logic:present tag it works only if I go to subscription and dont enter anything and come back. Actually my requirement is to show some other data when the user clicks on the reigistration and there is no data to be shown in the table.Hope i am clear? Regards, Taati -Original Message- From: James Mitchell [SMTP:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:31 PM To: Struts Users Mailing List Subject: RE: Comparing Null using Logic:Equal See logic:present JM -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:25 PM To: Struts Users Mailing List Subject: Comparing Null using Logic:Equal Guys, Thanks for the help on the previous post. Can anyone tell me how do I compare a value null using logic equal or someother tag. This is the requirement.. If the value returned by a getter method is null in iterator tag then I have got to display something else something else.. Thanks a lot in advance! Cheerio, Taati -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Comparing Null using Logic:Equal
The closing tag requires / ... /logic:notPresent ... /logic:present -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:50 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: Comparing Null using Logic:Equal Leo, You were clear but still it doesn't work. I will paste the code here. This is from the registration.jsp of the struts-example logic:iterate id=subscription name=user property=subscriptions logic:notPresent name=subscription property=subscriptions trtdPlease do whatever Taati wants /td /tr logic:notPresent logic:present name=subscription property=subscriptions tr td align=left bean:write name=subscription property=host filter=true/ /td td align=left bean:write name=subscription property=username filter=true/ /td td align=center bean:write name=subscription property=type filter=true/ /td ... ... ... .. logic:present but the result is I wont do whatever Taati wants!;) It is just the same.. May I know where I am goofing up! Regards, Taati -Original Message- From: Leonardo Maciel [SMTP:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:38 PM To: 'Struts Users Mailing List' Subject: RE: Comparing Null using Logic:Equal so use both logic:present ... display column /logic:present logic:notPresent ... display some other data /logic:notPresent hope I am clear!! -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:37 PM To: Struts Users Mailing List Subject: RE: Comparing Null using Logic:Equal Leo and Jim, Thanks a lot it works but not exactly the way my requirement demands. I will explain to you the scenario.Take the struts-examples for instance. When we click on the edit registration we get a table with the heading host,autoconnect,etc.. Now if the subscriptions bean is null it will not display the column, that is the results array in the bean user is returned null for the first time and hence the table rows are not printed. When I use the logic:present tag it works only if I go to subscription and dont enter anything and come back. Actually my requirement is to show some other data when the user clicks on the reigistration and there is no data to be shown in the table.Hope i am clear? Regards, Taati -Original Message- From: James Mitchell [SMTP:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:31 PM To: Struts Users Mailing List Subject:RE: Comparing Null using Logic:Equal See logic:present JM -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:25 PM To: Struts Users Mailing List Subject: Comparing Null using Logic:Equal Guys, Thanks for the help on the previous post. Can anyone tell me how do I compare a value null using logic equal or someother tag. This is the requirement.. If the value returned by a getter method is null in iterator tag then I have got to display something else something else.. Thanks a lot in advance! Cheerio, Taati -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Comparing Null using Logic:Equal
You said if the subscriptions bean is null I am assuming subscriptions is property of user. You should iterate only when logic:present name=user property=subscriptions That's how I would do: logic:notPresent name=user property=subscriptions trtdPlease do whatever Taati wants /td /tr ... /logic:notPresent logic:present name=user property=subscriptions logic:iterate id=subscription name=user property=subscriptions tr td align=left bean:write name=subscription property=host filter=true/ /td td align=left bean:write name=subscription property=username filter=true/ /td td align=center bean:write name=subscription property=type filter=true/ /td ... ... ... .. /logic:iterate /logic:present -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:50 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: Comparing Null using Logic:Equal Leo, You were clear but still it doesn't work. I will paste the code here. This is from the registration.jsp of the struts-example logic:iterate id=subscription name=user property=subscriptions logic:notPresent name=subscription property=subscriptions trtdPlease do whatever Taati wants /td /tr logic:notPresent logic:present name=subscription property=subscriptions tr td align=left bean:write name=subscription property=host filter=true/ /td td align=left bean:write name=subscription property=username filter=true/ /td td align=center bean:write name=subscription property=type filter=true/ /td ... ... ... .. logic:present but the result is I wont do whatever Taati wants!;) It is just the same.. May I know where I am goofing up! Regards, Taati -Original Message- From: Leonardo Maciel [SMTP:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:38 PM To: 'Struts Users Mailing List' Subject: RE: Comparing Null using Logic:Equal so use both logic:present ... display column /logic:present logic:notPresent ... display some other data /logic:notPresent hope I am clear!! -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:37 PM To: Struts Users Mailing List Subject: RE: Comparing Null using Logic:Equal Leo and Jim, Thanks a lot it works but not exactly the way my requirement demands. I will explain to you the scenario.Take the struts-examples for instance. When we click on the edit registration we get a table with the heading host,autoconnect,etc.. Now if the subscriptions bean is null it will not display the column, that is the results array in the bean user is returned null for the first time and hence the table rows are not printed. When I use the logic:present tag it works only if I go to subscription and dont enter anything and come back. Actually my requirement is to show some other data when the user clicks on the reigistration and there is no data to be shown in the table.Hope i am clear? Regards, Taati -Original Message- From: James Mitchell [SMTP:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:31 PM To: Struts Users Mailing List Subject:RE: Comparing Null using Logic:Equal See logic:present JM -Original Message- From: Mannem, Taati [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 1:25 PM To: Struts Users Mailing List Subject: Comparing Null using Logic:Equal Guys, Thanks for the help on the previous post. Can anyone tell me how do I compare a value null using logic equal or someother tag. This is the requirement.. If the value returned by a getter method is null in iterator tag then I have got to display something else something else.. Thanks a lot in advance! Cheerio, Taati -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: calling an action as a forwards
sure forward name=nextAction path=/path/nextPage.do -Original Message- From: Emerson Cargnin - MSA [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 7:58 PM To: Struts Users Mailing List Subject: calling an action as a forwards Have someone used an action calling other other action as a forward??? - Original Message - From: Gerry Chike [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, May 06, 2002 8:32 PM Subject: Re: BC4J versus Struts Hi Yibing, I don't believe there are any conflicts between the two frameworks. There is some overlap in regards to the presentation tier e.g. BC4J includes a set of JSP Tag libraries that enable you to easily access the BC4J tier. However, if you look at the examples that JDeveloper generates, you'll see that BC4J's Controller (of MVC) is hard coded into the pages, and some generated scriptlets - further coupling the model, controller and view. You might be able to use the Struts framework specifically for it's Controller (avoiding Struts' ActionForms) and leverage BC4J's Tag Libraries for everything else, but I believe there's a better design. It's difficult to compare the two frameworks, since BC4J covers a much broader range of enterprise issues such as O/R mapping, transactions and distributed computing. These areas are BC4J's major strengths. In regard to distributed computing, BC4J is tier independent, so you could deploy BC4J's ApplicationModule (your app) to a Servlet Container, as a stand-alone Java application, or into an EJB Container (wrapped as a Session Bean). In regard to transactions, the framework will handle very complicated caching algorithms, and can be configured to handle transactions in a number of different ways depending on your requirements e.g. no locking, optimistic locking, and pessimistic locking. In short, BC4J is a very complicated, but very powerful framework for handling business logic. On the other hand, Struts is a simple, light-weight implementation of the MVC design pattern - specifically for the Servlet piece of the J2EE specification. In fact, a much closer comparison could be made with Oracle's new MVC framework called UIX which is remarkably similar to Struts, but unlike Struts the View part (of the MVC) is de-coupled to allow either JSPs or XSLT/XML. Note: Currently, Struts is heavily coupled with JSPs, but there are a number of open-source groups which have implemented (or are implementing) different presentation technologies e.g. Velocity templates. In short, if I were to use both Struts and BC4J together, I would leverage each for it's strengths i.e. use Business Components for Java (BC4J) for handling business logic, and use Struts for handling the presentation tier e.g. Presentation Tier Business Tier Database Tier Servlet Container Servlet/EJB ContainerOracle Database - --- -- Struts (MVC)BC4J (MC)Persistent Data (M) Simply map BC4J's Views to your ActionForms (UI JavaBeans), or have BC4J return your data as XML (it's built into the framework) and apply your XSLT. Cheers, Gerry At 04:51 PM 05/06/2002 -0400, Yibing Li wrote: Folks, We are going to develop our web application using Struts as our Web Framework and JDeveloper as the IDE tool. As Oracle provides a J2EE framework called Business Components For Java (BC4J), embedded in Jdeveloper, most likely we will also use that. My question to the group is: Given Struts is a web framework and BC4J is a J2EE Framework, are there any conflicts of using both in the same application? How about even in the same tier Web tier )? If the answer is yes, how can we make them work together. If you understand both and have used them, please give me a reply. Thanks a lot. Yibing -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Re:html input elements don't work
are you including all struts taglib in your JSP page? i.e. % taglib uri=/WEB-INF/struts-html.tld prefix=html % -Original Message- From: siraj [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 04, 2000 12:32 AM To: Struts Users Mailing List Subject: Re: Re:html input elements don't work do u get any errors , can u elabrate ur settings - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, May 03, 2002 1:36 PM Subject: Re:html input elements don't work Are you just working with struts, or Jsp?? Shirin Fathima (3/05/2002 8:05): Hi, The following simple code isn't working, html:form action=createText method=GET Input:html:text property=test / br/ html:submit property=submit/ /html:form In the sense that, the text box and the button don't appear when I call the Jsp page. Can somebody tell me what may be the problem? Guys, I'm a novice with struts. Thanks, Shirin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Embed bean:write inside html:link?
for one single parameter use html:link page=/process.do paramId=foo paramName=foobean:write name=foo//html:link -Original Message- From: Shane Bouslough [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 4:15 PM To: [EMAIL PROTECTED] Subject: Embed bean:write inside html:link? Hi Struts Users, I can successfully iterate over a list, and use bean:write to output the values like this: logic:iterate id=foo name=fooList Foo=bean:write name=foo/br /logic:iterate Let's say this outputs: Foo=XXX Foo=YYY Foo=ZZZ I would like to also wrap the bean:write tag inside a html:link tag, but here's the rub: I'd like the page URL to include parameters that are the same text as the output of the bean:write tags so it renders HTML something like: Foo=a href=/process.do?foo=XX/abr How can I embed the output of bean:write to be part of the value passed to the page= parameter of html:link? -Shane _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:select help!
For your number 2. Inside the iterator you can have something like this html:select property=result logic:iterate id=cType name=cList logic:equal name=cType value=USA option selected style=background-color:#FFAA00; font-style:italic; color:blue value=bean:write name=cType/ bean:write name=cType/ /option /logic:equal logic:notEqual name=cType value=USA option value=bean:write name=cType/ bean:write name=cType/ /option /logic:notEqual /logic:iterate /html:select 8*) And it's not Friday yet. :( -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:47 AM To: 'Struts Users Mailing List' Subject: RE: html:select help! Two problems: 1. It doesn't work correctly with Netscape; probably not for many other browsers as well. 2. What would be the point even with IE for a Struts select with an iterator? All the options' styles would be the same. Mark -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:28 AM Not sure how this applies to the html:select tag, but in html: select name=country option selected style=background-color:#FFAA00; font-style:italic; color:blue value=us United States of America /option option value=afAfghanistan, Islamic State of /option option value=al Albania /option /select Change the style as you like. Cheers, Tony -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:10 AM To: 'Struts Users Mailing List' Subject: RE: html:select help! You can't. -Original Message- From: Muthukumar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 5:45 AM To: [EMAIL PROTECTED] Subject: html:select help! Hi How to make one or more option of select object bold. Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:select help!
works at least in IE. But what I have is a multiple dropdown box with pre-selected options copy-paste-from-working-code html:select property=contactTypesResult multiple=true size=5 style=font-size:12px; onchange=updateCounter() logic:iterate id=cType name=ContactForm property=contactTypesList type=com.contact.ContactTypeResultData logic:equal name=cType property=selected value=true option value=bean:write name=cType property=participantTypeDescription/ selected bean:write name=cType property=participantTypeDescription/ /option /logic:equal logic:notEqual name=cType property=selected value=true option value=bean:write name=cType property=participantTypeDescription/ bean:write name=cType property=participantTypeDescription/ /option /logic:notEqual /logic:iterate /html:select /copy-paste-from-working-code -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 12:29 PM To: 'Struts Users Mailing List' Subject: RE: html:select help! Does this actually work (at least in IE)? -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:58 AM For your number 2. Inside the iterator you can have something like this html:select property=result logic:iterate id=cType name=cList logic:equal name=cType value=USA option selected style=background-color:#FFAA00; font-style:italic; color:blue value=bean:write name=cType/ bean:write name=cType/ /option /logic:equal logic:notEqual name=cType value=USA option value=bean:write name=cType/ bean:write name=cType/ /option /logic:notEqual /logic:iterate /html:select 8*) And it's not Friday yet. :( -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:47 AM To: 'Struts Users Mailing List' Subject: RE: html:select help! Two problems: 1. It doesn't work correctly with Netscape; probably not for many other browsers as well. 2. What would be the point even with IE for a Struts select with an iterator? All the options' styles would be the same. Mark -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:28 AM Not sure how this applies to the html:select tag, but in html: select name=country option selected style=background-color:#FFAA00; font-style:italic; color:blue value=us United States of America /option option value=afAfghanistan, Islamic State of /option option value=al Albania /option /select Change the style as you like. Cheers, Tony -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 11:10 AM To: 'Struts Users Mailing List' Subject: RE: html:select help! You can't. -Original Message- From: Muthukumar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 5:45 AM To: [EMAIL PROTECTED] Subject: html:select help! Hi How to make one or more option of select object bold. Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
what question?
Where is the question? To cool you guys, Baskin-Robbins is holding their annual Free Scoop Night from 6 p.m. to 10 p.m. TODAY, May 1, 2002. 8*) -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 2:36 PM To: Struts Users Mailing List Subject: Re: James Mitchell is a kind and generous person Why don't you look at the question and see how you might make it more specific? At 01:28 PM 5/1/02 -0500, you wrote: Can we stop the flame now and get on with struts-centric discussions?!? =) I understand each of you is probably a bit perturbed, however, I think we're all adults. Let's act like it. Perhaps if you restated your question, trying to be more specific. I occassionally have to do that myself, and I feel I communicate very effectively. - Original Message - From: Micael Padraig Og mac Grene [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 01, 2002 1:18 PM Subject: RE: James Mitchell is a kind and generous person The fact is that both of you typically shoot your mouths off before you understand the issues. In this case, there is a struts issue and you both assumed that it was something else. The issue is not joking, it is that you both are impossible puerile. At 02:08 PM 5/1/02 -0400, you wrote: Oh, well. My philosophy has always been, Joke 'em if they can't take a f*ck. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 2:02 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: James Mitchell is a kind and generous person Hmmmapparently I have made someone (no names) feel insecure about their abilities and/or knowledge of struts (hence the vicious personal attack) PS. I can't believe I had to write a book to explain this. However, I fear that someone (no names) still doesn't understand my point and may resort to sending a mean and hateful e-mail with my name blasted on the subject line and ..doh!!! Too late ;) You're right Mark, that stove is pretty hot. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:options
insert line html:option value /html:option like this: html:select property=stateCode html:option value /html:option html:options collection=states_codes property=name labelProperty=value/ /html:select Actually html:option value / should do -Original Message- From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 2:52 PM To: [EMAIL PROTECTED] Subject: html:options Hi, I want in my drop down a blank record. This needs to be the default. This provides the user an option to not select anything( It is a null field). Is it possible to do this other than putting an empty string in the collection. How to set this blank string as the default(not affecting the user's selected value in the edit mode)? I hope I am clear. Jayaraman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help this newbie......
Have you look at the file struts-config.xml? The link is defined there Thx Leo -Original Message- From: Ketan Malekar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 9:21 AM To: [EMAIL PROTECTED] Subject: Help this newbie.. hi All, I want to use struts framework in my upcoming project. I ve gone thr' the documentation and it looks very impressive.. Ive downloaded examples given and are working fine on Tomcat with JBuilder. But frankly I didnt understand the flow... like whos calling whom. How link of registration.do redirects to registration.jsp? Can anbody please exaplain me the flow. I would really apreciate if u reply. please help this newbie. Cheers Ketan _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Storing date time stamp within html form
I use two variables on the form with respective get/set methods, Timestamp timestampDate; String stringDate; The user enter the date on the String field. On validate() method on the form I convert from String to Timestamp. If there is an exception the user gets invalid date format message, otherwise the Timestamp is populated, the action called, ... Curious to hear other approaches, Leo -Original Message- From: Hair, Jeffrey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 10:00 AM To: 'Struts Users Mailing List' Subject: RE: Storing date time stamp within html form I currently have an object (the ActionForm) that contains the Timestamp object and it is stored in the request. The problem comes when submiting the form to populate the Timestamp via struts. Struts throws an exception from Beans.populate because struts doesn't handle dates. How are other people processing dates via struts? jsh -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 5:04 PM To: 'Struts Users Mailing List' Subject: RE: Storing date time stamp within html form Importance: Low I can think of a couple of ways: 1. Store your dateCreated object as a request or session attribute and access it from your action form; 2. Pass it as a string and use the java.sql.Timestamp.valueOf() method to change it back to a Timestamp. Mark -Original Message- From: Hair, Jeffrey [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 2:49 PM To: Struts User Mailing List (E-mail) Subject: Storing date time stamp within html form I'm trying to preserve the date time stamp of an object by storing the value in an html element and have struts automatically populate my ActionForm object with the value upon submit. Specifically, I have an object of type java.sql.Timestamp contained within my ActionForm. My jsp code is this: html:form action=actionMapping html:hidden property=dateCreated/ ... /html:form This works fine for writing the hidden html but an exception is thrown when the form is submitted. I'm looking into using jakarta's Datetime taglib in combination with struts. Has anyone else crossed this that is able to give an example or a direction that will work? Unfortunately, changing my ActionForm attribute to be of type String instead of Date is not an option. Thanx, jsh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help: Please do help me
We use option 1. Our UserAction extends Action and checks for session value user_id. If a particular action needs to verify if the user had logged in (meaning the login action had setup user_id), that action should extend UserAction. I don't see redundancy of code here, do you? Leo -Original Message- From: vivek shrivastava [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:23 PM To: [EMAIL PROTECTED] Subject: Need Help: Please do help me Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use CheckLogon tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Pagination
or from Jakarta http://jakarta.apache.org/taglibs/doc/page-doc/intro.html -Original Message- From: Mark Nichols [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Re: Pagination This is a little different than you describe but it may help you: http://jsptags.com/tags/navigation/pager/ HTH, /\/\ark From: Chen, Dean (Zhun) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Pagination Date: Tue, 30 Apr 2002 11:56:04 -0400 Hi, I've got pagination to work with struts. After a user fills out a form clicks submit, the Action class parses the query invokes a stored procedure, which in turn fills the bean. If the user specified 10 items per page, the resultset will stop after 10 iterations. The correct 10 items will be displayed on the following JSP. My issue is that on the JSP, when I click Next, the users settings does not get passed to the Action class. My question is, how do I keep a users settings persistent across multiple pages? Should I use session scope (currently request scope) or should I use hidden forms? I would appreciate any sample sites using struts that implemented pagination. Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Getting index inside iterate / pager tag
have you try ti use indexId? logic:iterate id=results name=nameSearchResults scope=session indexId=inx type=dhs.vcm.vis.form.NameSearchResultsForm indexId = The name of a page scope JSP bean that will contain the current index of the collection on each iteration. I don't have a sample code, but I saw it before posted in the list Thx Leo -Original Message- From: Struts Developer [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 3:13 PM To: [EMAIL PROTECTED] Subject: Getting index inside iterate / pager tag All - I am trying to get the index of the current row inside an iterate tag so that a link on that row properly identifies itself to the subsequent action class. However, all I get is a Class Not Found error pointing to the collection I am iterating. Here is my code: logic:iterate id=results name=nameSearchResults scope=session type=dhs.vcm.vis.form.NameSearchResultsForm pg:item dhshtml:row oddColor=#ff evenColor=#ff tdnbsp;/td td html:link page='%= NameSearch/Details?selectedClient= + nameSearchResults.getIndex() %' bean:write name=results property=clientName/ /html:link /td tdbean:write name=results property=clientAddress//td tdbean:write name=results property=clientCity//td tdbean:write name=results property=clientState//td tdbean:write name=results property=clientBirthdate//td tdbean:write name=results property=clientSSN//td /dhshtml:row /pg:item /logic:iterate I have tried using both nameSearchResults and results followed by the getIndex() call. What am I screwing up? TIA, /\/\ark _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Getting index inside iterate / pager tag
Since indexId defines the name on the JSP bean you can use it as any other bean. !-- defining it -- logic:iterate id=results name=nameSearchResults scope=session indexId=inx type=dhs.vcm.vis.form.NameSearchResultsForm !-- write index number -- bean:write name=inx/ !-- use it on html:link - NOT sure about this -- html:link page='%= NameSearch/Details?selectedClient= + inx %' !-- or it might be -- html:link page='%= NameSearch/Details?selectedClient= + bean:write name=inx/ %' Try it out. Leo -Original Message- From: Struts Developer [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 3:43 PM To: [EMAIL PROTECTED] Subject: Re: Getting index inside iterate / pager tag Okay, I looked in the documentation and found that indexId is The name of the scripting variable to be exposed as the current index. What scripting variable? A new one in my JSP? Something on a bean perchance? Are there any examples? Why is it that javadocs are void of sample code? mark:sigh/, /\/\ark From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Getting index inside iterate / pager tag Date: Mon, 29 Apr 2002 15:17:47 -0400 Look in the docs for indexId! Dave Struts Developer [EMAIL PROTECTED] on 04/29/2002 03:13:08 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Getting index inside iterate / pager tag All - I am trying to get the index of the current row inside an iterate tag so that a link on that row properly identifies itself to the subsequent action class. However, all I get is a Class Not Found error pointing to the collection I am iterating. Here is my code: logic:iterate id=results name=nameSearchResults scope=session type=dhs.vcm.vis.form.NameSearchResultsForm pg:item dhshtml:row oddColor=#ff evenColor=#ff tdnbsp;/td td html:link page='%= NameSearch/Details?selectedClient= + nameSearchResults.getIndex() %' bean:write name=results property=clientName/ /html:link /td tdbean:write name=results property=clientAddress//td tdbean:write name=results property=clientCity//td tdbean:write name=results property=clientState//td tdbean:write name=results property=clientBirthdate//td tdbean:write name=results property=clientSSN//td /dhshtml:row /pg:item /logic:iterate I have tried using both nameSearchResults and results followed by the getIndex() call. What am I screwing up? TIA, /\/\ark _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Popup Windows
what I have done is forwarding to a jsp page that opens a new window and self-close. It uses javaScript though. //struts-config.xml !-- Process a user logon -- action path=/logon_client type=com.client.logon.LogonAction name=logonForm scope=request validate=true input=/logon_client.jsp forward name=success path=/logon_client_succ.jsp/ /action // logon_client_succ.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleLogin/title link rel=STYLESHEET type=text/css href=/css/wms.css /head body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 script language=JavaScript type=text/javascript !-- window.opener.newWindow('/netWorth.do','MainWindow',1,1,1,1,1,1,777,460,100,100); self.close(); //--/script /body /html -Original Message- From: Villegas, Courtney [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 4:16 PM To: 'Struts Users Mailing List' Subject: Popup Windows I am new to Struts usage and am trying to determine if it is possible to open a new browser window (an control its appearance) via an actionforward method. I realize that the Action itself has no idea of the front end (the HTML/Javascript pages), but I am only familiar with opening new window and changing their appearance in Javascript. Is there a way to do this without Javascript? I have contemplated using the body:onload in my jsp page, but have found no way to manipulate the window once it is open (I am working in IE 5.0). Any help would be greatly appreciated. Thanks Courtney Villegas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logic equals problem
also /logic:notEqual/ shouldn't it be /logic:notEqual -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:38 AM To: Struts Users Mailing List Subject: RE: logic equals problem This may be a stupid question, but is there a / at the end of the opening logic:notEqual tag? Should that NOT be there. Doesn't that close the tag? Chuck logic:notEqual name=data property=sortColumns.currencyCode value=%=currencyBlock%/ is it possible this is comparing string objects as opposed to string values :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] -Original Message- From: Lister, Tom (ANTS) [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 11:14 To: 'Struts Users Mailing List' Subject: logic equals problem Hi we can't get logic:notEqual to work in the following snippet We are trying to perform an action on the change of a string currency variable the logic not equal always evaluates to true even though we set the current value within the loop I am i missing something obvious here? bean:define id=dataSet name=%=ants.mo.sabre.web.Constants.EXPOSURECONCENTRATIONEXPORT_KEY% property=data/ %! String currencyBlock =; % logic:iterate id=data name=dataSet bean:define id=dataPoints name=data property=dataPoints/ logic:notEqual name=data property=sortColumns.currencyCode value=%=currencyBlock%/ tr td colspan=9/td logic:iterate id=dataPoint name=dataPoints bean:define id=dataValue name=dataPoint property=value type=ants.mo.sabre.ExposureConcentration.ExposureConcentrationDPVO/ th nowrap=truebean:write name=dataValue property=dataPointDate//th /logic:iterate /tr % ExposureConcentrationExportVO dataTemp = (ExposureConcentrationExportVO) data; currencyBlock = ( (ants.mo.sabre.ExposureConcentration.ExposureConcentrationSensitivitySortVO) dataTemp.getSortColumns()).getCurrencyCode(); System.out.println(currencyBlock); % /logic:notEqual/ :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the FSA *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: some help ...
Great! Welcome to the list. Don't be scare. Today's Friday. BEER'S day. Let's have some. I am sure Mark agrees with that. Anyway don't forget to browse The Jakarta http://jakarta.apache.org/struts/index.html I particular like the Javadocs http://jakarta.apache.org/struts/doc-1.0.2/api/index.html this if for Struts 1.0.2 though Since you are starting now you shoul get Struts 1.1 Cheers, Leo -Original Message- From: reshma deshpande [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 4:57 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: some help ... you people scare me !! but now that since i have already bitten .. i guess i'll have to chew it too .. kindly help mw with that :-) Juan Alvarado (Struts List) [EMAIL PROTECTED] wrote: Rahsma, have you ever heard of the phrase I've bitten off way more than I can chew??? ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: reshma deshpande [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 4:22 PM To: [EMAIL PROTECTED] Subject: some help ... Hi! I have a little question, if you could please answer it... I am pretty new to the Java environment (just have read some tutorials on Java, JSP etc) but dont have much of a real-time coding experience. I have got a job, and I would soon be working on Struts. Before I start working on it, I would like to utilize my time well in learning what would be most useful for me, from the point of view of starting with Struts and being comfortable in the same, as soon as possible. I have around 15-20 days for that. Could you please suggest what I should start with, and also a few tutorials and books. (in short, could you please tell me what I should study for the next 15-20 days and from where) that would help me the most for starting off comfortably with Struts.. Not many people know about Struts (infact, as of now I too dont :) and hence I am pretty much lost and confused with what how to study... Any help from you would be greatly appreciated !! Thanks! Reshma - Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: NEWBIE HELP
That is TV generation. They don't like to read it they want to see it. There is nothing to do with where you from. RTFM please! -Original Message- From: Barry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 11:02 AM To: Struts Users Mailing List Subject: Re: NEWBIE HELP Probably one of those H1 visa schools in India:) - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Harpreet Singh' [EMAIL PROTECTED] Cc: Struts (E-mail) [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 10:33 AM Subject: RE: NEWBIE HELP Interpret as you will; I am not arrogant. I am a jokester. Be that as it may, most, if not all, CS programs teach Java as the beginning language. Further, to set up Tomcat, one merely has to read the accompanying documentation. If I expect our universities to produce literate graduates with the ability to problem-solve, then call me arrogant. Mark -Original Message- From: Harpreet Singh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 9:20 AM To: [EMAIL PROTECTED] Subject: Re: NEWBIE HELP Mark there is no need to be arrogant, remember someday there could be reversal of roles :) -Harpreet - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 6:49 PM Subject: Re: NEWBIE HELP ;-) I WOULD like to know what university is graduating CS students who can't install and configure Tomcat! (Maybe they don't teach RTFM/STFW anymore?) Mark -Original Message- From: Godbey, David [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 8:44 AM To: [EMAIL PROTECTED] Subject: Re: NEWBIE HELP Now now, Mark, behave yourself! -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 6:02 AM To: [EMAIL PROTECTED] Subject: Re: NEWBIE HELP Thank you for your message. I suddenly feel much more job security. Mark -Original Message- From: John G Casey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 3:16 AM Hey all, I am a university student, in my last year of BS in CS and I have been working with Java for a few years. But I have to say I am finding my self quite lost with Tomcat deployment. I meen I can code a Servlet ( Well I know the rules and all) but to actually get it working on the server is a TOTALLY different story for me. Can anyone point me in the right direction so I can FINALLY get myself working. Thanks ALL Cheers, John ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff SERVLET-INTEREST. Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff SERVLET-INTEREST. Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff SERVLET-INTEREST. Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff SERVLET-INTEREST. Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: No WRAP attribute in html:textarea?
If you want just one line use html:text instead. It won't wrap. I don't see a wrap attribute for textarea on Struts 1.0 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 1:30 PM To: [EMAIL PROTECTED] Subject: No WRAP attribute in html:textarea? Hello, Is there any way to coerce the html:textarea tag to render a WRAP attribute in the resulting textarea tag? I'm using Struts 1.0. Is this perhaps covered in Struts 1.1? Thanks, David David A. Ventimiglia Wells Fargo Private Client Services (415) 396-0414 (work) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Inside WEB-INF or ourside WEB-INF? Struts security.
Maybe because they are just samples. -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 6:21 PM To: [EMAIL PROTECTED] Subject: Inside WEB-INF or ourside WEB-INF? Struts security. Most sample apps have the jsp pages and images outside the WEB-INF. Why? Isn't it more secure inside? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing parameters
use a flag variable in the form -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 10:09 AM To: Struts Group (E-mail) Subject: Passing parameters Hi, I am going to a jsp(A) from two different jsps(B,C). Now, when I click 'save' on A I want to go back to B or C, .i.e. to where I came from. I send the source as a request parameter which is visible in action class of A. Now, when I am done, can i pass the source thru mapping.findForward()? Thnx, GB -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action without a form.
I don't use form here. action path=/jobopp/sortOpportunity type=SortJobOppAction scope=request forward name=success path=/jobopp/listSetup.do / /action -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:09 PM To: [EMAIL PROTECTED] Subject: Re: Action without a form. Use an usual HTML form. Adolfo From: Jennings, Christofer J. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Action without a form. Date: Mon, 15 Apr 2002 12:05:17 -0700 I'd like to have an action without an associated form. Any suggestions? Many thanks, boz _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action without a form.
Yes, it is null. -Original Message- From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:14 PM To: 'Struts Users Mailing List' Subject: RE: Action without a form. Does this result in null being passed for the ActionForm parameter of perform? ,boz -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] I don't use form here. action path=/jobopp/sortOpportunity type=SortJobOppAction scope=request forward name=success path=/jobopp/listSetup.do / /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to avoid having to use these scriplets in struts1.0.2?
Try logic:present logic:present name=payrollChangeForm property=voluntaryReason/ TRTDVoluntary Reason:/TDTDbean:write name=payrollChangeForm property=voluntaryReason//TD/TR /logic:present -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 5:53 PM To: Struts List Subject: How to avoid having to use these scriplets in struts1.0.2? To give a concrete example of what I want to avoid...I've tried various tags for 1.0 but I'm not sure what does the trick. I want to do the following using tags instead of scriplets... % if ( payForm.getVoluntaryReason() != null !payForm.getVoluntaryReason().equals() ) { % TRTDVoluntary Reason:/TDTDbean:write name=payrollChangeForm property=voluntaryReason//TD/TR %} if ( payForm.getInvoluntaryReason() != null !payForm.getInvoluntaryReason().equals() ) { % TRTDInvoluntary Reason:/TDTDbean:write name=payrollChangeForm property=involuntaryReason//TD/TR % }% Thanks for any help. -- Rick mailto:[EMAIL PROTECTED] I bet a fun thing would be to go way back in time to where there was going to be an eclipse and tell the cave men, 'If I have come to destroy you, may the sun be blotted out from the sky.' Just then the eclipse would start, and they'd probably try to kill you or something, but then you could explain about the rotation of the moon and all, and everyone would get a good laugh. -Jack Handey -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: validation=true
With validate=true the controler validates the form (calls form.validate) before instanciate the action. The value is speed. Make sure to set input on action input - Context-relative path of the input form to which control should be returned if a validation error is encountered -Original Message- From: Michael J. Godfrey [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 5:07 PM To: Struts Users Mailing List Subject: RE: validation=true Excellent, I just subscribed to this group today so I appologize for missing the previous posts. I do NOT understand the value of having a validate=true at all then. Can someone enlighten me? I like alternative 2 (form.validate()). And I am now using that. I still cant wrap my mind around having a validate=true and firing it on the FIRST load..its kooky. just my 2 cents. -Michael -Original Message- From: Ady Das-O'Toole [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 2:28 PM To: Struts Users Mailing List Subject: RE: validation=true Michael coincidentally enough the last few threads have addressed the same issue. To summarize you could do one of two things: 1. Define 2 identical action-mappings in your struts-config - Call the first one firstVisitSomething...Action and set validate=false Now when a user clicks on the link to go to your page for the first time you go here. - The second action-mapping will have validate=true, and your form action in your jsp will post to this action-mapping 2. The other way to do it is to set validate=false in your action mapping, then call form.validate() in your Action object when the mode is submit or some such. -Original Message- From: Michael J. Godfrey [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 4:16 PM To: Struts (E-mail) Subject: validation=true Greetings, I am just starting to write a test app to learn struts. I have a validation=true setting in struts-config.xml. When this is true, the validation happens when I OPEN a page. I have validation that is checking for existance of values, etc. For example. A login page with loginID, and password as fields. In the validate() I am checking for loginID == null and loginID.length() 1 etc etc. This is failing right out of the chute because the validation is firing when the darn thing loads. What am I doing wrong? I have read the jakarta FAQ's etc stating that low budget validation SHOULD be done in validate(). -Michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: I'm stuck on the html:submit
This is how I would do: html:form action=/whatever.do table ... tr td ID=smallhtml:submit property=add value=Add /td td ID=smallhtml:submit property=update value=Update /td td ID=smallhtml:submit onclick=return confirm('Confirm Delete?'); property=delete value=Delete /td ... /table /html:form This way, only delete button will pop the confirm window. Leo. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 11:12 AM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: I'm stuck on the html:submit Hi James: But what if you have multiple html:submit's in your jsp... And supposing only 1 of those submit button's need to have this javascript confirm() popup. How does the onSubmit() at the form level know which submit button-property was set?It would need to do an if statement and only popup the question if a certain submit was set: For example: Suppose I have the following in my html form: html:form onSubmit=checkDeleteConfirmation() table ... tr td ID=smallhtml:submit property=add value=Add /td td ID=smallhtml:submit property=update value=Update /td td ID=smallhtml:submit property=delete value=Delete /td ... /table /html:form Supposing I only want to pop the question when they hit delete: script language=JavaScript function checkDeleteConfirmation() { // // How can I determine if they clicked on the delete button since onSubmit() // gets called for every single submit type button? } /script thanks, Theron James Mitchell To: Struts Users Mailing List jmitchtx@tel[EMAIL PROTECTED] ocity.com cc: Subject: RE: I'm stuck on the html:submit 04/02/02 08:52 PM Please respond to Struts Users Mailing List Ok. I was going to make another suggestion based on what you posted earlier. You don't actually need any javascript in your html:submit tag. The onSubmit action is handled by the html:form onSubmit=return callMyFunction() Anyway, you could have tested your function call by substituting html:form action=/whatever onSubmit=return true then change it to false and test again if that passes, then put return true on the first line of your javascript function. Working example: -- !-- pieces taken from the struts example -- %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/app.tldprefix=app % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:form action=/saveRegistration onsubmit=return doMeFirst('what you need') table border=0 width=100% tr th align=right bean:message key=prompt.fullName/ /th td align=left html:text property=fullName size=50/ /td /tr /table html:submit value=Submit/ /html:form SCRIPT LANGUAGE=javascript !-- function doMeFirst( param ){ if (param == what I was expecting) { return true; }else{ return false; } } //-- /SCRIPT JM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 10:58 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: RE: I'm stuck on the html:submit I apologize James, I ended up doing it a totally different way (without using html:button) which seems to work nowI did not save the prior way that I was having problems with :-( theron James Mitchell To: Struts Users Mailing List jmitchtx@tel [EMAIL PROTECTED] ocity.com cc: Subject: RE: I'm stuck on the html:submit 04/02/02 07:26 PM Please respond to Struts Users Mailing List Could you post your entire jsp code to have a better look? JM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:51 PM To: Struts Users Mailing List Subject: I'm stuck on the html:submit I know with the html:form you have the onSubmit() javascript handler in which the following will work: script language=JavaScript function unlinkConfirmation() { if (confirm(Remove employee link?)) return true; else return false; }
RE: html:link to Action
you forgot the .do html:link page=/myAction.do -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 12:43 PM To: [EMAIL PROTECTED] Subject: html:link to Action Hi, How can i bind a html:link to an Action derived class ? html:link action(or page)=/myAction dit not work Wolfgang -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: sorting in logic:iterate
As far as I know you have to sort the arraylist on the action class before forward to JSP page. logic:iterate is the View. You have to sort on the Model. -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 3:42 PM To: Struts Group (E-mail) Subject: sorting in logic:iterate Hi, I am using logic:iterate to display values from an arraylist of beans. Is it possible to sort the output based on some bean property? Thnx, GB -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: javax.servlet.jsp.JspException: No getter method for property action of bean org .apache.struts.taglib.html.BEAN
Your html:form is trying to use a field action that is not part of your form declared on struts-config.xml. -Original Message- From: Murali SN Rao [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 8:41 AM To: [EMAIL PROTECTED] Subject: javax.servlet.jsp.JspException: No getter method for property action of bean org .apache.struts.taglib.html.BEAN Hi, I am implementing Struts on Weblogic 6 and i am getting the error: Feb 20, 2002 6:19:43 PM IST Error HTTP [WebAppServletContext(4865448,Defa ultWebApp,/DefaultWebApp)] Root cause of ServletException javax.servlet.jsp.JspException: No getter method for property action of bean org .apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja va:188) at jsp_servlet._psychology.__viewclients._jspService(__viewclients.java: 162) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:2495) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:2204) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) pls reply..immediately Murali -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-config.xml Explanation Needed - Ryan Norman
Ryan, . Go to http://jakarta.apache.org/struts/doc-1.0.2/api/index.html read Class ActionMapping . ActionMapping is the object that holds the value of action tag validate is explained here . same for ActionFormBean only name and type. . html:form action=X with the action X is equal to path in action + .do have fun, Leonardo Maciel -Original Message- From: Ryan Norman [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 12:40 PM To: Struts User Mailing List Subject: struts-config.xml Explanation Needed - Ryan Norman Hi, I am Ryan Norman. I started with struts about a week ago. I went through the documentation. Still I could not understand some portions of struts. Can somebody explain me the following: . Dissection of this tag. !-- Add User action -- action path=/addUser type=strutstest1.SystemUserAction name=userForm scope=request input=/admin/dsp_User.jsp validate=false forward name=success path=/admin/dsp_User.jsp/ forward name=failure path=/admin/search/dsp_SearchUser.jsp/ /action . What am I achieving by giving the validate=false in the above tag. . Dissection of this tag form-bean name=userForm type=strutstest1.SystemUserForm / What is the association of of the html:form action=X with the action tag. Thanks in advance Ryan Norman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: error
I thought that by going through the login.jsp (which invokes my actionservlet) Do you mean going through the login.do ? -Original Message- From: Jose Casas [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:40 PM To: 'Struts Users Mailing List' Subject: error Hello, It's me again. Yesterday and this morning I posed a question about a bean:define tag problem. I was getting a Cannot find bean logonForm in scope null error. Somebody told me that i was getting this error because I was accessing the jsp directly. Well, now I'm using a login.jsp which validates that I'm in a database, if I am then it directs me to another jsp(f_Relocation.jsp). In this jsp, I have the bean:define tag. The code is as follows: In jsp: bean:define id=somebean name=logonForm property=selectBox1List type=java.util.ArrayList/ in struts-config file: form-bean name=logonForm type=com.walmart.telecomorder.formbeans.RelocationForm / action path=/logon type=com.walmart.telecomorder.formbeans.RelocationAction name=logonForm scope=session input=f_Relocation.jsp forward name=success path=/success.jsp / forward name=failure path=/failure.jsp / /action Does anybody have an idea as to why I'm getting the following eror? Cannot find bean logonForm in scope null error I thought that by going through the login.jsp (which invokes my actionservlet) and being directed from it to the f_Relcoation.jsp, I would avoid this error. Can somebody help? Thanks. Jose Casas E-Commerce Applications (501) 277-3112 [EMAIL PROTECTED] ** Notice: The area code for the Wal-Mart General Office has changed from 501 to 479. Please make sure that you are dialing 479 when making calls to any General Office location. ** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: error
Jose, What we are trying to say is, in order to be able to see struts bean on your jsp page you need to make the request through Struts. you should call .do on your browser - http://localhost:8080/login.do The controler (actionservlet) will look into your struts-config and get the action /login. The action has the LoginAction as the Model and login.jsp as the View. If you want your login.jsp to see your struts bean, your config file should look like this. action path=/login type=com.walmart.telecomorder.formbeans.LoginAction name=loginForm forward name=success path=/login.jsp / /action good luck, Leonardo -Original Message- From: Jose Casas [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 4:07 PM To: 'Struts Users Mailing List' Subject: error Actually, no. this is what I have in my login.jsp html:form action=login.do and this is in the struts-config file: form-bean name=loginForm type=com.walmart.telecomorder.formbeans.LoginForm / action path=/login type=com.walmart.telecomorder.formbeans.LoginAction name=loginForm forward name=success path=/f_Relocation.jsp / forward name=failure path=/failure.jsp / /action Am I doing this all wrong? Thanks. I thought that by going through the login.jsp (which invokes my actionservlet) Do you mean going through the login.do ? -Original Message- From: Jose Casas [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:40 PM To: 'Struts Users Mailing List' Subject: error Hello, It's me again. Yesterday and this morning I posed a question about a bean:define tagproblem. I was getting a Cannot find bean logonForm in scope null error. Somebody told me that i was getting this error because I was accessing thejsp directly. Well, now I'm using a login.jsp which validates that I'm in adatabase, if I am then it directs me to another jsp(f_Relocation.jsp). In this jsp, I have the bean:define tag. The code is as follows: In jsp: bean:define id=somebean name=logonForm property=selectBox1List type=java.util.ArrayList/ in struts-config file: form-bean name=logonForm type=com.walmart.telecomorder.formbeans.RelocationForm / action path=/logon type=com.walmart.telecomorder.formbeans.RelocationAction name=logonForm scope=session input=f_Relocation.jsp forward name=success path=/success.jsp / forward name=failure path=/failure.jsp / /action Does anybody have an idea as to why I'm getting the following eror? Cannot find bean logonForm in scope null error I thought that by going through the login.jsp (which invokes my actionservlet) and being directed from it to the f_Relcoation.jsp, I wouldavoid this error.Can somebody help? Thanks. ** Notice: The area code for the Wal-Mart General Office has changed from 501 to 479. Please make sure that you are dialing 479 when making calls to any General Office location. ** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Q] Using html:image tag for submit button
it works fine for me ... html:form action=/pub_logon ... html:image property=camp src=/images/butn_go_white_bg.gif alt=campaign / ... -Original Message- From: Park, Dongwon [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 5:06 PM To: Struts Users Mailing List Subject: [Q] Using html:image tag for submit button All, I am trying to use html:image for submit button but it is not working for me. Anybody has some simple example or know better way to make submit button with image ? Dongwon Park -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to use one image as submit button?
html:img page="/image/ok.gif" name="save" / -Original Message- From: Laker,Nan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 6:44 AM To: Struts Users Mailing List Subject: How to use one image as submit button? Hi all, i want to use one image as submit button. in jsp file,i code the following: html:submit property="save" img page="/image/ok.gif"/ /html:submit but while executing,generated the following source code: input type="submit" name="save" value="img page="/image/ok.gif"/" so,it cannot display normally. how to solve the problem? Thanks in advance Laker -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: What the best approach to access RDB within struts (no EJB) ?
DAO = Data Access Object http://java.sun.com/blueprints/patterns/j2ee_patterns/data_access_object/ Leo -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 5:26 PM To: 'Struts Users Mailing List' Subject: RE: What the best approach to access RDB within struts (no EJB) ? Here are some O/R tools I've seen mentioned on the mailing list and other places. I don't know which ones are the best. *Apache:Torque http://jakarta.apache.org/turbine/torque/index.html *ChiMu:FreeForm http://www.chimu.com/projects/form/ *Exolab.org:Castor http://castor.exolab.org/ *JCorporate:Expresso http://www.opensourcedirectory.org/projects/expresso/ *Persistence Layer http://artyomr.narod.ru/ *SourceForge:DataBind http://databind.sf.net/ *SourceForge:jRelationalFramework http://jrf.sourceforge.net/ *SourceForge:ObjectRelationalBridge http://objectbridge.sourceforge.net/ *sql2java http://www.bitmechanic.com/projects/s2j/ *Sun Entity JavaBeans *Sun:JDO ChiMu:Form Objectwave:Jgrinder http://www.objectwave.com/html/Main.html Thought Inc:CoCoBase http://www.sun.com/forte/ffj/resources/articles/thought.html Webgain:Toplink http://www.webgain.com/products/toplink/ *=free -Original Message- From: Patrick Schilling [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:16 PM To: Struts Users Mailing List Subject: RE: What the best approach to access RDB within struts (no EJB) ? I have not used it personally, but this looks interesting. Anyone used it? http://dbforms.org/ One big negative for me is it only supports one database per web application, otherwise it looks pretty cool. -Pat -Original Message- From: Annie Chang [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: What the best approach to access RDB within struts (no EJB) ? I'm searching for the best approach to access relational database within struts. Could you give me some suggestion? Thanks in adv. I do not want to use EJB. Any free framework, tools, whatever can help me? What about DAO and/or JDO? What's DAO? Where can I get a comprehensive example? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem using button instead of submit
Kelly, The difference between html:submit and input is: Struts html:submit automatically populates the form for you while input you have to explicitly populate it Your JavaScript must be something like this: function exeBtnSai(form) { form.action=beans.TstJspCtaAction.do; for (var i=0; i document.forms[x].elements.length; i++) { document.forms[x].elements[i].value = form.elements[i].value; } form.submit(); } where 'x' is the index of the form in your page. If you have just one form 'x' = 0. or forms[x] can be the name of the form. boa sorte, Leonardo -Original Message- From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 9:36 AM To: 'Struts Users Mailing List' Subject: Problem using button instead of submit Hi folks, I'm new in the list, but i really need your help. I have the follwing problem: In my Jsp I have two buttons: btnCnf and btnSai. I'm using the framework struts and I'd like to obtain their values. I have a javascript which i call to submit the form. Everything works fine while i'm working inside Jbuilder and in the action i could obtain the button values. But when i test in the ie 5.0 env, it seems to ignore my setBtnCnf and setBtnSai in the ActionForm and I receive a null value to the buttons. See the code: In the jsp: TD COLSPAN=11 ROWSPAN=1 WIDTH=110 INPUT NAME=btnCnf TYPE=BUTTON TABINDEX=9 VALUE=Confirma SIZE=110 OnClick=exeCnf(this.form)br /TD TD /TD TD /TD TD COLSPAN=11 ROWSPAN=1 WIDTH=110 INPUT NAME=btnSai TYPE=BUTTON TABINDEX=10 VALUE=Sai SIZE=110 OnClick=exeBtnSai(this.form)br /TD In the javascript: function exeBtnSai(form) { form.action=beans.TstJspCtaAction.do; form.submit(); } function exeCnf(form) { form.action=beans.TstJspCtaAction.do; form.submit(); } It just works in the if i choose to put their type as submit, but I cant't use this here. Please, does anybody knows what the problem is. Thanks in advanced Kelly Prudente Pereira?xml:namespace prefix = o ns = urn:schemas-microsoft-com:office:office / Analista de Sistemas - NDS [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Fóton* Informática e Serviços Fone: (61) 328 5060 R.:222 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]