ActionForm reset() and redirect.
Hi My form has some boolean properties and I set them to false in the reset method. The Action that handles the form has redirect attribute as true, i.e if there is an error, it redirects to the same page that has the form with errors. When it redirects with errors, the form retains values for other properties except the boolean ones. What I can do to fix this? If I don't set the boolean properties to false in the reset method, the form works fine. Please help, thanks. Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionForm reset() and redirect.
Try putting in some logic where ever you are assigning the value... like if it is not set then set it to false... if it is already set don't touch it! HTH Nitesh -Original Message- From: Ben [mailto:[EMAIL PROTECTED] Sent: Monday, July 04, 2005 1:05 PM To: Struts Subject: ActionForm reset() and redirect. Hi My form has some boolean properties and I set them to false in the reset method. The Action that handles the form has redirect attribute as true, i.e if there is an error, it redirects to the same page that has the form with errors. When it redirects with errors, the form retains values for other properties except the boolean ones. What I can do to fix this? If I don't set the boolean properties to false in the reset method, the form works fine. Please help, thanks. Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts - checkbox control
Hi , Your example is very clear. It works fine. Thanks a lot Rafael, Erol Rafael Taboada <[EMAIL PROTECTED]> wrote: Hi, in ur ActionForm define: String[] chkRecords; //with setter and getter In ur jsp define checkbox with a multibox: list: ArrayList that it has all the records in order to list in ur jsp idRecord: id of each record in ur database Finally in ur Action class: String[] strRecords = myForm.getchkRecords(); for (int i = 0; i myDAO.deleteRecord(strRecords[i]); } My Actionclass extends DispatchAction and when I click delete button I call a specific "delete" method. This code is inside this method I hope it can help u -- Rafael Taboada Software Engineer Cell : +511-97753290 "No creo en el destino pues no me gusta tener la idea de controlar mi vida" __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
dynamic parameter
Hi All I want to have attribute page be dynamically loaded from bean:message like " flush="true" /> instead of - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
arraylist problem.
I have a condition where I have an arraylist(must) containing a bean and i have to display it in my jsp. I cannot use logic:iterate since if the arraylist does not contain the bean, the controls are not displayed at all. (I have approx 40 controls to be displayed ). what is the way out? Amitava Basak ASE Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: arraylist problem.
Hi You can use size property to check the length of the Arraylist . [EMAIL PROTECTED] wrote: I have a condition where I have an arraylist(must) containing a bean and i have to display it in my jsp. I cannot use logic:iterate since if the arraylist does not contain the bean, the controls are not displayed at all. (I have approx 40 controls to be displayed ). what is the way out? Amitava Basak ASE Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: arraylist problem.
[EMAIL PROTECTED] wrote: I have a condition where I have an arraylist(must) containing a bean and i have to display it in my jsp. I cannot use logic:iterate since if the arraylist does not contain the bean, the controls are not displayed at all. (I have approx 40 controls to be displayed ). what is the way out? Amitava Basak ASE Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: arraylist problem.
Hi Amit, You can use the operator to check if the array list is null or not. Regards, Venkat -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 04, 2005 3:29 PM To: user@struts.apache.org Subject: arraylist problem. I have a condition where I have an arraylist(must) containing a bean and i have to display it in my jsp. I cannot use logic:iterate since if the arraylist does not contain the bean, the controls are not displayed at all. (I have approx 40 controls to be displayed ). what is the way out? Amitava Basak ASE Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS*** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic parameter
If the problem is with the quotes, use " flush="true" /> vijay, size is of no help!! Amitava Basak ASE(T) Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: dynamic parameter
Thanks indeedb basak , any other workaround . Afraid it is not helping my problem [EMAIL PROTECTED] wrote: If the problem is with the quotes, use " flush="true" /> vijay, size is of no help!! Amitava Basak ASE(T) Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic parameter
From: "Vijay K Anand" <[EMAIL PROTECTED]> I want to have attribute page be dynamically loaded from bean:message like " flush="true" /> Nesting JSP tags like that will not work. The usual workaround is to use expressions. Instead of putting the information in ApplicationResources.properties and trying to get it with , what about defining the tiles in tiles_defs.xml? Then use the 'definition' attribute instead of 'page' in . (Or, depending on what else is going on, just forward straight to a tiles definition.) See the tiles-documentation.war that ships with Struts for more information. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log4j log
Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: log4j log
Hi log4j.rootLogger=ERROR, A2 <<<--- Change this one to Debug, A2 -Opprinnelig melding- Fra: Vijay K Anand [mailto:[EMAIL PROTECTED] Sendt: 4. juli 2005 14:48 Til: user@struts.apache.org Emne: log4j log Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: log4j log
Where is the path to the log file specified? Something like this: log4j.appender.AccessLog.File= Martin > -Ursprüngliche Nachricht- > Von: Vijay K Anand [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 4. Juli 2005 14:48 > An: user@struts.apache.org > Betreff: log4j log > > > Hi > Here goes my log4j property file > > log4j.rootLogger=ERROR, A2 > log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender > log4j.appender.A2.Threshold=DEBUG > log4j.appender.A2.file=npi_log log4j.appender.A2.append=true > log4j.appender.A2.layout=org.apache.log4j.PatternLayout > log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > here is the code where i want to log > > static Logger logger = > Logger.getLogger(HighLevelAction.class.getClass()); > > logger.debug("test"); > > th eproblem is : it is not logging anything > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: log4j log
Hi Thanks for replying if i say so , it logs everything that is happening behind I dont want anything except i say explictly by logger.debug("test"); [EMAIL PROTECTED] wrote: Hi log4j.rootLogger=ERROR, A2 <<<--- Change this one to Debug, A2 -Opprinnelig melding- Fra: Vijay K Anand [mailto:[EMAIL PROTECTED] Sendt: 4. juli 2005 14:48 Til: user@struts.apache.org Emne: log4j log Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j log
Hi This is the file name i have specified below --> npi_log Vijay K Anand wrote: Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: log4j log
Its the filename, but where is it stored on your harddisk? With Win2003 and Tomcat I found my log-file in C:\WINNT\SYSTEM32! Peter -Ursprüngliche Nachricht- Von: Vijay K Anand [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. Juli 2005 14:58 An: Struts Users Mailing List Betreff: Re: log4j log Hi This is the file name i have specified below --> npi_log Vijay K Anand wrote: > Hi > Here goes my log4j property file > > log4j.rootLogger=ERROR, A2 > log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender > log4j.appender.A2.Threshold=DEBUG > log4j.appender.A2.file=npi_log > log4j.appender.A2.append=true > log4j.appender.A2.layout=org.apache.log4j.PatternLayout > log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > here is the code where i want to log > > static Logger logger = > Logger.getLogger(HighLevelAction.class.getClass()); > > logger.debug("test"); > > th eproblem is : it is not logging anything > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: SV: log4j log
Hi, If you just want to log your own messages, you 'll have to declare categories (see 1st line!): log4j.category.HighLevelAction=DEBUG, A2 log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n This should log your messages with level debug, info, warn and fatal to your log-file. Messages from other classes with level error and fatal will also be logged to your file. To avoid this declare a secont appender and link this to the root-category. Helmut > -Ursprüngliche Nachricht- > Von: Vijay K Anand [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 4. Juli 2005 14:55 > An: Struts Users Mailing List > Betreff: Re: SV: log4j log > > Hi > > Thanks for replying > > if i say so , it logs everything that is happening behind > I dont want anything except i say explictly by logger.debug("test"); > > [EMAIL PROTECTED] wrote: > > >Hi > > > >log4j.rootLogger=ERROR, A2 <<<--- Change this one to Debug, A2 > > > >-Opprinnelig melding- > >Fra: Vijay K Anand [mailto:[EMAIL PROTECTED] > >Sendt: 4. juli 2005 14:48 > >Til: user@struts.apache.org > >Emne: log4j log > > > > > >Hi > >Here goes my log4j property file > > > >log4j.rootLogger=ERROR, A2 > >log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender > >log4j.appender.A2.Threshold=DEBUG > >log4j.appender.A2.file=npi_log > >log4j.appender.A2.append=true > >log4j.appender.A2.layout=org.apache.log4j.PatternLayout > >log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > > >here is the code where i want to log > > > >static Logger logger = > >Logger.getLogger(HighLevelAction.class.getClass()); > > > >logger.debug("test"); > > > >th eproblem is : it is not logging anything > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * * * * * * * > > > >This email with attachments is solely for the use of the > individual or > >entity to whom it is addressed. Please also be aware that > the DnB NOR Group > >cannot accept any payment orders or other legally binding > correspondence with > >customers as a part of an email. > > > >This email message has been virus checked by the virus programs used > >in the DnB NOR Group. > > > >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * * * * * * * > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: log4j log
file is @ /logs directory but it is empty [EMAIL PROTECTED] wrote: Its the filename, but where is it stored on your harddisk? With Win2003 and Tomcat I found my log-file in C:\WINNT\SYSTEM32! Peter -Ursprüngliche Nachricht- Von: Vijay K Anand [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. Juli 2005 14:58 An: Struts Users Mailing List Betreff: Re: log4j log Hi This is the file name i have specified below --> npi_log Vijay K Anand wrote: Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
howto with validator
Hello everybody ! I have some howto questions related to validator. I'd like to do some checks on my form : 1) in a multibox question, i'd like to check at least 2 are checked and at most 4. 2) I have a mapped property, I'd like to check every mymap(key) is answered. 3) I have a form property of type "java.lang.String[]", which is an array of names(). I'd like to check all the names with usual validator features. Is it possible with the validator or may I make it in my actionForm ? Thanks Rémi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
swith to struts-el
I'd like to switch all my callic struts tags to struts-el in order to not mix all tags. How do you switch logic.equal to c:if ? For example : Thanks again... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Securityfilter persistent login
Hi Is securityfilter able to autologin users that have enabled their persitent login via cookies? In the moment these users have to push the login button again, although they do not have to enter their username and password. // process any persistent login information, if user is not already logged in, // persistent logins are enabled, and the persistent login info is present in this request if ( request.getRemoteUser() == null && persistentLoginManager != null && persistentLoginManager.rememberingLogin(request) ) { String username = persistentLoginManager.getRememberedUsername(request, response); String password = persistentLoginManager.getRememberedPassword(request, response); Principal principal = realm.authenticate(username, password); if (principal != null) { request.setUserPrincipal(principal); } else { // failed authentication with remembered login, better forget login now persistentLoginManager.forgetLogin(request, response); } } This piece of code seems to be responsible for the persistent login on the form submission. But this is only called in processLogin (FormAuthenticator) when the login Form is submitted. If this persistent login failes the form-input is taken. Thanks, Tobias PS: Is it possible to make securityfilter work with tiles xml-file definitions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
Dewitte Rémi escribió: I'd like to switch all my callic struts tags to struts-el in order to not mix all tags. How do you switch logic.equal to c:if ? For example : Thanks again... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
Hum, I tried : Unable to find a value for "sex" in object of class "org.apache.struts.validator.LazyValidatorForm" using operator "." (null) Indeed, it's a DynaBean. Have an idea ? Le Lundi 4 Juillet 2005 16:43, Ivan Rodriguez a écrit : > > > Dewitte Rémi escribió: > >I'd like to switch all my callic struts tags to struts-el in order to not > > mix all tags. How do you switch logic.equal to c:if ? > >For example : > > > > > >Thanks again... > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
are you sure your variable is defined ? for example <% boolean b = true; pageContext.setAttribute("b",new Boolean(b)); %> b is TRUE Take a look at http://www.caucho.com/resin-3.0/jsp/el.xtp HTH, Martin- - Original Message - From: "Dewitte Rémi" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, July 04, 2005 12:50 PM Subject: Re: swith to struts-el Hum, I tried : Unable to find a value for "sex" in object of class "org.apache.struts.validator.LazyValidatorForm" using operator "." (null) Indeed, it's a DynaBean. Have an idea ? Le Lundi 4 Juillet 2005 16:43, Ivan Rodriguez a écrit : Dewitte Rémi escribió: >I'd like to switch all my callic struts tags to struts-el in order to not > mix all tags. How do you switch logic.equal to c:if ? >For example : > > >Thanks again... > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
From: "Dewitte Rémi" <[EMAIL PROTECTED]> Hum, I tried : Unable to find a value for "sex" in object of class "org.apache.struts.validator.LazyValidatorForm" using operator "." (null) Indeed, it's a DynaBean. http://struts.apache.org/userGuide/building_controller.html#dyna_action_form_classes Try: -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IDE Wars (was Struts vs World)
Craig McClanahan wrote: to linking to it for entertainment value :-). Can anyone here remember any other case? Even if it's not the first, it is still ridiculous enough to be memorialized :-). Is there a shipping produciton app done w/ UI? > C'mon Vic ... you know the answer to that question. > So when are you going to stop whining about anyone who uses IDEs? :-) Or arguing on the basis of "it's almost done, it's gonna be so cool" software, instead of what already exists? OK, OK. I want to wear a white hat. I wish you personaly best, with JSF too. Hopefully in a galaxy far away it's JCF - client side faces. .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
So if it doesnt work for you, try - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
That's it ! Thanks ! Le Lundi 4 Juillet 2005 17:03, Wendy Smoak a écrit : > From: "Dewitte Rémi" <[EMAIL PROTECTED]> > > > Hum, I tried : > > Unable to find a value for "sex" in object of class > > "org.apache.struts.validator.LazyValidatorForm" using operator "." (null) > > Indeed, it's a DynaBean. > > http://struts.apache.org/userGuide/building_controller.html#dyna_action_for >m_classes > > Try: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: swith to struts-el
I have no error but it doesn't work. Thanks for your answer anyway. Le Lundi 4 Juillet 2005 17:30, Ivan Rodriguez a écrit : > So if it doesnt work for you, try > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Securityfilter persistent login
PPS: How can I access the servlets context in a securityfilter SecurityRealmInterface implementation? I use the struts HibernatePlugIn, and the hibernate session is stored in the servlets context. So I need to access hibernate this way in my Realm implementation for database verification. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Securityfilter persistent login
I'd consider changing to an implementation that is Filter based and opens/closes a session on every request... that way you could easily get the current session from the request scope. -David > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tobias Neumann > Sent: Monday, July 04, 2005 10:30 AM > To: user@struts.apache.org > Subject: Re: Securityfilter persistent login > > PPS: How can I access the servlets context in a securityfilter > SecurityRealmInterface implementation? > I use the struts HibernatePlugIn, and the hibernate session is stored > in the servlets context. > > So I need to access hibernate this way in my Realm implementation for > database verification. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j log
Vijay K Anand wrote: Hi Here goes my log4j property file log4j.rootLogger=ERROR, A2 log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender log4j.appender.A2.Threshold=DEBUG log4j.appender.A2.file=npi_log log4j.appender.A2.append=true log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n here is the code where i want to log static Logger logger = Logger.getLogger(HighLevelAction.class.getClass()); logger.debug("test"); th eproblem is : it is not logging anything Two things: As someone else pointed out, you've set the logging level to ERROR but you're logging using debug, so the log message isn't going to show up. Either change the root logging level to DEBUG, or add lines like the following to your config: log4j.logger.package-name=DEBUG where 'package-name' is the package (or fully qualified class) name for which you want debug logging. Second, where you construct the logger instance, you have ...class.getClass(). You don't want the getClass() call. I.e. your code should read static Logger logger = Logger.getLogger(HighLevelAction.class); L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFoundError: DefineTag
Hey all, I have a problem in my web application. It usually throws a NoClassDefFoundError about the bean:define tag. This only happens when Tomcat was newly started. Reloading the frame immediately fixes the problem. So I am not sure why this happens. The Stacktrace is: --snip-- javax.servlet.ServletException: org.apache.struts.taglib.bean.DefineTag org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.appframe_002dweb.navi_jsp._jspService(navi_jsp.java:278) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NoClassDefFoundError: org.apache.struts.taglib.bean.DefineTag org.apache.jsp.appframe_002dweb.navi_jsp.class$(navi_jsp.java:94) org.apache.jsp.appframe_002dweb.navi_jsp._jspService(navi_jsp.java:181) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) --snip-- The relevant lines in the navi_jsp.java are: --snip-- " target="workspace"> --snip-- Line number 94 is '' I have no idea what can be wrong with this. Especially since this error vanishes after reloading the frame. And it doesn't happen after _each_ tomcat restart. Any ideas on how to investigate this problem? Regards Nicole - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts vs .NET??? -> Real Stats
Actually, this did not help me at all. I understand that differences, etc. I just wondered what you thought, since I thought your conclusions were contrary to the facts. On 7/3/05, Gregory Seidman <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 11:48:37PM -0700, Dakota Jack wrote: > } What is your basis for your assessment of .NET and Struts? What sort > } of problem are you talking about/ > > My assessment is based on my own development experience with both, plus > lurking on this list for a few years. I will reiterate that I am not > interested in converting Java/Struts developers to C#/.NET developers; I > want Java and Struts to be the best they can be, and that knowing the > competition is a step toward that. > > I posted something fairly in-depth about the advantages of C#-the-language > over Java-the-language. Check the archives for the last couple of days. A > few of those advantages have to do with the .NET runtime itself (in > particular, 1) properties being first-class reflectable objects, just like > methods and members, rather than derived from the JavaBeans get/set naming > convention, and 2) events and delegate (method pointer) types being > first-class reflectable objects rather than using interfaces for handlers). > For now, Java has the advantages of generics and anonymous inner classes > over C#, but the next version of C# (due out this year, and what I'm > hearing about the betas leads me to believe that it will actually be out > this year) supports both of those and simplifies a few other common idioms > (iteration, in particular). > > I have not done any comparison of .NET vs. Java performance, nor have I > compared their garbage collection strategies or threading models. They seem > to be pretty similar, and they can be expected to maintain very similar > performance profiles since the optimization techniques for such things are > old in academia and well-published. Their different choices of performance > tradeoffs may eventually effect their usefulness for particular purposes, > at which point it may be appropriate to choose one or the other based on > one's specific application. > > The APIs (system libraries and extension libraries) considered part of > either Java or .NET are pretty similar. Java has a much larger set of > third-party free libraries (in good part thanks to Apache's Jakarta > project), but many of those are being ported to .NET. On the other hand, > there are many commercially-licensed components for .NET, and there are > likely to be more, simply because it is in the Microsoft world. I don't > have exact (or meaningful) figures on this, so take it with a grain of > salt. Anecdotally, I can say that in a previous project I sought a > particular ASP.NET control and found dozens of candidates, commercial and > otherwise, and the one that best suited our application was commercial. (We > bought it, we used it, their tech support was excellent (including > accepting patches from me), and it did what we needed.) > > Comparing JSP and Struts to ASP.NET turns up sharp corners in both. It's > very easy to encapsulate functionality in a custom tag in ASP.NET, much > harder to do so for JSP. Struts abstracts away the specifics of the > generated HTML (both outgoing HTML and incoming form data), which supports > the MVC model; ASP.NET requires a bit more hoop-jumping to do so. > Validation, both server-side and client-side, is far easier in ASP.NET than > with Struts. ASP.NET has almost no configuration required other than the > .aspx/.ascx (equivalent to .jsp) files themselves, whereas Struts requires > a configuration file that grows increasingly complicated as the site grows > larger (though, to its credit, it does centralize the transition graph of > the site). Neither Struts nor ASP.NET cares much about business objects, > but both can deal with them just like any other object. Finally, while > ASP.NET scales well from a single page to an entire site, Struts doesn't > really shine until you get to at least 5-10 separate forms/pages. > > I hope this is a useful answer to your question. > > --Greg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts vs .NET???
I didn't ask how Mono runs on Apple, did I? On 7/3/05, Gregory Seidman <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 11:34:44PM -0700, Dakota Jack wrote: > } And how does C# run on Apple? LOL > > See http://www.mono-project.com/ > > --Greg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm reset() and redirect.
On 7/4/05, Ben <[EMAIL PROTECTED]> wrote: > Hi > > My form has some boolean properties and I set them to false in the > reset method. The Action that handles the form has redirect attribute > as true, i.e if there is an error, it redirects to the same page that > has the form with errors. When it redirects with errors, the form > retains values for other properties except the boolean ones. What I > can do to fix this? If I don't set the boolean properties to false in > the reset method, the form works fine. > > Please help, thanks. > Ben Apparently you use form bean with session scope, and you are redirecting to the same action. When you redirect, no parameters are passed in the request, so your boolean fields are not be set. You need to clear boolean values only when you submit input data (POST), but not when you redirect to the same action to redisplay the page (GET). You may want to give a try to the Struts Dialogs library, which already handles this scenario. Here is the use case which seems like yours: http://struts.sourceforge.net/strutsdialogs/dialogaction-logindialogsample.html And here is the live demo, it looks simple, but remember, that it works correctly with redirection, and with Refresh/Back buttons: http://www.superinterface.com/strutsdialog/logindialog.html Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts-html.tld
Dear All, When I use tomcat for the below line it can run perfectly. <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Then I switch to jboss, it complains that it cannot find the file. Any idea what is wrong? TIA. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-html.tld
From: "Amin Mohd Sani" <[EMAIL PROTECTED]> When I use tomcat for the below line it can run perfectly. <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Then I switch to jboss, it complains that it cannot find the file. Any idea what is wrong? Assuming a Servlet 2.3 or better container, you don't have to place the tld files "loose" under WEB-INF. They're in the various .jar files, and can be located there if you use the correct URI. To find out what that is, look in the struts.jar file for the tld you're interested in, (struts-html.tld in this case,) find the part that looks like this: http://struts.apache.org/tags-html And use that as the uri attribute of your taglib directive: <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %> Disclaimer: I don't use JBoss. But I would be very surprised if this didn't work there as well as in standalone Tomcat. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help: DynaActionForm with indexed property - not updating
Hi, I've been trying to get the values in my dynaaction form to update. I have a "populator" Action that creates my TestRow[] object and adds it to the form. The dynaaction also has a simple String property which I also populate. I then forward to my HTML form that has the row fields indexed. The form is displayed with all the indexed text boxes and select boxes populated as expected. I edit the values, including the non indexed field and submit the form to the form processor action. The form is retrieved and the non indexed field has the updated value, BUT, the indexed fields still contain the original values! I've triple checked everything, and looked around for answers but I can't work out whats wrong. I've even done indexed forms successfully before on a different project, so its very frustrating. Even downloaded the lastest Struts 1.2.7/JSTL 1.1.2 libs and retried. Any help greatly appreciatedThanks Mark Here's my code and config segments: DynaActionForm definition from my struts-config.xml: and the action mappings My test page, which is included into my Tiles to form valid HTML and mapped to /do/gotoTestPage.do : <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="jstl/c" prefix="c" %> Author: Pick from known affiliations "Populator" action public class TestInit extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; TestRow row1=new TestRow(); row1.setField1("Mark"); row1.setField2(2); TestRow row2=new TestRow(); row2.setField1("Fred"); row2.setField2(5); TestRow[] rows=new TestRow[2]; rows[0]=row1; rows[1]=row2; testForm.set("rows", rows); testForm.set("simple", "hello"); return mapping.findForward(NEXT); } } "Form processor" action public class TestProcess extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; String simple=(String)testForm.get("simple"); System.out.println("Simple: " + simple); TestRow[] rows=(TestRow[])testForm.get("rows"); for (int i=0;i
Re: DynaActionForm with indexed property - not updating
You have named your indexed property in the DynaActionForm "rows" - but on your jsp you are using a var of "row" Either change the property defined in the DynaActionForm to "row" or change your jsp to refer to "rows"... Author: Pick from known affiliations Niall - Original Message - From: "Mark Rehbein" <[EMAIL PROTECTED]> Sent: Tuesday, July 05, 2005 4:18 AM Hi, I've been trying to get the values in my dynaaction form to update. I have a "populator" Action that creates my TestRow[] object and adds it to the form. The dynaaction also has a simple String property which I also populate. I then forward to my HTML form that has the row fields indexed. The form is displayed with all the indexed text boxes and select boxes populated as expected. I edit the values, including the non indexed field and submit the form to the form processor action. The form is retrieved and the non indexed field has the updated value, BUT, the indexed fields still contain the original values! I've triple checked everything, and looked around for answers but I can't work out whats wrong. I've even done indexed forms successfully before on a different project, so its very frustrating. Even downloaded the lastest Struts 1.2.7/JSTL 1.1.2 libs and retried. Any help greatly appreciatedThanks Mark Here's my code and config segments: DynaActionForm definition from my struts-config.xml: and the action mappings My test page, which is included into my Tiles to form valid HTML and mapped to /do/gotoTestPage.do : <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="jstl/c" prefix="c" %> Author: Pick from known affiliations "Populator" action public class TestInit extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; TestRow row1=new TestRow(); row1.setField1("Mark"); row1.setField2(2); TestRow row2=new TestRow(); row2.setField1("Fred"); row2.setField2(5); TestRow[] rows=new TestRow[2]; rows[0]=row1; rows[1]=row2; testForm.set("rows", rows); testForm.set("simple", "hello"); return mapping.findForward(NEXT); } } "Form processor" action public class TestProcess extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; String simple=(String)testForm.get("simple"); System.out.println("Simple: " + simple); TestRow[] rows=(TestRow[])testForm.get("rows"); for (int i=0;i
Marking fields having errors
Hi, Does struts has any facility to show fields having validation error in red color or mark it in some way? Thanks Ashwani -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 3:44 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Struts vs .NET??? -> Real Stats Actually, this did not help me at all. I understand that differences, etc. I just wondered what you thought, since I thought your conclusions were contrary to the facts. On 7/3/05, Gregory Seidman <[EMAIL PROTECTED]> wrote: > On Sat, Jul 02, 2005 at 11:48:37PM -0700, Dakota Jack wrote: > } What is your basis for your assessment of .NET and Struts? What > sort } of problem are you talking about/ > > My assessment is based on my own development experience with both, > plus lurking on this list for a few years. I will reiterate that I am > not interested in converting Java/Struts developers to C#/.NET > developers; I want Java and Struts to be the best they can be, and > that knowing the competition is a step toward that. > > I posted something fairly in-depth about the advantages of > C#-the-language over Java-the-language. Check the archives for the > last couple of days. A few of those advantages have to do with the > .NET runtime itself (in particular, 1) properties being first-class > reflectable objects, just like methods and members, rather than > derived from the JavaBeans get/set naming convention, and 2) events > and delegate (method pointer) types being first-class reflectable objects rather than using interfaces for handlers). > For now, Java has the advantages of generics and anonymous inner > classes over C#, but the next version of C# (due out this year, and > what I'm hearing about the betas leads me to believe that it will > actually be out this year) supports both of those and simplifies a few > other common idioms (iteration, in particular). > > I have not done any comparison of .NET vs. Java performance, nor have > I compared their garbage collection strategies or threading models. > They seem to be pretty similar, and they can be expected to maintain > very similar performance profiles since the optimization techniques > for such things are old in academia and well-published. Their > different choices of performance tradeoffs may eventually effect their > usefulness for particular purposes, at which point it may be > appropriate to choose one or the other based on one's specific application. > > The APIs (system libraries and extension libraries) considered part of > either Java or .NET are pretty similar. Java has a much larger set of > third-party free libraries (in good part thanks to Apache's Jakarta > project), but many of those are being ported to .NET. On the other > hand, there are many commercially-licensed components for .NET, and > there are likely to be more, simply because it is in the Microsoft > world. I don't have exact (or meaningful) figures on this, so take it > with a grain of salt. Anecdotally, I can say that in a previous > project I sought a particular ASP.NET control and found dozens of > candidates, commercial and otherwise, and the one that best suited our > application was commercial. (We bought it, we used it, their tech > support was excellent (including accepting patches from me), and it > did what we needed.) > > Comparing JSP and Struts to ASP.NET turns up sharp corners in both. > It's very easy to encapsulate functionality in a custom tag in > ASP.NET, much harder to do so for JSP. Struts abstracts away the > specifics of the generated HTML (both outgoing HTML and incoming form > data), which supports the MVC model; ASP.NET requires a bit more hoop-jumping to do so. > Validation, both server-side and client-side, is far easier in ASP.NET > than with Struts. ASP.NET has almost no configuration required other > than the .aspx/.ascx (equivalent to .jsp) files themselves, whereas > Struts requires a configuration file that grows increasingly > complicated as the site grows larger (though, to its credit, it does > centralize the transition graph of the site). Neither Struts nor > ASP.NET cares much about business objects, but both can deal with them > just like any other object. Finally, while ASP.NET scales well from a > single page to an entire site, Struts doesn't really shine until you get to at least 5-10 separate forms/pages. > > I hope this is a useful answer to your question. > > --Greg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgem
RE: DynaActionForm with indexed property - not updating
You are a champion Niall, thanks! I can't believe I overlooked the naming conventions. Thanks again. Mark -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 July 2005 1:42 PM To: Struts Users Mailing List Subject: Re: DynaActionForm with indexed property - not updating You have named your indexed property in the DynaActionForm "rows" - but on your jsp you are using a var of "row" Either change the property defined in the DynaActionForm to "row" or change your jsp to refer to "rows"... Author: Pick from known affiliations Niall - Original Message - From: "Mark Rehbein" <[EMAIL PROTECTED]> Sent: Tuesday, July 05, 2005 4:18 AM Hi, I've been trying to get the values in my dynaaction form to update. I have a "populator" Action that creates my TestRow[] object and adds it to the form. The dynaaction also has a simple String property which I also populate. I then forward to my HTML form that has the row fields indexed. The form is displayed with all the indexed text boxes and select boxes populated as expected. I edit the values, including the non indexed field and submit the form to the form processor action. The form is retrieved and the non indexed field has the updated value, BUT, the indexed fields still contain the original values! I've triple checked everything, and looked around for answers but I can't work out whats wrong. I've even done indexed forms successfully before on a different project, so its very frustrating. Even downloaded the lastest Struts 1.2.7/JSTL 1.1.2 libs and retried. Any help greatly appreciatedThanks Mark Here's my code and config segments: DynaActionForm definition from my struts-config.xml: and the action mappings My test page, which is included into my Tiles to form valid HTML and mapped to /do/gotoTestPage.do : <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="jstl/c" prefix="c" %> Author: Pick from known affiliations "Populator" action public class TestInit extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; TestRow row1=new TestRow(); row1.setField1("Mark"); row1.setField2(2); TestRow row2=new TestRow(); row2.setField1("Fred"); row2.setField2(5); TestRow[] rows=new TestRow[2]; rows[0]=row1; rows[1]=row2; testForm.set("rows", rows); testForm.set("simple", "hello"); return mapping.findForward(NEXT); } } "Form processor" action public class TestProcess extends Action { private static final String NEXT="next"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm testForm = (DynaActionForm) form; String simple=(String)testForm.get("simple"); System.out.println("Simple: " + simple); TestRow[] rows=(TestRow[])testForm.get("rows"); for (int i=0;i- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Marking fields having errors
Hi, In ur application resources file, u can add this errors.header=Error List errors.footer= here color = anycolor Regards Khan On 7/5/05, Kalra, Ashwani <[EMAIL PROTECTED]> wrote: > > > Hi, > Does struts has any facility to show fields having validation error in > red color or mark it in some way? > > Thanks > Ashwani
RE: Marking fields having errors
I want to highlight the field labels or show some marker text like '!', Not the error messages -Original Message- From: Rauf Khan [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 9:43 AM To: Struts Users Mailing List Subject: Re: Marking fields having errors Hi, In ur application resources file, u can add this errors.header=Error List errors.footer= here color = anycolor Regards Khan On 7/5/05, Kalra, Ashwani <[EMAIL PROTECTED]> wrote: > > > Hi, > Does struts has any facility to show fields having validation error in > red color or mark it in some way? > > Thanks > Ashwani This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Marking fields having errors
From: "Kalra, Ashwani" <[EMAIL PROTECTED]> I want to highlight the field labels or show some marker text like '!', Not the error messages The form element tags (since 1.2.5) have 'errorKey' 'errorStyle' 'errorStyleClass' and 'errorStyleId' attributes. Some combination of those should do what you want. http://struts.apache.org/userGuide/struts-html.html#text -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Marking fields having errors in struts 1.1
Thanks Wendy, But I am working withd 1.1 , I think I have to customize the tags of 1.1, Or can I use struts 1.2 html tags in 1.1? Has any one faced this situation? -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 9:50 AM To: Struts Users Mailing List Subject: Re: Marking fields having errors From: "Kalra, Ashwani" <[EMAIL PROTECTED]> > I want to highlight the field labels or show some marker text like > '!', Not the error messages The form element tags (since 1.2.5) have 'errorKey' 'errorStyle' 'errorStyleClass' and 'errorStyleId' attributes. Some combination of those should do what you want. http://struts.apache.org/userGuide/struts-html.html#text -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
architecture of composite action forms - please help
Hello Friends, I have a transfer object called FatherTO that contains a collection of ChildTO's. Can you please help me with how the relevant ActionForm (i.e. FatherForm ) should look like. How should the reset() & validate() methods look like? Should I use the same jsp form for the Father data and it's childs data? Thanks Rivka ** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** eSafe scanned this email for viruses, vandals and malicious content. ** ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: howto with validator
You could do this with validator and indexed properties. When using indexed properties, JavaScript validations doesn't work. However the server side validations does. This should suffice what you need... In case you have some validations that involve business logic, you could add more validations, customize the validator-rule.xml add your own validation there point it to a custom validator method in the validator you have coded. HTH, Nitesh _ Disclaimer: Information contained and transmitted by this e-mail is confidential, proprietary, and legally privileged data of Cordiant Technologies that is intended for use only by the addressee. If you are not the intended recipient, you are notified that any dissemination, distribution, or copying of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator. Any views expressed by an individual do not necessarily reflect the view of Cordiant Technologies. The recipient should scan this email and any attachments for viruses as Cordiant Technologies is not liable for the presence of viruses in this email. Cordiant Technologies does not accept liability for any errors or omissions as the internet communications cannot be guaranteed to be timely, secure, error or virus-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. To know more about Cordiant Technologies, please visit http://www.cordiant.com _ -Original Message- From: Dewitte Rémi [mailto:[EMAIL PROTECTED] Sent: Monday, July 04, 2005 9:21 PM To: Struts Users Mailing List Subject: howto with validator Hello everybody ! I have some howto questions related to validator. I'd like to do some checks on my form : 1) in a multibox question, i'd like to check at least 2 are checked and at most 4. 2) I have a mapped property, I'd like to check every mymap(key) is answered. 3) I have a form property of type "java.lang.String[]", which is an array of names(). I'd like to check all the names with usual validator features. Is it possible with the validator or may I make it in my actionForm ? Thanks Rémi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable URL rewriting for session id?
David G. Friedman wrote: I just skimmed through cvs and have this idea for you: Edit a copy of the Html Taglib's helper class, org.apache.struts.taglibs.TagUtils, so any methods that would pull in the session variable to append to the new URL don't do that. When it's built, put it under WEB-INF/classes/org/apache/struts/taglibs so Struts calls YOUR class, not the original. David, Nice plan! I basically did as you suggested, and automatic URL rewriting no longer takes place. (Removed calls to HttpServletResponse.encodeURL within org.apache.struts.taglib.TagUtils and org.apache.struts.taglib.html.FormTag) Thanks, Julian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]