Author Login
Post Reply
user Digest 7 Jan 2010 01:00:51 -0000 Issue 8975
Topics (messages 204521 through 204536):
src download link for struts 2.1.8.1 incorrect
204521 by: Brice Roncace
I8nl with display table not working on specific cases
204522 by: Saeed Iqbal
204523 by: Chris Pratt
Re: Why optionscollection doesn't persist the clicked value
204524 by: Hanen Ben Rhouma
204525 by: Kawczynski, David
204526 by: Hanen Ben Rhouma
204527 by: Kawczynski, David
Re: problems with struts2 and session
204528 by: Sergio
Need your input.
204529 by: sharath karnati
204530 by: Gabriel Belingueres
struts2 and tables
204531 by: Sergio
204532 by: Chris Pratt
204533 by: Frans Thamura
204534 by: Chris Pratt
204535 by: Frans Thamura
204536 by: Chris Pratt
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_204521.ezm (zipped)Just an FYI: the link to the struts 2.1.8.1 source zip file points to the
struts 2.1.8 source,
http://apache.inetbridge.net/struts/source/struts-2.1.8-src.zip (it should
be http://apache.inetbridge.net/struts/source/struts-2.1.8.1-src.zip).
Brice

Attachment:
user_204522.ezm (zipped)The titleKey is not working when display:column tag is closed outside of its
declaration body. When it has some lines in it to display in table. It
doesnt work.
--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Attachment:
user_204523.ezm (zipped)You might have more luck posting this on the DisplayTag user list.
(*Chris*)
On Wed, Jan 6, 2010 at 8:29 AM, Saeed Iqbal <saeedcs@(protected):
> The titleKey is not working when display:column tag is closed outside of
> its
> declaration body. When it has some lines in it to display in table. It
> doesnt work.
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>

Attachment:
user_204524.ezm (zipped)When re-rendered it displays two drop down lists filled with two collections
results but blank default value shown on both of them while I need to keep
the first selected value shown to the user.
On Wed, Jan 6, 2010 at 5:21 PM, Kawczynski, David <
david_kawczynski@(protected):
> That's odd.
>
> If you were to <struts:write> the actionform's property
> when the page is re-rendered, what does it contain?
>
>
>
> > -----Original Message-----
> > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > Sent: Wednesday, January 06, 2010 10:54 AM
> > To: Struts Users Mailing List
> > Subject: Re: Why optionscollection doesn't persist the clicked value
> >
> > Yes it is.
> >
> > On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> > david_kawczynski@(protected):
> >
> > > To further clarify:
> > > Is the optionscollection inside an <html:select> element?
> > > Is the scope of the corresponding action-form "session"?
> > >
> > > > -----Original Message-----
> > > > From: Kawczynski, David
> > > > Sent: Wednesday, January 06, 2010 9:46 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Why optionscollection doesn't persist the
> > clicked value
> > > >
> > > > Is the scope of the corresponding action-form "session"?
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Why optionscollection doesn't persist the clicked value
> > > > >
> > > > > Hello,
> > > > >
> > > > > I don't understand why optionscollection doesn't persist the
> > > > > clicked value.
> > > > >
> > > > > I'm using many of them: second one is filled after selecting
> > > > > one parameter
> > > > > from the first one and so on but the thing is that after each
> > > > > selection it
> > > > > reloads the jsp page without persisting the first clicked
> > > > > value in the drop
> > > > > down list.
> > > > >
> > > > > Do someone know the reason or even a tricky workaround ?
> > > > >
> > > > > Thanks in advance
> > > > >
> > > Notice: This e-mail message, together with any
> > attachments, contains
> > > information of Merck & Co., Inc. (One Merck Drive,
> > Whitehouse Station, New
> > > Jersey, USA 08889), and/or its affiliates Direct contact
> > information for
> > > affiliates is available at
> > http://www.merck.com/contact/contacts.html)
> > > that may be confidential, proprietary copyrighted and/or
> > legally privileged.
> > > It is intended solely for the use of the individual or
> > entity named on this
> > > message. If you are not the intended recipient, and have
> > received this
> > > message in error, please notify us immediately by reply
> > e-mail and then
> > > delete it from your system.
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates Direct contact information for
> affiliates is available at http://www.merck.com/contact/contacts.html)
> that may be confidential, proprietary copyrighted and/or legally privileged.
> It is intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and then
> delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_204525.ezm (zipped)Does the second <select> element's options change when the first
<select> element is changed?
Is the second <select> element's options based on what was selected
in the first <select> element?
How do you get the JSP to re-render when the first <select> element
is changed?
> -----Original Message-----
> From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> Sent: Wednesday, January 06, 2010 11:50 AM
> To: Struts Users Mailing List
> Subject: Re: Why optionscollection doesn't persist the clicked value
>
> When re-rendered it displays two drop down lists filled with
> two collections
> results but blank default value shown on both of them while I
> need to keep
> the first selected value shown to the user.
>
> On Wed, Jan 6, 2010 at 5:21 PM, Kawczynski, David <
> david_kawczynski@(protected):
>
> > That's odd.
> >
> > If you were to <struts:write> the actionform's property
> > when the page is re-rendered, what does it contain?
> >
> >
> >
> > > -----Original Message-----
> > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > Sent: Wednesday, January 06, 2010 10:54 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Why optionscollection doesn't persist the
> clicked value
> > >
> > > Yes it is.
> > >
> > > On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> > > david_kawczynski@(protected):
> > >
> > > > To further clarify:
> > > > Is the optionscollection inside an <html:select> element?
> > > > Is the scope of the corresponding action-form "session"?
> > > >
> > > > > -----Original Message-----
> > > > > From: Kawczynski, David
> > > > > Sent: Wednesday, January 06, 2010 9:46 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: Why optionscollection doesn't persist the
> > > clicked value
> > > > >
> > > > > Is the scope of the corresponding action-form "session"?
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Why optionscollection doesn't persist the
> clicked value
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I don't understand why optionscollection doesn't persist the
> > > > > > clicked value.
> > > > > >
> > > > > > I'm using many of them: second one is filled after selecting
> > > > > > one parameter
> > > > > > from the first one and so on but the thing is that
> after each
> > > > > > selection it
> > > > > > reloads the jsp page without persisting the first clicked
> > > > > > value in the drop
> > > > > > down list.
> > > > > >
> > > > > > Do someone know the reason or even a tricky workaround ?
> > > > > >
> > > > > > Thanks in advance
> > > > > >
> > > > Notice: This e-mail message, together with any
> > > attachments, contains
> > > > information of Merck & Co., Inc. (One Merck Drive,
> > > Whitehouse Station, New
> > > > Jersey, USA 08889), and/or its affiliates Direct contact
> > > information for
> > > > affiliates is available at
> > > http://www.merck.com/contact/contacts.html)
> > > > that may be confidential, proprietary copyrighted and/or
> > > legally privileged.
> > > > It is intended solely for the use of the individual or
> > > entity named on this
> > > > message. If you are not the intended recipient, and have
> > > received this
> > > > message in error, please notify us immediately by reply
> > > e-mail and then
> > > > delete it from your system.
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > Notice: This e-mail message, together with any
> attachments, contains
> > information of Merck & Co., Inc. (One Merck Drive,
> Whitehouse Station, New
> > Jersey, USA 08889), and/or its affiliates Direct contact
> information for
> > affiliates is available at
> http://www.merck.com/contact/contacts.html)
> > that may be confidential, proprietary copyrighted and/or
> legally privileged.
> > It is intended solely for the use of the individual or
> entity named on this
> > message. If you are not the intended recipient, and have
> received this
> > message in error, please notify us immediately by reply
> e-mail and then
> > delete it from your system.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

Attachment:
user_204526.ezm (zipped)Actually the second <select> starts by being greyed out, after selecting one
parameter in the first list it will be filled with the collection of values
(retrieved after knowing what the user has selected in the first <select>).
I just keep the first collection into session and call the struts action
through the "onchange" javascript method so it reloads the first collection
and execute the action just by selecting one value.
On Wed, Jan 6, 2010 at 6:02 PM, Kawczynski, David <
david_kawczynski@(protected):
> Does the second <select> element's options change when the first
> <select> element is changed?
>
> Is the second <select> element's options based on what was selected
> in the first <select> element?
>
> How do you get the JSP to re-render when the first <select> element
> is changed?
>
> > -----Original Message-----
> > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > Sent: Wednesday, January 06, 2010 11:50 AM
> > To: Struts Users Mailing List
> > Subject: Re: Why optionscollection doesn't persist the clicked value
> >
> > When re-rendered it displays two drop down lists filled with
> > two collections
> > results but blank default value shown on both of them while I
> > need to keep
> > the first selected value shown to the user.
> >
> > On Wed, Jan 6, 2010 at 5:21 PM, Kawczynski, David <
> > david_kawczynski@(protected):
> >
> > > That's odd.
> > >
> > > If you were to <struts:write> the actionform's property
> > > when the page is re-rendered, what does it contain?
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > Sent: Wednesday, January 06, 2010 10:54 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Why optionscollection doesn't persist the
> > clicked value
> > > >
> > > > Yes it is.
> > > >
> > > > On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> > > > david_kawczynski@(protected):
> > > >
> > > > > To further clarify:
> > > > > Is the optionscollection inside an <html:select> element?
> > > > > Is the scope of the corresponding action-form "session"?
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Kawczynski, David
> > > > > > Sent: Wednesday, January 06, 2010 9:46 AM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: RE: Why optionscollection doesn't persist the
> > > > clicked value
> > > > > >
> > > > > > Is the scope of the corresponding action-form "session"?
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > > > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: Why optionscollection doesn't persist the
> > clicked value
> > > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I don't understand why optionscollection doesn't persist the
> > > > > > > clicked value.
> > > > > > >
> > > > > > > I'm using many of them: second one is filled after selecting
> > > > > > > one parameter
> > > > > > > from the first one and so on but the thing is that
> > after each
> > > > > > > selection it
> > > > > > > reloads the jsp page without persisting the first clicked
> > > > > > > value in the drop
> > > > > > > down list.
> > > > > > >
> > > > > > > Do someone know the reason or even a tricky workaround ?
> > > > > > >
> > > > > > > Thanks in advance
> > > > > > >
> > > > > Notice: This e-mail message, together with any
> > > > attachments, contains
> > > > > information of Merck & Co., Inc. (One Merck Drive,
> > > > Whitehouse Station, New
> > > > > Jersey, USA 08889), and/or its affiliates Direct contact
> > > > information for
> > > > > affiliates is available at
> > > > http://www.merck.com/contact/contacts.html)
> > > > > that may be confidential, proprietary copyrighted and/or
> > > > legally privileged.
> > > > > It is intended solely for the use of the individual or
> > > > entity named on this
> > > > > message. If you are not the intended recipient, and have
> > > > received this
> > > > > message in error, please notify us immediately by reply
> > > > e-mail and then
> > > > > delete it from your system.
> > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > > For additional commands, e-mail: user-help@(protected)
> > > > >
> > > > >
> > > >
> > > Notice: This e-mail message, together with any
> > attachments, contains
> > > information of Merck & Co., Inc. (One Merck Drive,
> > Whitehouse Station, New
> > > Jersey, USA 08889), and/or its affiliates Direct contact
> > information for
> > > affiliates is available at
> > http://www.merck.com/contact/contacts.html)
> > > that may be confidential, proprietary copyrighted and/or
> > legally privileged.
> > > It is intended solely for the use of the individual or
> > entity named on this
> > > message. If you are not the intended recipient, and have
> > received this
> > > message in error, please notify us immediately by reply
> > e-mail and then
> > > delete it from your system.
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates Direct contact information for
> affiliates is available at http://www.merck.com/contact/contacts.html)
> that may be confidential, proprietary copyrighted and/or legally privileged.
> It is intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and then
> delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_204527.ezm (zipped)The collection used in an optionscollection object
doesn't keep track of which option was selected; that
is done via <html:select> and whatever action-form
property that <html:select> is bound to. The <html:select>
object will take care of re-rendering the selected object
if your action-form is maintained in session scope, and
your action-form has a property to store the first <select>
element's value, and you use <html:select> to render the
first <select> element, and you have the <select> element's
onchange attribute submit the form
(EG onchange="document.getElementById('formId').submit();")
HTH,
-dave
> -----Original Message-----
> From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> Sent: Wednesday, January 06, 2010 12:46 PM
> To: Struts Users Mailing List
> Subject: Re: Why optionscollection doesn't persist the clicked value
>
> Actually the second <select> starts by being greyed out,
> after selecting one
> parameter in the first list it will be filled with the
> collection of values
> (retrieved after knowing what the user has selected in the
> first <select>).
>
> I just keep the first collection into session and call the
> struts action
> through the "onchange" javascript method so it reloads the
> first collection
> and execute the action just by selecting one value.
>
>
> On Wed, Jan 6, 2010 at 6:02 PM, Kawczynski, David <
> david_kawczynski@(protected):
>
> > Does the second <select> element's options change when the first
> > <select> element is changed?
> >
> > Is the second <select> element's options based on what was selected
> > in the first <select> element?
> >
> > How do you get the JSP to re-render when the first <select> element
> > is changed?
> >
> > > -----Original Message-----
> > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > Sent: Wednesday, January 06, 2010 11:50 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Why optionscollection doesn't persist the
> clicked value
> > >
> > > When re-rendered it displays two drop down lists filled with
> > > two collections
> > > results but blank default value shown on both of them while I
> > > need to keep
> > > the first selected value shown to the user.
> > >
> > > On Wed, Jan 6, 2010 at 5:21 PM, Kawczynski, David <
> > > david_kawczynski@(protected):
> > >
> > > > That's odd.
> > > >
> > > > If you were to <struts:write> the actionform's property
> > > > when the page is re-rendered, what does it contain?
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > > Sent: Wednesday, January 06, 2010 10:54 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: Re: Why optionscollection doesn't persist the
> > > clicked value
> > > > >
> > > > > Yes it is.
> > > > >
> > > > > On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> > > > > david_kawczynski@(protected):
> > > > >
> > > > > > To further clarify:
> > > > > > Is the optionscollection inside an <html:select> element?
> > > > > > Is the scope of the corresponding action-form "session"?
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Kawczynski, David
> > > > > > > Sent: Wednesday, January 06, 2010 9:46 AM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: RE: Why optionscollection doesn't persist the
> > > > > clicked value
> > > > > > >
> > > > > > > Is the scope of the corresponding action-form "session"?
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > > > > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > > > > > > To: Struts Users Mailing List
> > > > > > > > Subject: Why optionscollection doesn't persist the
> > > clicked value
> > > > > > > >
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I don't understand why optionscollection
> doesn't persist the
> > > > > > > > clicked value.
> > > > > > > >
> > > > > > > > I'm using many of them: second one is filled
> after selecting
> > > > > > > > one parameter
> > > > > > > > from the first one and so on but the thing is that
> > > after each
> > > > > > > > selection it
> > > > > > > > reloads the jsp page without persisting the
> first clicked
> > > > > > > > value in the drop
> > > > > > > > down list.
> > > > > > > >
> > > > > > > > Do someone know the reason or even a tricky workaround ?
> > > > > > > >
> > > > > > > > Thanks in advance
> > > > > > > >
> > > > > > Notice: This e-mail message, together with any
> > > > > attachments, contains
> > > > > > information of Merck & Co., Inc. (One Merck Drive,
> > > > > Whitehouse Station, New
> > > > > > Jersey, USA 08889), and/or its affiliates Direct contact
> > > > > information for
> > > > > > affiliates is available at
> > > > > http://www.merck.com/contact/contacts.html)
> > > > > > that may be confidential, proprietary copyrighted and/or
> > > > > legally privileged.
> > > > > > It is intended solely for the use of the individual or
> > > > > entity named on this
> > > > > > message. If you are not the intended recipient, and have
> > > > > received this
> > > > > > message in error, please notify us immediately by reply
> > > > > e-mail and then
> > > > > > delete it from your system.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > > > For additional commands, e-mail: user-help@(protected)
> > > > > >
> > > > > >
> > > > >
> > > > Notice: This e-mail message, together with any
> > > attachments, contains
> > > > information of Merck & Co., Inc. (One Merck Drive,
> > > Whitehouse Station, New
> > > > Jersey, USA 08889), and/or its affiliates Direct contact
> > > information for
> > > > affiliates is available at
> > > http://www.merck.com/contact/contacts.html)
> > > > that may be confidential, proprietary copyrighted and/or
> > > legally privileged.
> > > > It is intended solely for the use of the individual or
> > > entity named on this
> > > > message. If you are not the intended recipient, and have
> > > received this
> > > > message in error, please notify us immediately by reply
> > > e-mail and then
> > > > delete it from your system.
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > Notice: This e-mail message, together with any
> attachments, contains
> > information of Merck & Co., Inc. (One Merck Drive,
> Whitehouse Station, New
> > Jersey, USA 08889), and/or its affiliates Direct contact
> information for
> > affiliates is available at
> http://www.merck.com/contact/contacts.html)
> > that may be confidential, proprietary copyrighted and/or
> legally privileged.
> > It is intended solely for the use of the individual or
> entity named on this
> > message. If you are not the intended recipient, and have
> received this
> > message in error, please notify us immediately by reply
> e-mail and then
> > delete it from your system.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

Attachment:
user_204528.ezm (zipped)Paweł Wielgus escribió:
> Hi,
> sorry for too fast response,
> i see that it is implementing it,
> another thing to notice is that
> in action You have access to session field which is a map constructed
> by struts, not real session object - as far as i remember.
> In jsp you can do < s:property value="session.get('variable')" > to
> show key from session in jsp.
>
> Hope that it will help,
> Pawel Wielgus.
>
> 2010/1/6, Sergio <killing-is-my-business@(protected)>:
>
>> Paweł Wielgus escribió:
>>
>>> Hi Sergio,
>>> add SessionAware interface to your action.
>>>
>>> Best greetings,
>>> Pawel Wielgus.
>>>
>>> 2010/1/5, Sergio <killing-is-my-business@(protected)>:
>>>
>>>
>>>> Sergio escribió:
>>>>
>>>>
>>>>> Hi people,
>>>>>
>>>>> i'm a newbie to struts2. I'm having too many problems modifing session
>>>>> parameters. I use <%= session.getAttribute( "variable" ) %> to gain
>>>>> access to "variable" and that works when i modify "variable" into a
>>>>> jsp page, but not inside a struts action.
>>>>>
>>>>> struts.xml:
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>>> <!DOCTYPE struts PUBLIC
>>>>> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>>>> "http://struts.apache.org/dtds/struts-2.0.dtd">
>>>>>
>>>>> <struts>
>>>>>
>>>>> <constant name="struts.enable.DynamicMethodInvocation" value="false"
>>>>> />
>>>>> <constant name="struts.devMode" value="true" />
>>>>>
>>>>> <package name="tads" namespace="/" extends="struts-default">
>>>>>
>>>>> <action name="HolaMundo" class="tads.HolaMundo">
>>>>> <result>/holaMundo.jsp</result>
>>>>> </action>
>>>>>
>>>>> <action name="Catalogo" class="tads.Catalogo">
>>>>> <result name="error">/ErrorCatalogo.jsp</result>
>>>>> <result>/Catalogo.jsp</result>
>>>>> </action>
>>>>>
>>>>> <action name="Actualiza" class="tads.Actualiza">
>>>>> <result>/Actualiza.jsp</result>
>>>>> </action>
>>>>>
>>>>>
>>>>>
>>>>> </package>
>>>>>
>>>>> </struts>
>>>>>
>>>>> extract from a jsp page, result from an ajax action working:
>>>>>
>>>>> <s:form id="form" >
>>>>> <s:textfield name="politico" label="politico"/><br>
>>>>> <s:hidden name="prueba" value="escondido" />
>>>>> </s:form>
>>>>> <s:url id="actualiza" value="/Actualiza.action" />
>>>>>
>>>>> <sx:submit type="button" label="dale" href="%{actualiza}"
>>>>> formId="form" align="center" targets="secondaryContent"/>
>>>>>
>>>>> i see "politico" and "prueba" into Actualiza.action so the action
>>>>> Actualiza works.
>>>>>
>>>>> Actualiza.java:
>>>>>
>>>>> package tads;
>>>>> import java.util.*;
>>>>>
>>>>> import
javax.servlet.http.HttpSession;
>>>>> import
com.opensymphony.xwork2.ActionSupport;
>>>>> import
org.apache.struts2.interceptor.SessionAware;
>>>>> import
com.opensymphony.xwork2.ActionContext;
>>>>>
>>>>>
>>>>> @SuppressWarnings("serial")
>>>>> public class Actualiza extends ActionSupport implements SessionAware {
>>>>> private String politico;
>>>>> private String prueba;
>>>>> private Map session;
>>>>> public String execute() throws Exception {
>>>>>
>>>>> this.getSession().put("variable","pruebamil");
>>>>> return SUCCESS;
>>>>> }
>>>>> public String getPolitico() {
>>>>> return politico;
>>>>> }
>>>>>
>>>>> public void setPolitico(String politico) {
>>>>> this.politico = politico;
>>>>> }
>>>>>
>>>>> public String getPrueba() {
>>>>> return prueba;
>>>>> }
>>>>>
>>>>> public void setPrueba(String prueba) {
>>>>> this.prueba = prueba;
>>>>> }
>>>>> public void setSession(Map session) {
>>>>> this.session = session;
>>>>> }
>>>>> public Map getSession() {
>>>>> return session;
>>>>> }
>>>>> }
>>>>>
>>>>> in that situation. Actualiza.jsp doesn't show "variable" atribute from
>>>>> session, using "<%= session.getAttribute( "variable" ) %>". It shows
>>>>> null.
>>>>>
>>>>> can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
>>>>> get access to the session).
>>>>>
>>>>> thanks in advance.
>>>>>
>>>>>
>>>>>
>>>> i've tried with
>>>>
>>>> <%= session.getAttribute( "variable" ) %>
>>>>
>>>> and
>>>>
>>>> <s:property value="#session.variable"></s:property>
>>>>
>>>> and surprise, both works. After closing and opening eclipse 3.4.0 works.
>>>> I think this is a bad memory managing of eclipse. Does anybody knows
>>>> something about this?
>>>>
>>>> --
>>>> Sergio
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>>
>>>
>> public class Actualiza extends ActionSupport implements SessionAware
>>
>> is that?
>>
>> thanks for replying
>>
>>
>> --
>> Sergio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
as far as i remember :) "< s:property value="session.get('variable')" >"
didn't work because the "get" method. Both "<%= session.getAttribute(
"variable" ) %>" and "<s:property
value="#session.variable"></s:property>" worked, but i had to close and
open eclipse. Bad memory management of eclipse i think.
thanks for your fast reply :)
--
Sergio

Attachment:
user_204529.ezm (zipped)Dear All,
I'm having following requirement and can you please let me know how to do this using struts2.
Say EmployeeAction having EmpBean (getter & setter)
EmpBean:
private long emp_id;
private String first_name;
private String last_name;
private String class_name;
In user interface(UI), I have 2 text fields for entering first_name and last_name.. when user enters this information and selecting 'Add' button it will display one row in same page like below
First Name Last Name
Mike Rojer Remove
Smith Gates Remove
After entering multiple entries user will submit the page.
I'm using jQuery, how to add multiple rows dynamically pressing 'Add' button and how to populate these beans in backend EmployeeAction...
Can anyone please let me know how to solve this problem using Struts2 + jQuery.
Thanks for your help.
Regards,
Sharath.

Attachment:
user_204530.ezm (zipped)If you will submit multiple EmpBean, your action will need some sort
of Collection<EmpBean> (a List or Map I commonly use) with its getter
& setter.
You must name correctly your input parameters so that the
ParameterInterceptor assign them right, that is, you name it as the
collection variable, indexed by some key (if using a List the index is
an integer >= 0, if using a Map, anything that can be used as a map
key.)
when you "Add" a new EmpBean, you create hidden fields with the following names:
<input type="hidden" name="myCollection[0].first_name" value="..." />
<input type="hidden" name="myCollection[0].last_name" value="..." />
<input type="hidden" name="myCollection[1].first_name" value="..." />
<input type="hidden" name="myCollection[1].last_name" value="..." />
and so on...
the part of adding the fields to a table with jQuery is pure client
side javascript so it is independent of using S2 or any other web
framework, just remember to add a hidden input field in the client
side table to preserve the data you will submit at once later.
2010/1/6 sharath karnati <karnatis@(protected)>:
> Dear All,
>
> I'm having following requirement and can you please let me know how to do this using struts2.
>
> Say EmployeeAction having EmpBean (getter & setter)
>
> EmpBean:
>
> private long emp_id;
> private String first_name;
> private String last_name;
> private String class_name;
>
>
> In user interface(UI), I have 2 text fields for entering first_name and last_name.. when user enters this information and selecting 'Add' button it will display one row in same page like below
>
> First Name Last Name
> Mike Rojer Remove
> Smith Gates Remove
>
> After entering multiple entries user will submit the page.
>
> I'm using jQuery, how to add multiple rows dynamically pressing 'Add' button and how to populate these beans in backend EmployeeAction...
>
> Can anyone please let me know how to solve this problem using Struts2 + jQuery.
>
> Thanks for your help.
>
> Regards,
> Sharath.
>
>
>
>
>
>
>
>
>

Attachment:
user_204531.ezm (zipped)Hi, people, how can i show a table into a jsp from the struts action?
Are there a simple method for doing that? I've tried with java
collections into the action and "property" tag into the jsp with no success.
thanks in advance
--
Sergio

Attachment:
user_204532.ezm (zipped)We use DisplayTag (http://www.displaytag.org), it works pretty well.
(*Chris*)
On Wed, Jan 6, 2010 at 3:28 PM, Sergio
<killing-is-my-business@(protected):
> Hi, people, how can i show a table into a jsp from the struts action? Are
> there a simple method for doing that? I've tried with java collections into
> the action and "property" tag into the jsp with no success.
>
> thanks in advance
>
> --
> Sergio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_204533.ezm (zipped)can share how the struts2 work with display tag
sorry never use this also, how the display tag work with List when we
submit the grid
F
On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected):
> We use DisplayTag (http://www.displaytag.org), it works pretty well.
> (*Chris*)
>
> On Wed, Jan 6, 2010 at 3:28 PM, Sergio
> <killing-is-my-business@(protected):
>
>> Hi, people, how can i show a table into a jsp from the struts action? Are
>> there a simple method for doing that? I've tried with java collections into
>> the action and "property" tag into the jsp with no success.
>>
>> thanks in advance
>>
>> --
>> Sergio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_204534.ezm (zipped)It's just a standard JSP Tag Library. Because Struts 2 has the Request
Wrapper, you can use standard JSTL EL to get the list from your action and
pass it to the DisplayTag Table, from then on it's just using the
capabilities of DisplayTag to put the data where you want it. The one
caveat is that we've had to set the requestURI attribute to make sure that
the prev/next links go to the right place and I added the excludeParams
parameter below to the params interceptor so that you don't get the ugly
warnings from struts.
<interceptor-ref name="params">
<param name="excludeParams">d-\d*-[a-z]</param>
</interceptor-ref>
(*Chris*)
On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <frans@(protected):
> can share how the struts2 work with display tag
>
>
> sorry never use this also, how the display tag work with List when we
> submit the grid
>
> F
>
>
>
>
> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
> wrote:
> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
> > (*Chris*)
> >
> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
> > <killing-is-my-business@(protected):
> >
> >> Hi, people, how can i show a table into a jsp from the struts action?
> Are
> >> there a simple method for doing that? I've tried with java collections
> into
> >> the action and "property" tag into the jsp with no success.
> >>
> >> thanks in advance
> >>
> >> --
> >> Sergio
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_204535.ezm (zipped)wah can share how the interceptor work with display tag
sorry if this is silly question, but honestly i still need the glue
usually i create a private xxx List, and will be passed to the list
how integrate the list $xxx with the display tag?
thx
On Thu, Jan 7, 2010 at 7:25 AM, Chris Pratt <thechrispratt@(protected):
> It's just a standard JSP Tag Library. Because Struts 2 has the Request
> Wrapper, you can use standard JSTL EL to get the list from your action and
> pass it to the DisplayTag Table, from then on it's just using the
> capabilities of DisplayTag to put the data where you want it. The one
> caveat is that we've had to set the requestURI attribute to make sure that
> the prev/next links go to the right place and I added the excludeParams
> parameter below to the params interceptor so that you don't get the ugly
> warnings from struts.
>
> <interceptor-ref name="params">
> <param name="excludeParams">d-\d*-[a-z]</param>
> </interceptor-ref>
>
> (*Chris*)
>
> On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <frans@(protected):
>
>> can share how the struts2 work with display tag
>>
>>
>> sorry never use this also, how the display tag work with List when we
>> submit the grid
>>
>> F
>>
>>
>>
>>
>> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
>> wrote:
>> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
>> > (*Chris*)
>> >
>> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
>> > <killing-is-my-business@(protected):
>> >
>> >> Hi, people, how can i show a table into a jsp from the struts action?
>> Are
>> >> there a simple method for doing that? I've tried with java collections
>> into
>> >> the action and "property" tag into the jsp with no success.
>> >>
>> >> thanks in advance
>> >>
>> >> --
>> >> Sergio
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >> For additional commands, e-mail: user-help@(protected)
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_204536.ezm (zipped)In your action, add a getList() method that returns the list generated by
the action, then just pass name="${list}" to the display:table tag. Or, you
could create the list and put it in the request or session scope and it
would work exactly the same.
The trick with the interceptor is just to get it to ignore the special
tracking parameters that DisplayTag uses in the prev/next links.
(*Chris*)
On Wed, Jan 6, 2010 at 4:28 PM, Frans Thamura <frans@(protected):
> wah can share how the interceptor work with display tag
>
> sorry if this is silly question, but honestly i still need the glue
>
> usually i create a private xxx List, and will be passed to the list
>
> how integrate the list $xxx with the display tag?
>
> thx
>
>
> On Thu, Jan 7, 2010 at 7:25 AM, Chris Pratt <thechrispratt@(protected)>
> wrote:
> > It's just a standard JSP Tag Library. Because Struts 2 has the Request
> > Wrapper, you can use standard JSTL EL to get the list from your action
> and
> > pass it to the DisplayTag Table, from then on it's just using the
> > capabilities of DisplayTag to put the data where you want it. The one
> > caveat is that we've had to set the requestURI attribute to make sure
> that
> > the prev/next links go to the right place and I added the excludeParams
> > parameter below to the params interceptor so that you don't get the ugly
> > warnings from struts.
> >
> > <interceptor-ref name="params">
> > <param name="excludeParams">d-\d*-[a-z]</param>
> > </interceptor-ref>
> >
> > (*Chris*)
> >
> > On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <frans@(protected)>
> wrote:
> >
> >> can share how the struts2 work with display tag
> >>
> >>
> >> sorry never use this also, how the display tag work with List when we
> >> submit the grid
> >>
> >> F
> >>
> >>
> >>
> >>
> >> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispratt@(protected)>
> >> wrote:
> >> > We use DisplayTag (http://www.displaytag.org), it works pretty well.
> >> > (*Chris*)
> >> >
> >> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
> >> > <killing-is-my-business@(protected):
> >> >
> >> >> Hi, people, how can i show a table into a jsp from the struts action?
> >> Are
> >> >> there a simple method for doing that? I've tried with java
> collections
> >> into
> >> >> the action and "property" tag into the jsp with no success.
> >> >>
> >> >> thanks in advance
> >> >>
> >> >> --
> >> >> Sergio
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> >> For additional commands, e-mail: user-help@(protected)
> >> >>
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>