Re: Need some help
Ruben, After many trials, I finally got the page attribute to work. This is what I did. I am using a DynaValidatorForm so I created my own Form class and extended DynaValidatorForm. I only have one method in there; the validator method. Here is a copy of my source code public class ReviewRecordForm extends DynaValidatorForm { public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { String screen = request.getParameter(page); //set page property in form this.setPage(Integer.parseInt(request.getParameter(page))); //Call the Validator Framework ActionErrors errors = super.validate(mapping,request); return errors; } } In my validation.xml file, I added the page=X attribute to the field property line. (Where X is the page number). Here is a sample from my validation.xml file: field property=phaseSelected depends=required,isNotSelectOption page=0 arg0 key=label.revRec.phase/ /field field property=dispositionSelected depends=required,isNotSelectOption page=3 arg0 key=label.revRec.disposition/ /field I wrote the isNotSelectOption validation rule. I hope this helps Natalie Ruben Carvalho wrote: Did anyone work with Struts validation and the page attribute in the field tag? To validate different parts of the form? I'm really stucked in a moment and I can't get out of it. Thank you, RĂºben Carvalho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some help
Dear Natalie, 10 thank yous for your help. The problem was I wasn't calling the super.validate() method. You don't really need to set the page attribute inside your validate method. Your validate method has to look like this: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { return super.validate(mapping,request); } Now, inside every JSP you want to use with the form, you only have to set the property page: html:hidden property=page value=0 html:hidden property=page value=1 html:hidden property=page value=2 depending on witch JSP you are, 1st, 2nd or 3rd. Of course you can do it inside an Action too. As soon as I saw your validate method I slapped my front and said 3 bad words :) Many thanks again for your help. Ruben Carvalho -Mensagem original- De: Natalie D Rassmann [mailto:[EMAIL PROTECTED] Enviada: qui 18-09-2003 14:26 Para: Struts Users Mailing List Cc: Assunto: Re: Need some help Ruben, After many trials, I finally got the page attribute to work. This is what I did. I am using a DynaValidatorForm so I created my own Form class and extended DynaValidatorForm. I only have one method in there; the validator method. Here is a copy of my source code public class ReviewRecordForm extends DynaValidatorForm { public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { String screen = request.getParameter(page); //set page property in form this.setPage(Integer.parseInt(request.getParameter(page))); //Call the Validator Framework ActionErrors errors = super.validate(mapping,request); return errors; } } In my validation.xml file, I added the page=X attribute to the field property line. (Where X is the page number). Here is a sample from my validation.xml file: field property=phaseSelected depends=required,isNotSelectOption page=0 arg0 key=label.revRec.phase/ /field field property=dispositionSelected depends=required,isNotSelectOption page=3 arg0 key=label.revRec.disposition/ /field I wrote the isNotSelectOption validation rule. I hope this helps Natalie Ruben Carvalho wrote: Did anyone work with Struts validation and the page attribute in the field tag? To validate different parts of the form? I'm really stucked in a moment and I can't get out of it. Thank you, Rben Carvalho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need some help
Did anyone work with Struts validation and the page attribute in the field tag? To validate different parts of the form? I'm really stucked in a moment and I can't get out of it. Thank you, Rben Carvalho
Need some help
All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Thanks Asit **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need some help
Hi Asit, For testing have a look at http://strutstestcase.sourceforge.net/. For object mapping the commons-digester provides xml - object mapping. Ted Husted provides links to OR mapping tools that work with struts on his site, see http://www.husted.com/struts/links.htm#data_access Jon Ridgway -Original Message- From: Asit Kumar Padhi [mailto:[EMAIL PROTECTED]] Sent: 18 July 2002 10:59 To: Struts Users Mailing List Subject: Need some help All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Thanks Asit The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need some help
On Thu, 18 Jul 2002, Asit Kumar Padhi wrote: Date: Thu, 18 Jul 2002 15:29:28 +0530 From: Asit Kumar Padhi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Need some help All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Besides the Struts Test Case reference from another poster, you'll be interested to know that both Cactus and JUnit tests are included in the Struts sources, and can be run from the build.xml scripts. To see them, grab a nightly distribution of the sources http://jakarta.apache.org/builds/jakarta-struts/nightly/ and start at the test.junit and test.tomcat.all targets in the top-level build.xml file. Similar techniques can be used to incorporate tests of your own apps that are based on Struts. Thanks Asit Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need some help
hi , i don't know how some people say that they are new to the new and can ask such complex questions. ;-) is it humility ? - Original Message - From: Asit Kumar Padhi [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 3:29 PM Subject: Need some help All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Thanks Asit -- 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 some help
No, it is a trivialize the complexity tactic which makes you feel good momentarily. all in jest hemant - Original Message - From: avinash [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, July 19, 2002 1:14 AM Subject: Re: Need some help hi , i don't know how some people say that they are new to the new and can ask such complex questions. ;-) is it humility ? - Original Message - From: Asit Kumar Padhi [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, July 18, 2002 3:29 PM Subject: Need some help All, I am new to the Struts Framework.I am involved in extending the framework for Object Mapping and Testing (Cactus or JUnit).Can anyone tell me how to extend the Struts framework and integrate them.I want some good resources in this regards. Thanks Asit -- -- -- 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]
need some help ..
This may look silly but my lack of knowledge with struts is making me ask this question. Let us say I have a HTML form which retrieves a set of records from database depending upon the number of records the jsp will have to display HTML form field elements. How do i have to design my form bean. I am not sure how I can use automatic validation. I am not to keen on using automatic validation also, if there is a good solution for this problem. I want some sample code (jsp, action and action form class with struts-config.xml). Can someone help me on this ? thx. - RAJESH THOTA Indscape Softech Bangalore.
Re: Need some help with generateToken
I've got a question here. When you say somewhere in the Action, which action do you refer to ? The action that catches the form, or the action that forwards control to the form ? Thanks Jefferson Ted Husted wrote: Not much to it really. Before forwarding to the form that needs to be part of the transaction, just call saveToken(request); somewhere in the Action. If the form the Action forwards to uses the Struts html:form tag, it will write out the token for you as a hidden field, so there's nothing new to do. On the Action that catches the form, call isTokenValid(request); If the token is not valid, branch to an error page. Otherwise, call resetToken(). If another copy of the form tries to submit it again, now isTokenValid() will return false. The token is a random number that gets stored in the user's session. A second copy is suppose to be stored in the request. If the session and request tokens are missing or is different, then the transaction is out of synch. saveToken() puts it into the request. The Struts tags write it out as a hidden field or parameter. resetToken() clears it from the request. Loop closed. The Core J2EE Patterns book covers this and a ton of other handy strategies and patterns. Highly recommended. See the Struts Resource page for a link. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Daniel Jaffa wrote: Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- 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]
Need some help with generateToken
Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need some help with generateToken
Sorry they are methods not classes. isTokenValid, saveToken, generateToken - Original Message - From: Daniel Jaffa [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, May 17, 2002 1:55 PM Subject: Need some help with generateToken Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- 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 some help with generateToken
Not much to it really. Before forwarding to the form that needs to be part of the transaction, just call saveToken(request); somewhere in the Action. If the form the Action forwards to uses the Struts html:form tag, it will write out the token for you as a hidden field, so there's nothing new to do. On the Action that catches the form, call isTokenValid(request); If the token is not valid, branch to an error page. Otherwise, call resetToken(). If another copy of the form tries to submit it again, now isTokenValid() will return false. The token is a random number that gets stored in the user's session. A second copy is suppose to be stored in the request. If the session and request tokens are missing or is different, then the transaction is out of synch. saveToken() puts it into the request. The Struts tags write it out as a hidden field or parameter. resetToken() clears it from the request. Loop closed. The Core J2EE Patterns book covers this and a ton of other handy strategies and patterns. Highly recommended. See the Struts Resource page for a link. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Daniel Jaffa wrote: Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- 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 some help with generateToken
Thank you very much. Daniel Jaffa Java Developer -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 3:58 PM To: Struts Users Mailing List Subject: Re: Need some help with generateToken Not much to it really. Before forwarding to the form that needs to be part of the transaction, just call saveToken(request); somewhere in the Action. If the form the Action forwards to uses the Struts html:form tag, it will write out the token for you as a hidden field, so there's nothing new to do. On the Action that catches the form, call isTokenValid(request); If the token is not valid, branch to an error page. Otherwise, call resetToken(). If another copy of the form tries to submit it again, now isTokenValid() will return false. The token is a random number that gets stored in the user's session. A second copy is suppose to be stored in the request. If the session and request tokens are missing or is different, then the transaction is out of synch. saveToken() puts it into the request. The Struts tags write it out as a hidden field or parameter. resetToken() clears it from the request. Loop closed. The Core J2EE Patterns book covers this and a ton of other handy strategies and patterns. Highly recommended. See the Struts Resource page for a link. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Daniel Jaffa wrote: Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- 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 some help.......
Title: need some help... Niall Thanks for a quick response.I tried but got the following error. javax.servlet.ServletException: Cannot find bean jas in scope null Jiten -Original Message-From: Niall Pemberton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 2001 5:18 PMTo: [EMAIL PROTECTED]Subject: RE: need some help... "jas" is not in "session" scope - the iterator is creating it for each iteration (must be page scope?) - try it without the "scope": bean:write name="jas" property="attr"/ Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 23:57To: [EMAIL PROTECTED]Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id="jas" name="countBeanForm" property="mbeanOper" type="Ipseal.JbossOperationForm" scope="session" td align="center" bean:write name="jas" property="attr" scope="session"/ /td /logic:iterate property "mbeanOper" : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
need some help.......
Title: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id=jas name=countBeanForm property=mbeanOper type=Ipseal.JbossOperationForm scope=session td align=center bean:write name=jas property=attr scope=session/ /td /logic:iterate property mbeanOper : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
RE: need some help.......
Title: need some help... M...the iterator doesn't appear to becreating your "jas" bean from the elements of your array - the question is why? 1) Have you defined the logic taglib at the top of your jsp? %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % 2) Does the array returned by your getMbeanOper() method contain any nulls? Also...I've just noticed...are you saying the getAttr() method returns a String array - meaning you have a grid situation? If so you need an iterate within an iterate. Haven't done that but there are messages in the archive which talk about it. Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 15 June 2001 00:30To: [EMAIL PROTECTED]Subject: RE: need some help... Niall Thanks for a quick response.I tried but got the following error. javax.servlet.ServletException: Cannot find bean jas in scope null Jiten -Original Message-From: Niall Pemberton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 2001 5:18 PMTo: [EMAIL PROTECTED]Subject: RE: need some help... "jas" is not in "session" scope - the iterator is creating it for each iteration (must be page scope?) - try it without the "scope": bean:write name="jas" property="attr"/ Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 23:57To: [EMAIL PROTECTED]Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id="jas" name="countBeanForm" property="mbeanOper" type="Ipseal.JbossOperationForm" scope="session" td align="center" bean:write name="jas" property="attr" scope="session"/ /td /logic:iterate property "mbeanOper" : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
RE: need some help.......
Title: need some help... "jas" is not in "session" scope - the iterator is creating it for each iteration (must be page scope?) - try it without the "scope": bean:write name="jas" property="attr"/ Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 23:57To: [EMAIL PROTECTED]Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id="jas" name="countBeanForm" property="mbeanOper" type="Ipseal.JbossOperationForm" scope="session" td align="center" bean:write name="jas" property="attr" scope="session"/ /td /logic:iterate property "mbeanOper" : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
RE: need some help.......
There was a string of nightly builds of Struts a couple of months ago where the iterate tag had a bug (not creating the id item). This was fixed -- are you trying this with a recent build like 1.0-b3? Craig On Thu, 14 Jun 2001, Niall Pemberton wrote: need some help...M...the iterator doesn't appear to be creating your jas bean from the elements of your array - the question is why? 1) Have you defined the logic taglib at the top of your jsp? %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % 2) Does the array returned by your getMbeanOper() method contain any nulls? Also...I've just noticed...are you saying the getAttr() method returns a String array - meaning you have a grid situation? If so you need an iterate within an iterate. Haven't done that but there are messages in the archive which talk about it. Niall -Original Message- From: Jiten Mohanty [mailto:[EMAIL PROTECTED]] Sent: 15 June 2001 00:30 To: [EMAIL PROTECTED] Subject: RE: need some help... Niall Thanks for a quick response.I tried but got the following error. javax.servlet.ServletException: Cannot find bean jas in scope null Jiten -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 5:18 PM To: [EMAIL PROTECTED] Subject: RE: need some help... jas is not in session scope - the iterator is creating it for each iteration (must be page scope?) - try it without the scope: bean:write name=jas property=attr/ Niall -Original Message- From: Jiten Mohanty [mailto:[EMAIL PROTECTED]] Sent: 14 June 2001 23:57 To: [EMAIL PROTECTED] Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id=jas name=countBeanForm property=mbeanOper type=Ipseal.JbossOperationForm scope=session td align=center bean:write name=jas property=attr scope=session/ /td /logic:iterate property mbeanOper : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_ 0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
RE: need some help.......
Title: need some help... Hey Niall, You are the man..I got it running.Your suggestion about the nested iteration worked fine...Thanks buddy.I was trying hard to get this running.Saved my day. Have a nice evening. Jiten Soft. Engineer Ipseal Inc. Denver, Colorado -Original Message-From: Niall Pemberton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 2001 6:08 PMTo: [EMAIL PROTECTED]Subject: RE: need some help... M...the iterator doesn't appear to becreating your "jas" bean from the elements of your array - the question is why? 1) Have you defined the logic taglib at the top of your jsp? %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % 2) Does the array returned by your getMbeanOper() method contain any nulls? Also...I've just noticed...are you saying the getAttr() method returns a String array - meaning you have a grid situation? If so you need an iterate within an iterate. Haven't done that but there are messages in the archive which talk about it. Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 15 June 2001 00:30To: [EMAIL PROTECTED]Subject: RE: need some help... Niall Thanks for a quick response.I tried but got the following error. javax.servlet.ServletException: Cannot find bean jas in scope null Jiten -Original Message-From: Niall Pemberton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 2001 5:18 PMTo: [EMAIL PROTECTED]Subject: RE: need some help... "jas" is not in "session" scope - the iterator is creating it for each iteration (must be page scope?) - try it without the "scope": bean:write name="jas" property="attr"/ Niall -Original Message-From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 23:57To: [EMAIL PROTECTED]Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id="jas" name="countBeanForm" property="mbeanOper" type="Ipseal.JbossOperationForm" scope="session" td align="center" bean:write name="jas" property="attr" scope="session"/ /td /logic:iterate property "mbeanOper" : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
RE: need some help.......
Title: RE: need some help... Craig, Thanks for the response.I got it running Jiten -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 6:21 PM To: [EMAIL PROTECTED] Subject: RE: need some help... There was a string of nightly builds of Struts a couple of months ago where the iterate tag had a bug (not creating the id item). This was fixed -- are you trying this with a recent build like 1.0-b3? Craig On Thu, 14 Jun 2001, Niall Pemberton wrote: need some help...M...the iterator doesn't appear to be creating your jas bean from the elements of your array - the question is why? 1) Have you defined the logic taglib at the top of your jsp? %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % 2) Does the array returned by your getMbeanOper() method contain any nulls? Also...I've just noticed...are you saying the getAttr() method returns a String array - meaning you have a grid situation? If so you need an iterate within an iterate. Haven't done that but there are messages in the archive which talk about it. Niall -Original Message- From: Jiten Mohanty [mailto:[EMAIL PROTECTED]] Sent: 15 June 2001 00:30 To: [EMAIL PROTECTED] Subject: RE: need some help... Niall Thanks for a quick response.I tried but got the following error. javax.servlet.ServletException: Cannot find bean jas in scope null Jiten -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 5:18 PM To: [EMAIL PROTECTED] Subject: RE: need some help... jas is not in session scope - the iterator is creating it for each iteration (must be page scope?) - try it without the scope: bean:write name=jas property=attr/ Niall -Original Message- From: Jiten Mohanty [mailto:[EMAIL PROTECTED]] Sent: 14 June 2001 23:57 To: [EMAIL PROTECTED] Subject: need some help... Hi folks I am trying to iterate through a array of objects.Here is the code.. logic:iterate id=jas name=countBeanForm property=mbeanOper type=Ipseal.JbossOperationForm scope=session td align=center bean:write name=jas property=attr scope=session/ /td /logic:iterate property mbeanOper : returns array[objects] Each Object has a property called Attr[String](set get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error.. Error: 500 Location: /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean jas in scope session at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_ 0005fcount_0002ejspbean_0005fcount_jsp_44.java:299) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) and on.. Can some body help on this. Jiten Software Enginer
Need some help please
Hi, I have the following code in the iterate tag: struts:enumerate id="product" name="dispProductsBean" property="products" tr td align="left" struts:htmlProperty name="product" property="productID"/ /td td align="left" struts:radio name="product" property="productID" value="productID" / /td td align="left" % String pID = "dispCategories.do?id=4"; % struts:link href="%= pID %" struts:htmlProperty name="product" property="name"/ /struts:link /td td align="left" struts:htmlProperty name="product" property="description"/ /td /tr /struts:enumerate How do I set the value of the radio button to the value of the struts:htmlProperty name="product" property="productID"/ Thanks Sharmila Pandith Software Engineer iXL Inc. phone: 212-500-5180 AIM: spandith Yahoo: spandith MSN: spandith This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately.
Re: Need some help please
On 1/19/2001 at 12:52 PM [EMAIL PROTECTED] wrote: How do I set the value of the radio button to the value of the struts:htmlProperty name="product" property="productID"/ Using the current builds, you would do something like this (taken from the example application). Build a bean to hold the collection of radio button options. Store it in the request context. %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.example.LabelValueBean("IMAP Protocol", "imap")); list.add(new org.apache.struts.example.LabelValueBean("POP3 Protocol", "pop3")); pageContext.setAttribute("serverTypes", list); % Reference the bean in the options tag. html:select property="subscription.type" html:options collection="serverTypes" property="value" labelProperty="label"/ /html:select In your case, I think it might be html:select property="dispProductsBean" html:options collection="property" property="productID"/ /html:select -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 425-0252; Fax 716 223-2506. -- http://www.husted.com/about/struts/