You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Long <Br...@vt.edu> on 2006/06/23 15:47:10 UTC
handle to form w/i jsp?
Hi folks -
I've got session data that I'd like to jam into a DynaValidatorForm
before it displays, so that all of the html tags that do auto-population
from the form work.
How do I get a handle to the form within the jsp?
Thanks in advance,
-b
--
Brian M. Long
Middleware Services, Virginia Tech
"Ancora Imparo (I am still learning)" - Michaelangelo, age 87
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: handle to form w/i jsp?
Posted by Ed Griebel <ed...@gmail.com>.
If you know the formbean it's a simple as
<c:set var="MyFormBean.map.propName" value="${theSessionVar}"/>
If you don't konw the formbean name or want to make it generic you can
get the current action's form bean name and then populate it something
like below. Modify requestScope/sessionScope as appropriate.
<c:set var="actionMapping'
value="${requestScope['org.apache.struts.action.mapping.instance]}"/>
<c:set var="requestScope[actionMapping.name].map.propName"
value="${theSessionVar}"/>
HTH,
-ed
On 6/23/06, Brian Long <Br...@vt.edu> wrote:
>
> Hi folks -
>
> I've got session data that I'd like to jam into a DynaValidatorForm
> before it displays, so that all of the html tags that do auto-population
> from the form work.
>
> How do I get a handle to the form within the jsp?
>
> Thanks in advance,
> -b
>
> --
> Brian M. Long
> Middleware Services, Virginia Tech
> "Ancora Imparo (I am still learning)" - Michaelangelo, age 87
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org