struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 梁炳場 <pc.le...@gmail.com>
Subject Re: How to pass sql variable from jsp to Action?
Date Thu, 01 Sep 2005 03:29:52 GMT
I wonder if it is a proper way to do it because
the 1st query displays a no of rows with different group ids.
Can the <html:link> pass a value to Action?
If it can, it is excellent.

Should it be done like this?
change the layout from a no of links <html:link>
to a no of forms <html:form>
In each form, it has hidden value of group id.

How will you do this? Thank you very much for your help.

2005/9/1, 梁炳場 <pc.leung@gmail.com>:
> I retrieve a group id by JSP.
> <sql:query  ...SELECT group_id../>
> 
> When user clicks a link
> <html:link .../>
> 
> Before another page is shown, in my struts-config.xml,
> I try to make a ActionForward function to capture the group_id
> and then update a session attribute .
> 
> Then the resulting jsp is like this
> <sql:query SELECT someValue FROM .. WHERE group_id = ???groupId??? />
> 
> Is this a proper way to do this?
> 
> I do not know how to write in the Action class so that
> it can retrieve the sql value from the passing in jsp file.
> 
> Your help is very much appreicated.
>
Mime
View raw message