[Struts 2] s:form and s:textfield tags adding unwanted HTML code
Hi, I was using Struts 1.2.8 and I'm now discovering Struts 2 and some new tags. I'm transforming an .html page designed with CSS only (no table, tr, td) to an .jsp page with Struts tags and I'm surprised to see that the source code generated when using s:form, s:textfield and s:submit contains some html code with table, tr, td around the divs of my form. Is there the source code : s:form action=userConnect div id=userForm fieldset id=login legendConnectez vous :/legend p label for=loginlogin : /label s:textfield name=login id=login size=20 / /p p label for=passwordmot de passe : /label s:password name=password id=password size=20 / /p p s:submit type=image id=imgSubmit src=www/tortue_contour_noire_20_16.jpg / /p /fieldset /div /s:form Is there an option to deactivate this? Or maybe I'm wrong in using these tags. For my test I'm using the struts-blank app (found in Struts 2), with jre1.5 and Tomcat 5.5.12. Thank you in advance for your help. Sébastien Sébastien LABEY Division Immobilier RD IKOS 04.72.18.47.07 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 20, chemin du Randin - B1 - 69130 Ecully P Avant d'imprimer, ayez une pensée pour notre environnement *
Re: Struts with dynamically generated html:Text
On 9/15/06, Aftab Vhora [EMAIL PROTECTED] wrote: Hi, In my page I am generating text boxes dynamically(i.e. clicking on a button Add more will add a text box in my page.) Now I want to implement my ActionForm to capture the data entered in those dynamically generated text boxes. Is it possible in struts ? If yes, please provide me the solution ASAP. Yes its possible. Use indexed properties. or Map backed properties. http://struts.apache.org/1.2.9/faqs/indexedprops.html I actually did something exactly like that. You could follow this discussion for some specific things about DHTML http://servlets.com/archive/servlet/BrowseList?listName=struts-userby=subjectfrom=230319 And ya Please avoid things like ASAP. This is not paid support http://www.catb.org/~esr/faqs/smart-questions.html -- Thanks Regards, Aftab Vhora - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Puneet
Re: [Struts 2] s:form and s:textfield tags adding unwanted HTML code
Yes, if you prefer to code your own markup, then you can use the simple theme. To use the simple theme throughout an application, add this line to the struts.properties file. * struts.ui.theme=simple The struts.properties file can be placed under classes, next to the struts.xml file. The themes are designed to reduce the amount of markup we need to code into each page. The general idea is that we can create a form just by specifying the fields, and let the theme generate the HTML markup for us. (Like using an advanced stylesheet.) The default theme has handy features like automatically displaying validation errors above each field, with any extra work on our part. Here's the source code for the example, relying on the theme to generate the HTML markup. s:form action=userConnect s:textfield label=Connectez vous: name=login size=20 / s:password label=mot de passe : name=password id=password size=20 / s:submit type=image id=imgSubmit src=www/tortue_contour_noire_20_16.jpg / /s:form Note that the Struts 2 tags include new attributes, like label. The XHTML (and AJAX) themes will automatically inject a label tag into the form. Of course, you can always use the simple theme and inject all the markup by hand, as we do in Struts 1. The themes and individual tags can also be extended, if need be, to meet any specific needs of an application. * http://cwiki.apache.org/WW/themes-and-templates.html -- HTH, Ted. * http://www.husted.com/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring Struts Validator with Multiple Modules
On 9/14/06, Scott Smith [EMAIL PROTECTED] wrote: I have a struts 1.2.9 app that has several modules (assume they are named a and b). In my struts-config-a.xml file, I have a form defined as followed: form-bean name=formRegister type=a.modules.register.RegisterForm / My validation.xml file looks like: form-validation formset form name=formRegister field property=registerName depends=required /field /form /formset /form-validation When I try to access the form, I get: java.lang.IllegalArgumentException: Resources cannot be null. at org.apache.commons.validator.Validator.init(Validator.java:188) at org.apache.struts.validator.Resources.initValidator(Resources.java:475) at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:10 4) ... Based on some other posts, I think this is telling me it can't find any validation information for my form (formRegister)-which I assume means that the name specified in my form tag is not what validator expects to see for form within a module. I've tried a.formRegister in my form tag and that doesn't seem to work either. I currently have a single validation.xml file. The plugin is configured in the main struts-config.xml file. I assume I can only have one incarnation of the validator plugin. Is there something I need to put in the individual module configuration files? Do I really need to have several invocations of the plugin? Yes, you need to configure the validator plugin for each module. Niall Can someone give me some hints on configuring validator in a multi-module struts app? Thanks Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: required if validation doesn'nt work
On 9/15/06, Heidy Gutiérrez Guzmán [EMAIL PROTECTED] wrote: I'm using requiredif validation from Validator Framework, but does'nt work. I have de rule in the validator-rules.xml and the method validateRequiredIf exists in org.apache.struts.validator.FieldChecks in the struts jar. I have read that requiredif is deprecated in struts 1.2, but that does'nt problem for me, because i'm using struts 1.1 Just saying it doesn't work doesn't really give much information for people to help you. Also its often useful to post the appropriate snippets of your configuration files. Do you mean that validation always passes or fails or are you getting some kind of exception? Have you checked the logs for any error messages? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation framework problem?
Hi friends i have stuckup in validation framework because my form will get fields dynamically on user request and i cannot predect how my fields it will have when posting the form i am creating Dynamic form fields using javascript like txt = document.createElement('input'); txt.type='text'; txt.name = 'element1'; and adding to form td element so now how can i set for form bean property in struts-config.xml and in validation.xml please let me know the solution... ur's Mallik -- View this message in context: http://www.nabble.com/Validation-framework-problem--tf2276854.html#a6323111 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts issue...
On 9/15/06, Dean, Michael [EMAIL PROTECTED] wrote: Interesting problem... I have a submit button which includes a property = method with value=Save...the enclosing form is submitted to a Struts DispatchAction sub-class which is configured to rely on the method parameter for delegation. In order to prevent a double-submit, in my onSubmit() javascript I disable the button and immediately thereafter return truehowever, I proved that the disabling of the button prevents the required method parameter from being included in the request... True. Anything that is disabled in HTML is not submitted in the request. This is how HTML works and has nothing to do with struts. I thought about a hidden field but I also established that they ARE NOT added to the request upon submission... How did you arrive at this conclusion. You might be doing something wrong. Because hidden fields are supposed to be and ARE added to the request, infact they dont really make sense if they are not added. Any ideas? Post your code,and then maybe someone can suggest an approach. Michael Dean Senior Java Programmer JIS Applications Maintenance Information Services Division Administrative Office of the Courts 360.704.4008 [EMAIL PROTECTED] -- Puneet
Re: struts issue...
On 9/15/06, Dean, Michael [EMAIL PROTECTED] wrote: Interesting problem... I have a submit button which includes a property = method with value=Save...the enclosing form is submitted to a Struts DispatchAction sub-class which is configured to rely on the method parameter for delegation. In order to prevent a double-submit, in my onSubmit() javascript I disable the button and immediately thereafter return truehowever, I proved that the disabling of the button prevents the required method parameter from being included in the request... I thought about a hidden field but I also established that they ARE NOT added to the request upon submission... Any ideas? Ok this is something you could try script var submitnow = true; function onSubmitFunction () { if(submitnow = true) { submitnow = false; return true; }else { return false; } } /script Not sure if this will work. Because I havent tried it. Michael Dean Senior Java Programmer JIS Applications Maintenance Information Services Division Administrative Office of the Courts 360.704.4008 [EMAIL PROTECTED] -- Puneet
Re: struts issue...
here's de code I use to disable de button and do submit. May be you can use it. script type=text/javascript function doSubmit(button){ button.disabled=true; button.form.submit(); } /script html:hidden property=method value=Agregar/ html:submit property=method value=anyName onclick=doSubmit(this);/ - Original Message - From: Puneet Lakhina [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, September 15, 2006 8:13 AM Subject: Re: struts issue... On 9/15/06, Dean, Michael [EMAIL PROTECTED] wrote: Interesting problem... I have a submit button which includes a property = method with value=Save...the enclosing form is submitted to a Struts DispatchAction sub-class which is configured to rely on the method parameter for delegation. In order to prevent a double-submit, in my onSubmit() javascript I disable the button and immediately thereafter return truehowever, I proved that the disabling of the button prevents the required method parameter from being included in the request... I thought about a hidden field but I also established that they ARE NOT added to the request upon submission... Any ideas? Ok this is something you could try script var submitnow = true; function onSubmitFunction () { if(submitnow = true) { submitnow = false; return true; }else { return false; } } /script Not sure if this will work. Because I havent tried it. Michael Dean Senior Java Programmer JIS Applications Maintenance Information Services Division Administrative Office of the Courts 360.704.4008 [EMAIL PROTECTED] -- Puneet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation
I have two controls in a Form. Both of them are drop-down. One has multiple select enabled. I want to validate such that if User chooses something in prerequisiteVO.prerequisiteCourseId drop-down then he must also choose from drop-down prerequisiteRole. However since prerequisiteRole is a multiple select and is saved as an array of int , what should I say in my test condition. var-value ((prerequisiteVO.prerequisiteCourseId == 0) or (prerequisiteRole.length 0)) /var-value prerequisiteRole.length which I am using doesn't work. My prerequisiteRole drop-down is like this 'choose Role' Value = 0 'Role-1' Value = 1 'Role-2' Value = 2 I want to say that aleast one value greater than 1 has been selected. I cannot say prerequisiteRole 0 or *test* 0 as it is not an int but an array of int. My validation looks like the following field property=prerequisiteRole depends=validwhen msg name=validwhen key=errors.validwhen.prereq.role/ var var-nametest/var-name var-value((prerequisiteVO.prerequisiteCourseId == 0) or (prerequisiteRole.length 0))/var-value /var /field Thanks. Chetan
Re: required if validation doesn'nt work
The validation always fails, i don't have any kind of exeption. The key in the application resources is ok for that kind of message. This is the code that i put in the validatir.xml form name=gestionarEdicionMonitoresEDHEPForm field property=nombre depends=requiredif arg0 key=etiqueta.Nombre / var var-nametest/var-name var-value(campoOculto != null)/var-value /var /field /form On 9/15/06, Niall Pemberton [EMAIL PROTECTED] wrote: On 9/15/06, Heidy Gutiérrez Guzmán [EMAIL PROTECTED] wrote: I'm using requiredif validation from Validator Framework, but does'nt work. I have de rule in the validator-rules.xml and the method validateRequiredIf exists in org.apache.struts.validator.FieldChecks in the struts jar. I have read that requiredif is deprecated in struts 1.2, but that does'nt problem for me, because i'm using struts 1.1 Just saying it doesn't work doesn't really give much information for people to help you. Also its often useful to post the appropriate snippets of your configuration files. Do you mean that validation always passes or fails or are you getting some kind of exception? Have you checked the logs for any error messages? Niall - 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]
Redirect from tile controller
Hi, I have a layout JSP (layout.jsp) with two tiles. I am using tile controllers to populate data to be displayed in each tile. Code is specified below. If an exception is thrown by 2nd tile controller, is there a way to redirect to a completely new JSP (say error.jsp), instead of displaying the layout JSP? There is no return Actionforward from a org.apache.struts.tiles.Controller (as is present in Action class). Thanks, RG layout.jsp: --- HTMLBODYtable trtd tiles:insert definition=.A/ /tr/td trtd tiles:insert definition=.B/ /tr/td /table/BODY/HTML definition name=.A path=/a.jsp controllerClass=ATileController / definition name=.B path=/b.jsp controllerClass=BTileController /
Re: Redirect from tile controller
If you are using TilesRequestProcessor as your controller (and it's probably not limited to this class) you can extend it to add any methods you need to call from an Action's execute(...) method. The trick is getting an instance of the controller from within the action - and I don't know how to do that off hand. I've previously asked this question but did not receive a satisfactory response - someone suggested that it might be on the request - it wasn't. -adam Gupta, Rahul wrote: Hi, I have a layout JSP (layout.jsp) with two tiles. I am using tile controllers to populate data to be displayed in each tile. Code is specified below. If an exception is thrown by 2nd tile controller, is there a way to redirect to a completely new JSP (say error.jsp), instead of displaying the layout JSP? There is no return Actionforward from a org.apache.struts.tiles.Controller (as is present in Action class). Thanks, RG layout.jsp: --- HTMLBODYtable trtd tiles:insert definition=.A/ /tr/td trtd tiles:insert definition=.B/ /tr/td /table/BODY/HTML definition name=.A path=/a.jsp controllerClass=ATileController / definition name=.B path=/b.jsp controllerClass=BTileController / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: required if validation doesn'nt work
You have configured your validator using the format for the validwhen validator - but specified the requiredif validator: For the requiredif validator you need to use the following type of configuration: http://struts.apache.org/1.2.x/userGuide/dev_validator.html#conditionals For the validwhen validator: http://struts.apache.org/1.2.x/userGuide/dev_validator.html#validwhen Niall On 9/15/06, Heidy Gutiérrez Guzmán [EMAIL PROTECTED] wrote: The validation always fails, i don't have any kind of exeption. The key in the application resources is ok for that kind of message. This is the code that i put in the validatir.xml form name=gestionarEdicionMonitoresEDHEPForm field property=nombre depends=requiredif arg0 key=etiqueta.Nombre / var var-nametest/var-name var-value(campoOculto != null)/var-value /var /field /form On 9/15/06, Niall Pemberton [EMAIL PROTECTED] wrote: On 9/15/06, Heidy Gutiérrez Guzmán [EMAIL PROTECTED] wrote: I'm using requiredif validation from Validator Framework, but does'nt work. I have de rule in the validator-rules.xml and the method validateRequiredIf exists in org.apache.struts.validator.FieldChecks in the struts jar. I have read that requiredif is deprecated in struts 1.2, but that does'nt problem for me, because i'm using struts 1.1 Just saying it doesn't work doesn't really give much information for people to help you. Also its often useful to post the appropriate snippets of your configuration files. Do you mean that validation always passes or fails or are you getting some kind of exception? Have you checked the logs for any error messages? Niall - 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]
Rediction, ActionForward and Internal Server Error
I'm sending a rediction (with HttpServletResponse.sendRedirect or with a new ActionForward) : everything works fine except the http return code which is 500 (instead of 200 or 302)... The application is runing under Websphere Application Server 6. Anyone can help me ?
RE: struts issue...
The code posted by punit works.The only problem is that suppose the user clicks on submit and for some reason stops the form from submitting through the browser controls(it happened with me, some users did it apparently because it was taking a long time), then the form would never be submitted again. -Original Message- From: Puneet Lakhina [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 7:14 AM To: Struts Users Mailing List Subject: Re: struts issue... On 9/15/06, Dean, Michael [EMAIL PROTECTED] wrote: Interesting problem... I have a submit button which includes a property = method with value=Save...the enclosing form is submitted to a Struts DispatchAction sub-class which is configured to rely on the method parameter for delegation. In order to prevent a double-submit, in my onSubmit() javascript I disable the button and immediately thereafter return truehowever, I proved that the disabling of the button prevents the required method parameter from being included in the request... I thought about a hidden field but I also established that they ARE NOT added to the request upon submission... Any ideas? Ok this is something you could try script var submitnow = true; function onSubmitFunction () { if(submitnow = true) { submitnow = false; return true; }else { return false; } } /script Not sure if this will work. Because I havent tried it. Michael Dean Senior Java Programmer JIS Applications Maintenance Information Services Division Administrative Office of the Courts 360.704.4008 [EMAIL PROTECTED] -- Puneet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts issue...
Michael- Its sounds as if you have (at least) 2 possible submits most probably by the submit button as well as the form action parameter you have can solve using one of 2 solutions 1) either disable submit calling the function OR disable form action calling the function 2) have both submit and action call a javascript function (which handles validation and then forwards to the proper location) HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Asthana, Rahul [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, September 15, 2006 11:23 AM Subject: RE: struts issue... The code posted by punit works.The only problem is that suppose the user clicks on submit and for some reason stops the form from submitting through the browser controls(it happened with me, some users did it apparently because it was taking a long time), then the form would never be submitted again. -Original Message- From: Puneet Lakhina [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 7:14 AM To: Struts Users Mailing List Subject: Re: struts issue... On 9/15/06, Dean, Michael [EMAIL PROTECTED] wrote: Interesting problem... I have a submit button which includes a property = method with value=Save...the enclosing form is submitted to a Struts DispatchAction sub-class which is configured to rely on the method parameter for delegation. In order to prevent a double-submit, in my onSubmit() javascript I disable the button and immediately thereafter return truehowever, I proved that the disabling of the button prevents the required method parameter from being included in the request... I thought about a hidden field but I also established that they ARE NOT added to the request upon submission... Any ideas? Ok this is something you could try script var submitnow = true; function onSubmitFunction () { if(submitnow = true) { submitnow = false; return true; }else { return false; } } /script Not sure if this will work. Because I havent tried it. Michael Dean Senior Java Programmer JIS Applications Maintenance Information Services Division Administrative Office of the Courts 360.704.4008 [EMAIL PROTECTED] -- Puneet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 - BUILD FAILURE - cannot find symbol
Hi, I am new to struts2, I checked out the repository from subversion and I am trying to compile everything, but for some reason I keep getting an error, my repository is in here: C:\cvs\struts2 And I run the following from the command line: C:\cvs\struts2\coremvn -e install When I run the command above I get the following: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \Freemar kerTemplateEngine.java:[35,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \BaseTem plateEngine.java:[32,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util ... And after that I keep getting lots of cannot find symbol errors. Is there anyone out there that can help me please? Regards Cesar Arevalo
Re: Struts2 - BUILD FAILURE - cannot find symbol
Right now, we're still building against the XWork head, and a current XWork snapsnot may not be available. The best thing is to checkout XWork too. The simplest thing is to put it under current, next to struts2. svn co https://svn.opensymphony.com/svn/xwork/trunk xwork We're building with XWork with Maven too, so you can change to xwork, do the mvn install to get a snapshot in your local repository, and then start building s2! -- HTH, Ted. * http://www.husted.com/struts/ On 9/15/06, Arevalo, Cesar (GE Comm Fin, non-ge) [EMAIL PROTECTED] wrote: Hi, I am new to struts2, I checked out the repository from subversion and I am trying to compile everything, but for some reason I keep getting an error, my repository is in here: C:\cvs\struts2 And I run the following from the command line: C:\cvs\struts2\coremvn -e install When I run the command above I get the following: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \Freemar kerTemplateEngine.java:[35,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \BaseTem plateEngine.java:[32,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util ... And after that I keep getting lots of cannot find symbol errors. Is there anyone out there that can help me please? Regards Cesar Arevalo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts2 - BUILD FAILURE - cannot find symbol
Ok, will do that and try to see if it works for me. Thanks a lot PS I never thought that Ted husted would answer back my very first mail post. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Husted Sent: Friday, September 15, 2006 11:03 AM To: Struts Users Mailing List Subject: Re: Struts2 - BUILD FAILURE - cannot find symbol Right now, we're still building against the XWork head, and a current XWork snapsnot may not be available. The best thing is to checkout XWork too. The simplest thing is to put it under current, next to struts2. svn co https://svn.opensymphony.com/svn/xwork/trunk xwork We're building with XWork with Maven too, so you can change to xwork, do the mvn install to get a snapshot in your local repository, and then start building s2! -- HTH, Ted. * http://www.husted.com/struts/ On 9/15/06, Arevalo, Cesar (GE Comm Fin, non-ge) [EMAIL PROTECTED] wrote: Hi, I am new to struts2, I checked out the repository from subversion and I am trying to compile everything, but for some reason I keep getting an error, my repository is in here: C:\cvs\struts2 And I run the following from the command line: C:\cvs\struts2\coremvn -e install When I run the command above I get the following: [INFO] -- -- [ERROR] BUILD FAILURE [INFO] -- -- [INFO] Compilation failure C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\templa te \Freemar kerTemplateEngine.java:[35,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\templa te \BaseTem plateEngine.java:[32,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util ... And after that I keep getting lots of cannot find symbol errors. Is there anyone out there that can help me please? Regards Cesar Arevalo - 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]
Out of topic, Oracle SEQUENCE
Hi I know this the struts mail list, but I have a question and I hope that someone know the answer I'm using an oracle database, I have a sequence to obtain the nextval that will be the key of the row that I will insert, after the insert I need to know which is that value so I can tell the user with which value the row was inserted. Is there a sure fire way to do this, or am I stuck with select max(id) from table and hope nothing else has been inserted in that few milliseconds it takes to go from my insert statement to my select statement? Some code, for better explanation: CREATE SEQUENCE user_seq INCREMENT 1 MINVALUE 0 NOMAXVALUE START WITH 0 NOCACHE NOCYCLE insert into users values (user_seq .nextval, 'userName'); Then I need to know the value with which the row was inserted, how can I do that Thanks! Sorry fot the out of topic question
Re: Out of topic, Oracle SEQUENCE
Use curval to obtain the last selected value for the current oracle session. Note that you cannot access curval until nextval has been used at least once in the current oracle session. select user_seq.curval from dual Daniel Chacón Sánchez wrote: Hi I know this the struts mail list, but I have a question and I hope that someone know the answer I'm using an oracle database, I have a sequence to obtain the nextval that will be the key of the row that I will insert, after the insert I need to know which is that value so I can tell the user with which value the row was inserted. Is there a sure fire way to do this, or am I stuck with select max(id) from table and hope nothing else has been inserted in that few milliseconds it takes to go from my insert statement to my select statement? Some code, for better explanation: CREATE SEQUENCE user_seq INCREMENT 1 MINVALUE 0 NOMAXVALUE START WITH 0 NOCACHE NOCYCLE insert into users values (user_seq .nextval, 'userName'); Then I need to know the value with which the row was inserted, how can I do that Thanks! Sorry fot the out of topic question - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sslext -- anyone using it?
I'm looking into implementing something to force ssl for logins (and a few other pages) and then switching back to standard http once logged in. I found sslext at http://sslext.sourceforge.net/ but it looks like it hasn't been updated in a couple of years. I have a couple of concerns: * I'm running struts 1.3.x, which isn't officially supported * it requires using a custom controller/processorClass. I'm currently using the TilesRequestProcessor. So (I think) I'd have to create a custom Tiles processor that extends their SecureRequestProcessor. Are any of you using sslext? Or, any other solution? I also saw Ted's page at http://husted.com/struts/FAQ/controller- ssl.htm where another solution was offered, but I'm opposed to putting the host/domain info in the struts config file. Any feedback would be appreciated. Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sslext -- anyone using it?
selecting max... isn't a viable solution, because of other sessions as you say. Assuming you're at least using Java, you might want to look at java.sql.Statement.getGeneratedKeys() Oracle database returns generated keys in the 'C' i/f, my memory's rusty for JDBC but I know there is a way somewhere to get the key values in the same statement, rather than have to execute another statement for 'curval'. getGeneratedKeys() may be it. HTH Brett Quoting Michael Rush [EMAIL PROTECTED]: I'm looking into implementing something to force ssl for logins (and a few other pages) and then switching back to standard http once logged in. I found sslext at http://sslext.sourceforge.net/ but it looks like it hasn't been updated in a couple of years. I have a couple of concerns: * I'm running struts 1.3.x, which isn't officially supported * it requires using a custom controller/processorClass. I'm currently using the TilesRequestProcessor. So (I think) I'd have to create a custom Tiles processor that extends their SecureRequestProcessor. Are any of you using sslext? Or, any other solution? I also saw Ted's page at http://husted.com/struts/FAQ/controller- ssl.htm where another solution was offered, but I'm opposed to putting the host/domain info in the struts config file. Any feedback would be appreciated. Thanks, Michael - 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: Out of topic, Oracle SEQUENCE
Thanks so, first: insert into users_values (user_seq .nextval, 'userName'); and then: select user_seq.curval from dual There is not a way to make only one sentence to do that? Like in SQL 2000: SET NOCOUNT ON INSERT INTO USER_VALUES (USER_NAME) VALUES ('DANIEL') *SELECT @@IDENTITY* as userCode SET NOCOUNT OFF
Re: Out of topic, Oracle SEQUENCE
(In case my reply to completely the wrong post didn't get read!...) selecting max... isn't a viable solution, because of other sessions as you say. Assuming you're at least using Java, you might want to look at java.sql.Statement.getGeneratedKeys() Oracle database returns generated keys in the 'C' i/f, my memory's rusty for JDBC but I know there is a way somewhere to get the key values in the same statement, rather than have to execute another statement for 'curval'. getGeneratedKeys() may be it. HTH Brett Quoting Daniel Chacón Sánchez [EMAIL PROTECTED]: Thanks so, first: insert into users_values (user_seq .nextval, 'userName'); and then: select user_seq.curval from dual There is not a way to make only one sentence to do that? Like in SQL 2000: SET NOCOUNT ON INSERT INTO USER_VALUES (USER_NAME) VALUES ('DANIEL') *SELECT @@IDENTITY* as userCode SET NOCOUNT OFF - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sslext -- anyone using it?
Huh. Completely the wrong post to reply to. Sorry folks... this of course was meant for the Oracle Sequence question. Brett Quoting Brett Connor [EMAIL PROTECTED]: selecting max... isn't a viable solution, because of other sessions as you say. Assuming you're at least using Java, you might want to look at java.sql.Statement.getGeneratedKeys() Oracle database returns generated keys in the 'C' i/f, my memory's rusty for JDBC but I know there is a way somewhere to get the key values in the same statement, rather than have to execute another statement for 'curval'. getGeneratedKeys() may be it. HTH Brett Quoting Michael Rush [EMAIL PROTECTED]: I'm looking into implementing something to force ssl for logins (and a few other pages) and then switching back to standard http once logged in. I found sslext at http://sslext.sourceforge.net/ but it looks like it hasn't been updated in a couple of years. I have a couple of concerns: * I'm running struts 1.3.x, which isn't officially supported * it requires using a custom controller/processorClass. I'm currently using the TilesRequestProcessor. So (I think) I'd have to create a custom Tiles processor that extends their SecureRequestProcessor. Are any of you using sslext? Or, any other solution? I also saw Ted's page at http://husted.com/struts/FAQ/controller- ssl.htm where another solution was offered, but I'm opposed to putting the host/domain info in the struts config file. Any feedback would be appreciated. Thanks, Michael - 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: Struts2 - BUILD FAILURE - cannot find symbol
I just had this issue myself. Pat explained it as a bug with Maven2, the solution was to delete the struts and opensymphony directories from your m2 repo (usually under /Documents and Settings/logon/.m2/repo. /Ian Arevalo, Cesar (GE Comm Fin, non-ge) wrote: Hi, I am new to struts2, I checked out the repository from subversion and I am trying to compile everything, but for some reason I keep getting an error, my repository is in here: C:\cvs\struts2 And I run the following from the command line: C:\cvs\struts2\coremvn -e install When I run the command above I get the following: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \Freemar kerTemplateEngine.java:[35,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util C:\cvs\struts2\core\src\main\java\org\apache\struts2\components\template \BaseTem plateEngine.java:[32,36] cannot find symbol symbol : class ClassLoaderUtil location: package com.opensymphony.xwork2.util ... And after that I keep getting lots of cannot find symbol errors. Is there anyone out there that can help me please? Regards Cesar Arevalo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Struts on iPlanet 6.1 SP6
Hi, I have my application deployed on Tomcat 5.5.17 successfully, using JDK 1.5. The application is mainly JSP and Struts. Now, when I port this application to iPlanet, the JSP/Servlet part of the application shows up well. But the struts part does not show up and is throwing exception. (Pasted below). My iPlanet is using JDK 1.5. I am faced with the same problem when it uses JDK 1.4 also. I know that Struts support was added in iPlanet for version 6.0 SP8. Are there any known issues with Struts for iPlanet 6.1? Is there any iPlanet specific code change needed in Struts? -Prashant - Root Cause - javax.servlet.jsp.JspException: ServletException in '/view/searchAccount/searchAccount.jsp': org.apache.struts.taglib.tiles.UseAttributeTei at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag( InsertTag.java:923) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462) at _jsps._view._layout._application_jsp._jspService(_application_jsp.java:211) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:908) at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service( JspServlet.java:687) at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459) at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375) at javax.servlet.http.HttpServlet.service(HttpServlet.java:908) at org.apache.catalina.core.ApplicationDispatcher.invoke( ApplicationDispatcher.java:772) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationDispatcher.java:471) at org.apache.catalina.core.ApplicationDispatcher.forward( ApplicationDispatcher.java:382) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) at org.apache.struts.tiles.Til [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.taglib.tiles.InsertTag.doEndTag( InsertTag.java:462) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at _jsps._view._layout._application_jsp._jspService(_application_jsp.java:211) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:97) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at javax.servlet.http.HttpServlet.service ( HttpServlet.java:908) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service ( JspServlet.java:687) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile (JspServlet.java:459) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at com.iplanet.ias.web.jsp.JspServlet.service (JspServlet.java:375) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at javax.servlet.http.HttpServlet.service ( HttpServlet.java:908) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.catalina.core.ApplicationDispatcher.invoke ( ApplicationDispatcher.java:772) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.catalina.core.ApplicationDispatcher.doForward ( ApplicationDispatcher.java:471) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.catalina.core.ApplicationDispatcher.forward ( ApplicationDispatcher.java:382) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.action.RequestProcessor.doForward ( RequestProcessor.java:1063) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.tiles.TilesRequestProcessor.doForward ( TilesRequestProcessor.java:263) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition ( TilesRequestProcessor.java:239) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig ( TilesRequestProcessor.java:302) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.action.RequestProcessor.process ( RequestProcessor.java:229) [15/Sep/2006:10:39:12] info ( 2356): CORE3282: stdout: at org.apache.struts.action.ActionServlet.process ( ActionServlet.java:1194) [15/Sep/2006:10:39:12] failure ( 2356): for host 172.25.164.82 trying to GET /edm/searchAccountPage.do, service-j2ee reports: StandardWrapperValve[action]: WEB2792: Servlet.service() for servlet action threw exception javax.servlet.ServletException: ServletException in '/view/searchAccount/searchAccount.jsp': org.apache.struts.taglib.tiles.UseAttributeTei at org.apache.jasper.runtime.PageContextImpl.doHandlePageException( PageContextImpl.java:858) at org.apache.jasper.runtime.PageContextImpl.handlePageException( PageContextImpl.java:791) at _jsps._view._layout._application_jsp._jspService(_application_jsp.java:257) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:908) at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(
Re: Out of topic, Oracle SEQUENCE
Daniel, If you are by chance using iBatis, look at their selectKey command. It is the one that seems to be referred to most for this type of need on the iBatis list. If not, sorry. Al Brett Connor wrote: (In case my reply to completely the wrong post didn't get read!...) selecting max... isn't a viable solution, because of other sessions as you say. Assuming you're at least using Java, you might want to look at java.sql.Statement.getGeneratedKeys() Oracle database returns generated keys in the 'C' i/f, my memory's rusty for JDBC but I know there is a way somewhere to get the key values in the same statement, rather than have to execute another statement for 'curval'. getGeneratedKeys() may be it. HTH Brett Quoting Daniel Chacón Sánchez [EMAIL PROTECTED]: Thanks so, first: insert into users_values (user_seq .nextval, 'userName'); and then: select user_seq.curval from dual There is not a way to make only one sentence to do that? Like in SQL 2000: SET NOCOUNT ON INSERT INTO USER_VALUES (USER_NAME) VALUES ('DANIEL') *SELECT @@IDENTITY* as userCode SET NOCOUNT OFF - 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: sslext -- anyone using it?
I have been using the sslext library for some time. I have only used it with Struts 1.1 and 1.2 though, never with 1.3. As for your concerns regarding the custom controller/processor class, sslext comes with a SecureTilesRequestProcessor class. I have been using it with tiles without issue. Adam Michael Rush wrote: I'm looking into implementing something to force ssl for logins (and a few other pages) and then switching back to standard http once logged in. I found sslext at http://sslext.sourceforge.net/ but it looks like it hasn't been updated in a couple of years. I have a couple of concerns: * I'm running struts 1.3.x, which isn't officially supported * it requires using a custom controller/processorClass. I'm currently using the TilesRequestProcessor. So (I think) I'd have to create a custom Tiles processor that extends their SecureRequestProcessor. Are any of you using sslext? Or, any other solution? I also saw Ted's page at http://husted.com/struts/FAQ/controller-ssl.htm where another solution was offered, but I'm opposed to putting the host/domain info in the struts config file. Any feedback would be appreciated. Thanks, Michael - 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: Out of topic, Oracle SEQUENCE
Not Albert, but thanks, you have give me more solutions than in the metalink foro of oracle, thanks!! Another solution, to do only one sentence, I do´nt want to obtain the userCode of an insert sentence that occur between the insert and the select user_seq.curval from dual, any other solution ?? 2006/9/15, Albert L. Sapp [EMAIL PROTECTED]: Daniel, If you are by chance using iBatis, look at their selectKey command. It is the one that seems to be referred to most for this type of need on the iBatis list. If not, sorry. Al Brett Connor wrote: (In case my reply to completely the wrong post didn't get read!...) selecting max... isn't a viable solution, because of other sessions as you say. Assuming you're at least using Java, you might want to look at java.sql.Statement.getGeneratedKeys() Oracle database returns generated keys in the 'C' i/f, my memory's rusty for JDBC but I know there is a way somewhere to get the key values in the same statement, rather than have to execute another statement for 'curval'. getGeneratedKeys() may be it. HTH Brett Quoting Daniel Chacón Sánchez [EMAIL PROTECTED]: Thanks so, first: insert into users_values (user_seq .nextval, 'userName'); and then: select user_seq.curval from dual There is not a way to make only one sentence to do that? Like in SQL 2000: SET NOCOUNT ON INSERT INTO USER_VALUES (USER_NAME) VALUES ('DANIEL') *SELECT @@IDENTITY* as userCode SET NOCOUNT OFF - 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: sslext -- anyone using it?
I have been using the sslext library for some time. I have only used it with Struts 1.1 and 1.2 though, never with 1.3. As for your concerns regarding the custom controller/processor class, sslext comes with a SecureTilesRequestProcessor class. I have been using it with tiles without issue. Adam Thats helpful. I guess I'll download it and give it a try. Thanks! -michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Out of topic, Oracle SEQUENCE
In PL/SQL: DECLARE new_user_id NUMBER; BEGIN INSERT INTO users ( user_id, user_name ) VALUES ( user_seq.NEXTVAL, 'userName' ) RETURNING user_id INTO new_user_id; END; So, similarly (though a little bit of a hack), in JDBC (since generatedKeys() or whatever they call it isn't supported, though been promised since Oracle 7-8?): // context: con is a java.sql.Connection CallableStatement stmt = con.prepareCall( {call + INSERT INTO users ( user_id, user_name ) + VALUES ( user_seq.NEXTVAL, ? ) + RETURNING user_id INTO ?} ); stmt.registerOutParameter( 2, java.sql.Types.NUMERIC ); stmt.setString( 1, userName ); stmt.executeUpdate(); long newId = stmt.getLong( 2 ); A few things, - Whitespace can be detrimental to the prepareCall statement. Don't put any spaces in {call. - Specify the column list before VALUES--Oracle won't guarantee column order across databases. - Get yourself a nice persistence layer (Hibernate?) :). HTH, Scott Daniel Chacón Sánchez wrote: Hi I know this the struts mail list, but I have a question and I hope that someone know the answer I'm using an oracle database, I have a sequence to obtain the nextval that will be the key of the row that I will insert, after the insert I need to know which is that value so I can tell the user with which value the row was inserted. Is there a sure fire way to do this, or am I stuck with select max(id) from table and hope nothing else has been inserted in that few milliseconds it takes to go from my insert statement to my select statement? Some code, for better explanation: CREATE SEQUENCE user_seq INCREMENT 1 MINVALUE 0 NOMAXVALUE START WITH 0 NOCACHE NOCYCLE insert into users values (user_seq .nextval, 'userName'); Then I need to know the value with which the row was inserted, how can I do that Thanks! Sorry fot the out of topic question - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Out of topic, Oracle SEQUENCE
Well you where correct, this is the answer of a metalink user: user_seq.CURRVAL (with two R's) is the last number that was assigned in your session. Even if records are added in other sessions, your CURRVAL remains the same. Try it. Open two SQL*Plus windows (you can even use the same username) and see that CURRVAL in one remains the same even while CURRVAL in the other increases. Thanks all, and sorry for the out the topic question
Re: Rediction, ActionForward and Internal Server Error
On 9/15/06, Alexis MAILLOT [EMAIL PROTECTED] wrote: I'm sending a rediction (with HttpServletResponse.sendRedirect or with a new ActionForward) : everything works fine except the http return code which is 500 (instead of 200 or 302)... The application is runing under Websphere Application Server 6. Anyone can help me ? HTTP sniffer can help you. You may get a proper 302 for the redirect itself, then 500 for the resource that you are redirecting to. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to implement tokens
try this: boolean tokenValid = isTokenValid(request); if(tokenValid){ resetToken(request); return true; } else{ saveToken(request); return false; } i use it for control the user double click on bottons
RE: dependent drop down lists
You'd need to rebuild the second list on the posting of the form, i.e. 1. get value selected from first list 2. invoke method to refresh dependent list based on user prm from fist list 3. place that list into a request attribute to read on the page. Here's a code snippet. The prepareLOVs is called on a post-back event: public void prepareLOVs(ActionForm form, HttpServletRequest request) throws Exception { MyForm myform = (MyForm) form; String strCountyId = myform.getCounty_id(); AppModule am = new AppModuleImpl( request.getRemoteUser() ); List municipalities = am.getPaMunicipalitiesView( strCountyId ); request.setAttribute ( Constants.MUNICIPALITIES_LOV, municipalities ); } -Original Message- From: Joe Yuen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 4:18 PM To: user@struts.apache.org Subject: dependent drop down lists Importance: High I currently having trouble implementing dependent drop down lists. Do anyone know where I might see an example of how to implement such a thing? Thanks, -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: calling method of a bean from JSP
Lixin Chu wrote: What are you trying to achieve? Maybe you're trying to put logic in your JSPs that more properly belongs in an action. thanks. what i am trying to do is to get the value of a field. Say I get a list of items: class item { Set values; } The item has a set of Values: class Value { Attribute attribute; String value; } What I wanted to do is to get one particular value based on attribute ID. in this case I have to add a method in the Item class, someting like this: String getValue (String id) { while (it.hasNext()) { Value value = (value) it.next(); if (value.attribute.getId().toString().equals (id) return value.value; } So from JSP, I would like to call this method c:out value=${item.getValue (id}/ c:out value=${item.value[id]}/ ? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect from tile controller
In general, the RequestProcessor calls processActionPerform() (that returns the ActionForward, say FORWARD1) and then last thing it calls is processActionForward(). Is there a way to redirect the request to a different ActionForward if there is a problem with FORWARD1? -RG -Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 10:05 AM To: Struts Users Mailing List Subject: Re: Redirect from tile controller If you are using TilesRequestProcessor as your controller (and it's probably not limited to this class) you can extend it to add any methods you need to call from an Action's execute(...) method. The trick is getting an instance of the controller from within the action - and I don't know how to do that off hand. I've previously asked this question but did not receive a satisfactory response - someone suggested that it might be on the request - it wasn't. -adam Gupta, Rahul wrote: Hi, I have a layout JSP (layout.jsp) with two tiles. I am using tile controllers to populate data to be displayed in each tile. Code is specified below. If an exception is thrown by 2nd tile controller, is there a way to redirect to a completely new JSP (say error.jsp), instead of displaying the layout JSP? There is no return Actionforward from a org.apache.struts.tiles.Controller (as is present in Action class). Thanks, RG layout.jsp: --- HTMLBODYtable trtd tiles:insert definition=.A/ /tr/td trtd tiles:insert definition=.B/ /tr/td /table/BODY/HTML definition name=.A path=/a.jsp controllerClass=ATileController / definition name=.B path=/b.jsp controllerClass=BTileController / - 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: dependent drop down lists
Other option is 1-Store all the data in tokenized form in a hidden variable. something like this- a1|b1|[EMAIL PROTECTED]|b2|c2@ | and @ are delimiters. 2-Use javascript split function on the onchange of first list and create the second list with javascript -Original Message- From: Givler, Eric [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 2:23 PM To: Struts Users Mailing List Subject: RE: dependent drop down lists You'd need to rebuild the second list on the posting of the form, i.e. 1. get value selected from first list 2. invoke method to refresh dependent list based on user prm from fist list 3. place that list into a request attribute to read on the page. Here's a code snippet. The prepareLOVs is called on a post-back event: public void prepareLOVs(ActionForm form, HttpServletRequest request) throws Exception { MyForm myform = (MyForm) form; String strCountyId = myform.getCounty_id(); AppModule am = new AppModuleImpl( request.getRemoteUser() ); List municipalities = am.getPaMunicipalitiesView( strCountyId ); request.setAttribute ( Constants.MUNICIPALITIES_LOV, municipalities ); } -Original Message- From: Joe Yuen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 4:18 PM To: user@struts.apache.org Subject: dependent drop down lists Importance: High I currently having trouble implementing dependent drop down lists. Do anyone know where I might see an example of how to implement such a thing? Thanks, -Joe - 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]
set value to an html:hidden in jsp page
Hi I need to put value to an html:hidden / field in the own page jsp. Thanks
Re: calling method of a bean from JSP
i do not think it works.