You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chen Chunwei <ou...@cn.panasonic.com> on 2008/03/20 08:15:01 UTC

About tag

Hi all,

Can tag <bean> fetch the value processed by a specified ActionForm?
For instance, there's an ActionForm named TestActionForm, which has a field defined with "String test". And the corresponding get-method getTest() will add a prefix "p:" to the field test. Supposing the origin value of test is "a", then whether I can use tag <bean> to get the processed value "p:a"? If can, then how?

Talos

Re: About tag

Posted by Chen Chunwei <ou...@cn.panasonic.com>.
Almost. :-(

Talos

----- Original Message ----- 
From: "Antonio Petrelli" <an...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, March 20, 2008 5:01 PM
Subject: Re: About tag <bean>


2008/3/20, Chen Chunwei <ou...@cn.panasonic.com>:
>
> And this is my fourth day to learn about JSP, STRUTS and everything about
> JAVA. So I found there are too much to learn, whereas I don't have much time
> to learn it systematically and I don't have enough materials to learn it
> from espesially that I cannot access Internet except e-mail. So this mail
> list is the only way that I can ask my questions.



Oh dear!
A colleague of mine asks if you are in jail :-D

Antonio

Re: About tag

Posted by Antonio Petrelli <an...@gmail.com>.
2008/3/20, Chen Chunwei <ou...@cn.panasonic.com>:
>
> And this is my fourth day to learn about JSP, STRUTS and everything about
> JAVA. So I found there are too much to learn, whereas I don't have much time
> to learn it systematically and I don't have enough materials to learn it
> from espesially that I cannot access Internet except e-mail. So this mail
> list is the only way that I can ask my questions.



Oh dear!
A colleague of mine asks if you are in jail :-D

Antonio

Re: About tag

Posted by Chen Chunwei <ou...@cn.panasonic.com>.
Thanks Antonio.

Yes, this is exactly what I want.

And this is my fourth day to learn about JSP, STRUTS and everything about JAVA. So I found there are too much to learn, whereas I don't have much time to learn it systematically and I don't have enough materials to learn it from espesially that I cannot access Internet except e-mail. So this mail list is the only way that I can ask my questions.

Talos

----- Original Message ----- 
From: "Antonio Petrelli" <an...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, March 20, 2008 4:03 PM
Subject: Re: About tag <bean>


2008/3/20, Chen Chunwei <ou...@cn.panasonic.com>:
>  Can tag <bean> fetch the value processed by a specified ActionForm?
>  For instance, there's an ActionForm named TestActionForm, which has a field defined with "String test". And the corresponding get-method getTest() will add a prefix "p:" to the field test. Supposing the origin value of test is "a", then whether I can use tag <bean> to get the processed value "p:a"? If can, then how?

I suppose that you are writing about <bean:write>.
Well, you can do it by using:
<bean:write name="formBeanName" property="test" />
"formBeanName" is the name that you declared in your
struts-config.xml, along with the called action.
The "getTest" will get called.

Antonio

P.S.: It seemed too simple to be true. Is it really this what you want?

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

Re: About tag

Posted by Antonio Petrelli <an...@gmail.com>.
2008/3/20, Chen Chunwei <ou...@cn.panasonic.com>:
>  Can tag <bean> fetch the value processed by a specified ActionForm?
>  For instance, there's an ActionForm named TestActionForm, which has a field defined with "String test". And the corresponding get-method getTest() will add a prefix "p:" to the field test. Supposing the origin value of test is "a", then whether I can use tag <bean> to get the processed value "p:a"? If can, then how?

I suppose that you are writing about <bean:write>.
Well, you can do it by using:
<bean:write name="formBeanName" property="test" />
"formBeanName" is the name that you declared in your
struts-config.xml, along with the called action.
The "getTest" will get called.

Antonio

P.S.: It seemed too simple to be true. Is it really this what you want?

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