Re: STRUTS 2: fail to retrieve values without repost
I forgot to map my success. That's why it only send information on my repost. Thanks Musachy Barroso wrote: > > do you have getters/setters(I am guessing the setters are missing) in > your action for all the form fields? > > musachy > > On Feb 6, 2008 10:29 AM, Nushi <[EMAIL PROTECTED]> wrote: >> >> I only seem to get my values of my form when i repost. >> >> CODE >> >> <%@ taglib prefix="s" uri="/struts-tags" %> >> >> >> File Upload Example >> " rel="stylesheet" >> type="text/css"/> >> >> >> >> >> >> >> >> >> >> File Upload Example >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> pages/upload.jsp >> >> >> >> > class="Upload" > >> showUpload >> pages/upload-success.jsp >> >> >> >> >> I get nothing, until I refresh my page, and then it fills my values. >> >> Thx in advance! >> >> Nushi >> -- >> View this message in context: >> http://www.nabble.com/STRUTS-2%3A-fail-to-retrieve-values-without-repost-tp15306729p15306729.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> ----- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/STRUTS-2%3A-fail-to-retrieve-values-without-repost-tp15306729p15328266.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: STRUTS 2: fail to retrieve values without repost
do you have getters/setters(I am guessing the setters are missing) in your action for all the form fields? musachy On Feb 6, 2008 10:29 AM, Nushi <[EMAIL PROTECTED]> wrote: > > I only seem to get my values of my form when i repost. > > CODE > > <%@ taglib prefix="s" uri="/struts-tags" %> > > > File Upload Example > " rel="stylesheet" > type="text/css"/> > > > > > > > > > > File Upload Example > > > > > > > > > > > > > > > > > > > pages/upload.jsp > > > > class="Upload" > > showUpload > pages/upload-success.jsp > > > > > I get nothing, until I refresh my page, and then it fills my values. > > Thx in advance! > > Nushi > -- > View this message in context: > http://www.nabble.com/STRUTS-2%3A-fail-to-retrieve-values-without-repost-tp15306729p15306729.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
STRUTS 2: fail to retrieve values without repost
I only seem to get my values of my form when i repost. CODE <%@ taglib prefix="s" uri="/struts-tags" %> File Upload Example " rel="stylesheet" type="text/css"/> File Upload Example pages/upload.jsp showUpload pages/upload-success.jsp I get nothing, until I refresh my page, and then it fills my values. Thx in advance! Nushi -- View this message in context: http://www.nabble.com/STRUTS-2%3A-fail-to-retrieve-values-without-repost-tp15306729p15306729.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WW2.1.7 to S2: Most S2 tags fails to retrieve values
Just a quick followup to my own post, in case anyone is interested. The Velocity templates have been moved in S2 to "template/archive", so most of my problems were solved by setting "struts.ui.templateDir=template/archive" and moving my application templates to "template/archive" as well (that way the non-overridden templates could be located, I guess). The s:textfield problems were solved by removing the value attribute from , this works in WW 2.1.7 but not in S2 where the value is taken literally. /Claes wwwclaes wrote: > > Hi, I'm porting an old WW 2.1.7 application to S2. This is a bit > confusing, but I'm on my way and have managed to get it up and running > with limited functionality. One of my major problems right now is that > most S2 tags do no longer get their values. > > The rendering of s:textfield contains the name of the value attribute > instead of its underlying value, eg mailAddress instead of > [EMAIL PROTECTED] > > The rendering of s:select is always empty, instead of filled with options > as it is supposed to be (and was in WW 2.1.7). > > Some S2 tags DO retrieve their values, eg an explicit with > s:property in an s:iterator loop is correctly filled with its options. > > For some additional clues; the application uses Velocity so I added > "struts.ui.templateSuffix=vm" to struts.properties. If I remove that, the > GUI gets somewhat messy but s:select suddenly get their values (doesn't > help for s:textfield though). > > I'm lost in Struts territory. Anyone that can help me out? > > Thanks, > Claes > -- View this message in context: http://www.nabble.com/WW2.1.7-to-S2%3A-Most-S2-tags-fails-to-retrieve-values-tp14567668p14598569.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WW2.1.7 to S2: Most S2 tags fails to retrieve values
Hi, I'm porting an old WW 2.1.7 application to S2. This is a bit confusing, but I'm on my way and have managed to get it up and running with limited functionality. One of my major problems right now is that most S2 tags do no longer get their values. The rendering of s:textfield contains the name of the value attribute instead of its underlying value, eg mailAddress instead of [EMAIL PROTECTED] The rendering of s:select is always empty, instead of filled with options as it is supposed to be (and was in WW 2.1.7). Some S2 tags DO retrieve their values, eg an explicit with s:property in an s:iterator loop is correctly filled with its options. For some additional clues; the application uses Velocity so I added "struts.ui.templateSuffix=vm" to struts.properties. If I remove that, the GUI gets somewhat messy but s:select suddenly get their values (doesn't help for s:textfield though). I'm lost in Struts territory. Anyone that can help me out? Thanks, Claes -- View this message in context: http://www.nabble.com/WW2.1.7-to-S2%3A-Most-S2-tags-fails-to-retrieve-values-tp14567668p14567668.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieve values
Struts does not serialize and deserialize complex objects for you. If you need to serialize vector into string and to deserialize it back you need to do it yourself. Another approach is to keep the vector in the session instead of sending it to client and then back to server. On 6/7/06, Maya menon <[EMAIL PROTECTED]> wrote: Can anyone please help here ? 1. request.setAttribute -> sets a vector in Action class 1 2. In jsp, displays the values in vector using iterate tag and theres a hidden field with value as values in vector. In this jsp, the next .do is getting called like 3. In the next action class, I want to get it String x = request.getParameter("data"); and again create a vector, to set it to the request If I do that, in the jsp, it says: no getter method found. please suggest me where I am wrong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Retrieve values
Can anyone please help here ? 1. request.setAttribute -> sets a vector in Action class 1 2. In jsp, displays the values in vector using iterate tag and theres a hidden field with value as values in vector. In this jsp, the next .do is getting called like 3. In the next action class, I want to get it String x = request.getParameter("data"); and again create a vector, to set it to the request If I do that, in the jsp, it says: no getter method found. please suggest me where I am wrong Maya menon <[EMAIL PROTECTED]> wrote: Yes, regarding this: I want to get the value and again create a vector out of it. Also, I am going to the next page with a link, < ahref=""?data=/> Like String values = request.getParameter("data"); //This gives objects. I get the string. Now I want to make a vector of it and then use the tag again. If I just use vector.add(String) and then use iterate tag, it shows error saying, no getter method found.. [EMAIL PROTECTED] wrote: In the action where the form is submitted you call request.getAttributr("data") as the input hidden type's name is data -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 18:34 To: Struts Users Mailing List Subject: Retrieve values I tried storing vector values in a hidden field. [input] "/> where data is a vector which I have set into the request type. Now how will I retrieve it ? Maya menon wrote: Manoj, In the vector I am storing a data object with 6 fields. I am using the iterate tag to iterate thru the vector and display the results. Thanks [EMAIL PROTECTED] wrote: Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe. ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe. With that difference in mind, using synchronization will incur a performance hit. So if you don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization unnecessarily? Also can you tell me what exactly are you storing in vector? I need this to tell you the best possible answer as when navigating through the pages (through actions) if the information is small you can use hidden values to pass the values around which you want to manage Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 15:21 To: Struts Users Mailing List Subject: RE: Handling attribute values Manoj, Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling comfortable. Because the application can be accessed simultaneously by lots. So, In EditAction, is there a way to get the attribute from request ? [EMAIL PROTECTED] wrote: Maya, It seems you storing a list of records in request Set the attribute in session scope, and when you delete the record update the attribute in session when you are in editAction Or In Edit action again set the update attribute in request scope Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 14:52 To: user@struts.apache.org Subject: Handling attribute values Hi all, 1. I have an action class, DisplayAction which displays the records from database. Here I am setting a vector into the request scope and on success forwarding it to displayresults.jsp. 2. Display results.jsp displays all records with an option of delete to the users. 3. Now, once user deletes the records, by going to editaction, on success it should again display the displayresults.jsp. How will I get the attribute I set in step one here again. what path should I follow ? DisplayAction -> displayResults -> EditAction EditAction should again display displayResults and get the attribute set in DisplayAction. Please help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.co
RE: Retrieve values
Yes, regarding this: I want to get the value and again create a vector out of it. Also, I am going to the next page with a link, < ahref=""?data=/> Like String values = request.getParameter("data"); //This gives objects. I get the string. Now I want to make a vector of it and then use the tag again. If I just use vector.add(String) and then use iterate tag, it shows error saying, no getter method found.. [EMAIL PROTECTED] wrote: In the action where the form is submitted you call request.getAttributr("data") as the input hidden type's name is data -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 18:34 To: Struts Users Mailing List Subject: Retrieve values I tried storing vector values in a hidden field. [input] "/> where data is a vector which I have set into the request type. Now how will I retrieve it ? Maya menon wrote: Manoj, In the vector I am storing a data object with 6 fields. I am using the iterate tag to iterate thru the vector and display the results. Thanks [EMAIL PROTECTED] wrote: Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe. ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe. With that difference in mind, using synchronization will incur a performance hit. So if you don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization unnecessarily? Also can you tell me what exactly are you storing in vector? I need this to tell you the best possible answer as when navigating through the pages (through actions) if the information is small you can use hidden values to pass the values around which you want to manage Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 15:21 To: Struts Users Mailing List Subject: RE: Handling attribute values Manoj, Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling comfortable. Because the application can be accessed simultaneously by lots. So, In EditAction, is there a way to get the attribute from request ? [EMAIL PROTECTED] wrote: Maya, It seems you storing a list of records in request Set the attribute in session scope, and when you delete the record update the attribute in session when you are in editAction Or In Edit action again set the update attribute in request scope Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 14:52 To: user@struts.apache.org Subject: Handling attribute values Hi all, 1. I have an action class, DisplayAction which displays the records from database. Here I am setting a vector into the request scope and on success forwarding it to displayresults.jsp. 2. Display results.jsp displays all records with an option of delete to the users. 3. Now, once user deletes the records, by going to editaction, on success it should again display the displayresults.jsp. How will I get the attribute I set in step one here again. what path should I follow ? DisplayAction -> displayResults -> EditAction EditAction should again display displayResults and get the attribute set in DisplayAction. Please help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
RE: Retrieve values
In the action where the form is submitted you call request.getAttributr("data") as the input hidden type's name is data -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 18:34 To: Struts Users Mailing List Subject: Retrieve values I tried storing vector values in a hidden field. "/> where data is a vector which I have set into the request type. Now how will I retrieve it ? Maya menon <[EMAIL PROTECTED]> wrote: Manoj, In the vector I am storing a data object with 6 fields. I am using the iterate tag to iterate thru the vector and display the results. Thanks [EMAIL PROTECTED] wrote: Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe. ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe. With that difference in mind, using synchronization will incur a performance hit. So if you don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization unnecessarily? Also can you tell me what exactly are you storing in vector? I need this to tell you the best possible answer as when navigating through the pages (through actions) if the information is small you can use hidden values to pass the values around which you want to manage Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 15:21 To: Struts Users Mailing List Subject: RE: Handling attribute values Manoj, Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling comfortable. Because the application can be accessed simultaneously by lots. So, In EditAction, is there a way to get the attribute from request ? [EMAIL PROTECTED] wrote: Maya, It seems you storing a list of records in request Set the attribute in session scope, and when you delete the record update the attribute in session when you are in editAction Or In Edit action again set the update attribute in request scope Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 14:52 To: user@struts.apache.org Subject: Handling attribute values Hi all, 1. I have an action class, DisplayAction which displays the records from database. Here I am setting a vector into the request scope and on success forwarding it to displayresults.jsp. 2. Display results.jsp displays all records with an option of delete to the users. 3. Now, once user deletes the records, by going to editaction, on success it should again display the displayresults.jsp. How will I get the attribute I set in step one here again. what path should I follow ? DisplayAction -> displayResults -> EditAction EditAction should again display displayResults and get the attribute set in DisplayAction. Please help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Retrieve values
I tried storing vector values in a hidden field. "/> where data is a vector which I have set into the request type. Now how will I retrieve it ? Maya menon <[EMAIL PROTECTED]> wrote: Manoj, In the vector I am storing a data object with 6 fields. I am using the iterate tag to iterate thru the vector and display the results. Thanks [EMAIL PROTECTED] wrote: Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe. ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe. With that difference in mind, using synchronization will incur a performance hit. So if you don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization unnecessarily? Also can you tell me what exactly are you storing in vector? I need this to tell you the best possible answer as when navigating through the pages (through actions) if the information is small you can use hidden values to pass the values around which you want to manage Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 15:21 To: Struts Users Mailing List Subject: RE: Handling attribute values Manoj, Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling comfortable. Because the application can be accessed simultaneously by lots. So, In EditAction, is there a way to get the attribute from request ? [EMAIL PROTECTED] wrote: Maya, It seems you storing a list of records in request Set the attribute in session scope, and when you delete the record update the attribute in session when you are in editAction Or In Edit action again set the update attribute in request scope Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 14:52 To: user@struts.apache.org Subject: Handling attribute values Hi all, 1. I have an action class, DisplayAction which displays the records from database. Here I am setting a vector into the request scope and on success forwarding it to displayresults.jsp. 2. Display results.jsp displays all records with an option of delete to the users. 3. Now, once user deletes the records, by going to editaction, on success it should again display the displayresults.jsp. How will I get the attribute I set in step one here again. what path should I follow ? DisplayAction -> displayResults -> EditAction EditAction should again display displayResults and get the attribute set in DisplayAction. Please help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Retrieve values
I tried storing vector values in a hidden field. "/> where data is a vector which I have set into the request type. Now how will I retrieve it ? Maya menon <[EMAIL PROTECTED]> wrote: Manoj, In the vector I am storing a data object with 6 fields. I am using the iterate tag to iterate thru the vector and display the results. Thanks [EMAIL PROTECTED] wrote: Maya, Vectors are synchronized. Any method that touches the Vector's contents is thread safe. ArrayList, on the other hand, is unsynchronized, making them, therefore, not thread safe. With that difference in mind, using synchronization will incur a performance hit. So if you don't need a thread-safe collection, use the ArrayList. Why pay the price of synchronization unnecessarily? Also can you tell me what exactly are you storing in vector? I need this to tell you the best possible answer as when navigating through the pages (through actions) if the information is small you can use hidden values to pass the values around which you want to manage Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 15:21 To: Struts Users Mailing List Subject: RE: Handling attribute values Manoj, Yes, I am storing a vector in request attribute. Using session attribute, I am not feeling comfortable. Because the application can be accessed simultaneously by lots. So, In EditAction, is there a way to get the attribute from request ? [EMAIL PROTECTED] wrote: Maya, It seems you storing a list of records in request Set the attribute in session scope, and when you delete the record update the attribute in session when you are in editAction Or In Edit action again set the update attribute in request scope Cheers -Original Message- From: Maya menon [mailto:[EMAIL PROTECTED] Sent: 07 June 2006 14:52 To: user@struts.apache.org Subject: Handling attribute values Hi all, 1. I have an action class, DisplayAction which displays the records from database. Here I am setting a vector into the request scope and on success forwarding it to displayresults.jsp. 2. Display results.jsp displays all records with an option of delete to the users. 3. Now, once user deletes the records, by going to editaction, on success it should again display the displayresults.jsp. How will I get the attribute I set in step one here again. what path should I follow ? DisplayAction -> displayResults -> EditAction EditAction should again display displayResults and get the attribute set in DisplayAction. Please help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com