You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Stepanenko <an...@ceis.tane.edu.ua> on 2005/02/11 11:22:33 UTC

???

Hello, all!

Can anybody please tell why I can't get <html:text> tag to display a 
message resource as its value so that text field appear on a page with 
already internalized string?

<html:text property="rcpt" value="<bean:message key='admin.msg.rcpt'/>" />

The problem is that the string "<bean:message key='admin.msg.rcpt'/>" is 
interpreted as a string and not as a tag and thus I get <bean:message 
key='admin.msg.rcpt'/> in my text field instead of the internalized string.

If I don't use action form and simply provide <input type="text" 
value="<bean:message key='admin.msg.rcpt'/>"> everything works fine and 
I can see the proper internalized string in the text field. But I need 
to use action forms.

Thanks in advance,

-- 
Andrew Stepanenko,
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil Academy of National Economy
Shevchenko Street 9, Office 24-25
Ternopil, 46000 UKRAINE
Tel: +38 (0352) 43 52 41
fax: +38 (0352) 43 52 45
Web: http://www.tane.edu.ua/unf




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


Re: ???

Posted by Jeff Beal <jb...@webmedx.com>.
Andrew Stepanenko wrote:
> If I don't use action form and simply provide <input type="text" 
> value="<bean:message key='admin.msg.rcpt'/>"> everything works fine and 
> I can see the proper internalized string in the text field. But I need 
> to use action forms.

Not using the <html:text/> tag does *not* mean that you cannot use 
ActionForms.  The <html:text/> tag is a convenience for displaying form 
values to the user.  Since it looks like you're pulling the value from a 
properties file using <bean:message/> instead of from the ActionForm, I 
don't see that you would lose anything by using the approach you mention 
here.

-- Jeff


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


Re: ???

Posted by Todd Nine <to...@gmail.com>.
What if you did something like this?

<bean:define id="rcptVal">
    <bean:message key="admin.msg.rcpt"/>
</bean:define>


<html:text property"rcpt" value="rcptVal"/>

Todd

On Fri, 11 Feb 2005 13:03:37 +0200, Andrew Stepanenko
<an...@ceis.tane.edu.ua> wrote:
> Thanks for your reply, Nigel!
> 
> I've already tried that previously and but the text field remains empty...
> 
> 
> Nigel Furber wrote:
> 
> >Andrew
> >Try something like...
> ><html:text property="rcpt">
> ><bean:message key='admin.msg.rcpt'/>"
> ></html:text>
> >Regards
> >
> >Nigel Furber
> >Boxford Park Ltd
> >[mailto:Nigel.Furber@spamlessBoxfordPark.com]
> >(44) 1204 692579
> >Remove "spamless" from email address
> >
> >-----Original Message-----
> >From: Andrew Stepanenko [mailto:andrews@ceis.tane.edu.ua]
> >Sent: 11 February 2005 10:23
> >To: Struts Users Mailing List
> >Subject: <html:text ... value="<bean:message .../>"/>???
> >
> >
> >Hello, all!
> >
> >Can anybody please tell why I can't get <html:text> tag to display a
> >message resource as its value so that text field appear on a page with
> >already internalized string?
> >
> ><html:text property="rcpt" value="<bean:message key='admin.msg.rcpt'/>" />
> >
> >The problem is that the string "<bean:message key='admin.msg.rcpt'/>" is
> >interpreted as a string and not as a tag and thus I get <bean:message
> >key='admin.msg.rcpt'/> in my text field instead of the internalized string.
> >
> >If I don't use action form and simply provide <input type="text"
> >value="<bean:message key='admin.msg.rcpt'/>"> everything works fine and
> >I can see the proper internalized string in the text field. But I need
> >to use action forms.
> >
> >Thanks in advance,
> >
> >
> >
> 
> ---------------------------------------------------------------------
> 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


Re: [SOLVED] ???

Posted by Andrew Stepanenko <an...@ceis.tane.edu.ua>.
Thank you, Laurent! It works now!

I had this idea previously but again it didn't work because I put a 
message string into the value atrribute of <c:set ... />.

And if to use this closing tag too everything is fine.

Thanks!

Andrew.


Laurent wrote:

>>> Andrew
>>> Try something like...
>>> <html:text property="rcpt"> <bean:message key='admin.msg.rcpt'/>" 
>>> </html:text>
>>
>
> If that doesn't work try this:
>
> <c:set var="rcpt"><bean:message key='admin.msg.rcpt'/></c:set>
> <html:text property="rcpt" value="${rcpt}"/>
>
> ---------------------------------------------------------------------
> 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


Re: ???

Posted by Laurent <lg...@free.fr>.
>> Andrew
>> Try something like...
>> <html:text property="rcpt"> <bean:message key='admin.msg.rcpt'/>" 
>> </html:text>

If that doesn't work try this:

<c:set var="rcpt"><bean:message key='admin.msg.rcpt'/></c:set>
<html:text property="rcpt" value="${rcpt}"/>

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


Re: ???

Posted by Andrew Stepanenko <an...@ceis.tane.edu.ua>.
Thanks for your reply, Nigel!

I've already tried that previously and but the text field remains empty...


Nigel Furber wrote:

>Andrew
>Try something like...
><html:text property="rcpt"> 
><bean:message key='admin.msg.rcpt'/>" 
></html:text>
>Regards
>
>Nigel Furber
>Boxford Park Ltd
>[mailto:Nigel.Furber@spamlessBoxfordPark.com]
>(44) 1204 692579 
>Remove "spamless" from email address
>
>-----Original Message-----
>From: Andrew Stepanenko [mailto:andrews@ceis.tane.edu.ua]
>Sent: 11 February 2005 10:23
>To: Struts Users Mailing List
>Subject: <html:text ... value="<bean:message .../>"/>???
>
>
>Hello, all!
>
>Can anybody please tell why I can't get <html:text> tag to display a 
>message resource as its value so that text field appear on a page with 
>already internalized string?
>
><html:text property="rcpt" value="<bean:message key='admin.msg.rcpt'/>" />
>
>The problem is that the string "<bean:message key='admin.msg.rcpt'/>" is 
>interpreted as a string and not as a tag and thus I get <bean:message 
>key='admin.msg.rcpt'/> in my text field instead of the internalized string.
>
>If I don't use action form and simply provide <input type="text" 
>value="<bean:message key='admin.msg.rcpt'/>"> everything works fine and 
>I can see the proper internalized string in the text field. But I need 
>to use action forms.
>
>Thanks in advance,
>
>  
>


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


RE: ???

Posted by Nigel Furber <ni...@boxfordpark.com>.
Andrew
Try something like...
<html:text property="rcpt"> 
<bean:message key='admin.msg.rcpt'/>" 
</html:text>
Regards

Nigel Furber
Boxford Park Ltd
[mailto:Nigel.Furber@spamlessBoxfordPark.com]
(44) 1204 692579 
Remove "spamless" from email address

-----Original Message-----
From: Andrew Stepanenko [mailto:andrews@ceis.tane.edu.ua]
Sent: 11 February 2005 10:23
To: Struts Users Mailing List
Subject: <html:text ... value="<bean:message .../>"/>???


Hello, all!

Can anybody please tell why I can't get <html:text> tag to display a 
message resource as its value so that text field appear on a page with 
already internalized string?

<html:text property="rcpt" value="<bean:message key='admin.msg.rcpt'/>" />

The problem is that the string "<bean:message key='admin.msg.rcpt'/>" is 
interpreted as a string and not as a tag and thus I get <bean:message 
key='admin.msg.rcpt'/> in my text field instead of the internalized string.

If I don't use action form and simply provide <input type="text" 
value="<bean:message key='admin.msg.rcpt'/>"> everything works fine and 
I can see the proper internalized string in the text field. But I need 
to use action forms.

Thanks in advance,

-- 
Andrew Stepanenko,
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil Academy of National Economy
Shevchenko Street 9, Office 24-25
Ternopil, 46000 UKRAINE
Tel: +38 (0352) 43 52 41
fax: +38 (0352) 43 52 45
Web: http://www.tane.edu.ua/unf




---------------------------------------------------------------------
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