You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juanjo C <jj...@gmail.com> on 2009/11/15 03:55:15 UTC

How to access the form data directly?

Hi,

I have an action class that implements the interfaces ModelDriven and
Preparable with a bean that has data. And I have too an JSP that shows,
through s:textfield, the data to the user. It works fine.

But I need show in other way the data, i.e. with s:property or s:iterator...
but I don't know where are this data... In the ValueStack?

Any idea?

sorry for my English

RE: How to access the form data directly?

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Juanjo:

> Uuuummmm.... it works, but... I prefer don't use scriptlet of 
> Java... Is
> there any way to use the tags like s:property or s:iterator?

I understand it is not as clean as using struts tags, but
I drop into using scriptlets when I can't figure out how
to do it with the tags.

If you can post a small example, I will try to see if I
can figure something out.

	Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your struts app on a CentOS VPS for only $25/month!
Unmetered bandwidth, 7 day no risk trial, Google Checkout 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to access the form data directly?

Posted by Juanjo C <jj...@gmail.com>.
Uuuummmm.... it works, but... I prefer don't use scriptlet of Java... Is
there any way to use the tags like s:property or s:iterator?

Thanks Neil.

2009/11/15 Neil Aggarwal <ne...@jammconsulting.com>

> Juanjo:
>
> > but I don't know where are this data... In the ValueStack?
>
> I use this code in my JSP to retrieve values from
> the value stack:
>
> ActionContext.getContext().getValueStack().findValue("myValue");
>
> I hope that helps,
>        Neil
>
> --
> Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
> CentOS 5.4 VPS with unmetered bandwidth only $25/month!
> 7 day no risk trial, Google Checkout accepted
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: How to access the form data directly?

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Juanjo:

> but I don't know where are this data... In the ValueStack?

I use this code in my JSP to retrieve values from
the value stack:

ActionContext.getContext().getValueStack().findValue("myValue");

I hope that helps,
	Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
CentOS 5.4 VPS with unmetered bandwidth only $25/month!
7 day no risk trial, Google Checkout accepted 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to access the form data directly?

Posted by Juanjo C <jj...@gmail.com>.
The data that I want to show is the bean (the values of their fields) that I
have declared in the ModelDriven... I think that this data are available in
the jsp...

Uff... It's difficult for me to express my question in English ...  sorry.

Thanks

2009/11/15 Musachy Barroso <mu...@gmail.com>

> where is the data that you want to show, in the action?
>
> musachy
>
> On Sat, Nov 14, 2009 at 6:55 PM, Juanjo C <jj...@gmail.com> wrote:
> > Hi,
> >
> > I have an action class that implements the interfaces ModelDriven and
> > Preparable with a bean that has data. And I have too an JSP that shows,
> > through s:textfield, the data to the user. It works fine.
> >
> > But I need show in other way the data, i.e. with s:property or
> s:iterator...
> > but I don't know where are this data... In the ValueStack?
> >
> > Any idea?
> >
> > sorry for my English
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to access the form data directly?

Posted by Musachy Barroso <mu...@gmail.com>.
where is the data that you want to show, in the action?

musachy

On Sat, Nov 14, 2009 at 6:55 PM, Juanjo C <jj...@gmail.com> wrote:
> Hi,
>
> I have an action class that implements the interfaces ModelDriven and
> Preparable with a bean that has data. And I have too an JSP that shows,
> through s:textfield, the data to the user. It works fine.
>
> But I need show in other way the data, i.e. with s:property or s:iterator...
> but I don't know where are this data... In the ValueStack?
>
> Any idea?
>
> sorry for my English
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org