Try move the onclick javascript function out, something like this:
script language=javascript
function verify() {
var msg = beam:message key=confirm.paragraph.delete /;
return confirm(msg);
}
/script
html:submit property=command value=Delete
onclick=return
I'm encouraged to see that you are still looking at Struts. As I understand it, there
is a property that I set in my distribution that displays the KEY when it cannot find
the corresponding value. IPlanet 6.05 does not look for the resource files in the
traditional (Struts) location. What
, 2004 10:59 AM
To: Struts Users Mailing List
Subject: RE: bean:message prints the KEY, not the MESSAGE
I'm encouraged to see that you are still looking at Struts. As I understand it, there
is a property that I set in my distribution that displays the KEY when it cannot find
the corresponding
Users Mailing List
Subject: RE: bean:message prints the KEY, not the MESSAGE
hi david, yes still looking at struts. i wonder if it's better to place a
copy(*ouch!*) of the resource files in iPlanet's preferred location (which would be
...?), or try to get iPlanet to look in the actual location
There's a few options, off the top of my head:
-Do the string manipulation in the (preprocessing) action
-Use a combination of the Jakarta String taglib
(http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/index.html) tags (such
as left, right, and mid) to parse out the value (since
bean:message name=str/
Quoting deepaksawdekar [EMAIL PROTECTED]:
Hi
I want to pass the varible to key of the statement bean:message
key=label.success.create/
eg.
if ( some condition )
str = deepak
else
str = xyz
Now i want to pass the value of str as a key to
Hi,
for the moment there isn't a solution for that in Struts.
You can two things with bean:message. That is provide a static key or define a dynmic
key. but you cannot combine the two.
What i have done is to extend the bean:message tag to implement this kind of
functionality.
Let me know if
Jimmy,
I would be interested in seeing your extension of the bean:message tag.
Thanks,
Mark
--
Science is what we understand well enough to explain to a computer.
Art is everything else.
-- Donald Knuth
On Jan 19, 2004, at 2:34 AM, VAN BROECK Jimmy wrote:
Hi,
for the moment there isn't a
Here you go.
-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 13:03
To: Struts Users Mailing List
Subject: Re: bean:message WITH bean:write ?!?
Jimmy,
I would be interested in seeing your extension of the bean:message tag.
Thanks,
Mark
your extension of the bean:message
tag!
Thanks
Oliver
-Ursprüngliche Nachricht-
Von: Mark Nichols [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 19. Januar 2004 13:03
An: Struts Users Mailing List
Betreff: Re: bean:message WITH bean:write ?!?
Jimmy,
I would be interested in seeing your
To: Struts Users Mailing List
Subject: RE: bean:message WITH bean:write ?!?
I've already send the source file to the user list.
Enjoy!
-Original Message-
From: Oliver Thiel [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 13:37
To: 'Struts Users Mailing List'
Subject: AW: bean:message
On Wed, 26 Nov 2003, Duma Rolando wrote:
Hello everybody,
I would like to know if there is something like the filter attribute present
in the bean:write tag that I can use with the bean:message tag.
The problem is that I want to use the same i18n key inside a jsp and also
for a plain text
The jstl eqivalent of bean:message allows you to pass arguments via the tag
body, so you can use another tag inside the body:
fmt:message key=cart.amount
fmt:param
fmt:formatNumber value=${total}
type=CURRENCY/
--- Michael Remijan [EMAIL PROTECTED] wrote:
Hello forum:
If I have a string defined in my resources file that looks like this:
some.key some bvalue with html characters/b
is it possible for bean:message to NOT parse the characters so that
when
it is written to the html page you
Sorry My mistake .
Wrong properties file. Had put value in double quotes.
like
10007=error;
-Original Message-
From: deepaksawdekar
Sent: Friday, September 05, 2003 3:43 PM
To: Struts Users Mailing List
Subject: bean:message problem
When i have a number as a key in properties
HI,
bean :define id="runcapt"
bean:message
key=home.mouseover.runbutton.caption/
/bean:define
---Original Message---
From: Struts Users Mailing
List
Date: Monday, September
01, 2003 06:04:31
]
Subject: Re: bean:message in bean:define tag
HI,
bean :define id=runcapt
bean:message key=home.mouseover.runbutton.caption/
/bean:define
---Original Message---
From: Struts Users Mailing List
Date: Monday, September 01, 2003 06:04
:22:50 PM
To: 'Struts Users Mailing
List'; 'Nagendra Kumar O V
S'
Subject: RE:
bean:message in bean:define tag
Hi Nagendra,If we use this then error occurs ,
message is:javax.servlet.ServletException: Body is supposed to be
empty forbean:define
Oops, sorry I mixed up key with value,
I still get ???MyForm.title??? on fmt:message key=MyForm.title /
In my web.xml I put as documented in JSTL specs:
context-param
param-namejavax.servlet.jsp.jstl.fmt.localizationContext
a/param-name
param-valueresources.application/param-value
Hi Erez,
had similar problems myself. Specifying the application resources in
web.xml didn't work for me for hours because I'd spelt it wrong -
perhaps you should check you have it spelt correctly (is that really a
small r for resources.application, and with a dot? could it be
Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 24, 2003 12:50 PM
To: Struts Users Mailing List
Subject: Re: bean:message to fmt:message
Hi Erez,
had similar problems myself. Specifying the application resources in
web.xml didn't work for me for hours because I'd
-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 4:31 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message , reads only once the message from
MessageResource, is it caching messages for later use?
Yes, it is true that it is cached. No, it is not configurable
-Original Message-
From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
thanks James,
is it cause a performance problem calling formats.clear() for
each message ,
I'm not sure how much of a performance hit you would take. The
bottleneck in most applications is typically
Yes, it is true that it is cached. No, it is not configurable. That's
just the way it was designed.
To get around it without actually changing the distribution, you'll need
to add something like this to your implementation's getMessage(Locale
locale, String key) method:
public String
Yes it does.
- Original Message -
From: Erez Efrati [EMAIL PROTECTED]
Newsgroups: Struts
Sent: Sunday, August 17, 2003 9:57 AM
Subject: Bean:message to fmt:message
I have a very small question: I have message keys that uses '.' like for
instance 'myform.hello'. I read something but I
A big relief.. thanks, just to think about converting them all...
Erez
-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 17, 2003 6:08 PM
To: Struts Users Mailing List
Subject: Re: Bean:message to fmt:message
Yes it does.
- Original Message
--- Brian McSweeney [EMAIL PROTECTED] wrote:
Hi all,
I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.
I was considering using
bean:message key=bean:write name=myForm property=myProperty/
is this valid syntax?
No.
2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question
--- Brian McSweeney [EMAIL PROTECTED] wrote:
Hi all,
I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.
I was considering using
it working :-)
Thanks for your help
Brian
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:04
To: Struts Users Mailing List
Subject: Re: bean:message key=bean:write question
--- Brian McSweeney [EMAIL PROTECTED] wrote:
Hi all,
I
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: bean:message key=bean:write question
Hi David,
Thanks for the quick reply.
I know that JSTL might be the best way, but for the moment
I'd really prefer to just get it working with the struts tags
first because it's an entire app using
: RE: bean:message key=bean:write question
You could expose the actual message (rather than it's key) via your form
-
getMyPropertyMessage(). To render this you'd just need:
bean:write name=myForm property=myPropertyMessage/
Paul
-Original Message-
From: Brian McSweeney [mailto:[EMAIL
Yeah, that looks so nice and simple!
I have to switch over to jstl.
But getting it working is priority number 1.
Brian
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:22
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write
That's right (though I have no idea how hard it would to implement the
method!).
Paul
-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 16:35
To: 'Struts Users Mailing List'
Subject: RE: bean:message key=bean:write question
Not sure what you mean
The simpliest way to do it is :
bean:message name=myForm property=myProperty /
Thomas
At 17:01 29/07/2003, you wrote:
Hi all,
I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.
I was considering using
bean:message key=bean:write
List
Subject: Re: bean:message key=bean:write question
The simpliest way to do it is :
bean:message name=myForm property=myProperty /
Thomas
At 17:01 29/07/2003, you wrote:
Hi all,
I have parameters in a form bean and I want to use it as
the key for an associated value in a resource bundle.
I
Hi,
bean:message works only with PropertyResourceBundles. Those are specified by
name if you don't use the default ones. If you want to print the property of
your Form use bean:write name=logonForm property=username/ instead.
HTH
Filip
-Original Message-
From: [EMAIL PROTECTED]
I'm not sure what the use case for this is. The only thing I can come up
with is site customization where something is displayed only IF some key was
set in the bundle.
I would recommend you test for that in your action and set some flag on the
form bean. Unless I'm wrong, there isn't really a
bean:define id=localvar1 type=Stringbean:message
key=keyforarg0/bean:define
bean:message key=mykey arg0=%=localvar1%/
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: 13 March, 2003 08:39
To: Struts Users Mailing List
Subject: bean:message problem !
Hello,
If I want
.
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:52 PM
To: Struts Users Mailing List
Subject: RE: bean:message
Because I am competing for the Rube Goldberg award:)
Thanks for reminding me to read the docs.
Sri
-Original
http://jakarta.apache.org/struts/userGuide/struts-bean.html
-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 7:54 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message
Thanks guys. I wasn't aware of the formatKey property. And I'm
-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 7:54 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message
Thanks guys. I wasn't aware of the formatKey property. And
I'm not aware
of what docs to look at to find out more. I looked in Taglib
You can't nest as you have shown. Here's an alternative:
bean:define id=foo
bean:message key=date.digit.format/
/bean:define
bean:write
name=hwa
property=placedOnHWATs
format=%=foo%/
Sri
-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
.
- Mark Twain (1835-1910)
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:38 PM
To: Struts Users Mailing List
Subject: RE: bean:message
You can't nest as you have shown. Here's an alternative:
bean:define id=foo
Because I am competing for the Rube Goldberg award:)
Thanks for reminding me to read the docs.
Sri
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:50 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:message
Why
to struts 1.1b2, but with the same result.
Bernhard
-Ursprüngliche Nachricht-
Von: James Childers [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 13. Februar 2003 18:57
An: Struts Users Mailing List
Betreff: RE: bean:message problems with i18n
Have you tried opening up a new
.
Regards,
Bernhard
-Ursprüngliche Nachricht-
Von: Rademacher Tobias [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 14. Februar 2003 12:08
An: 'Struts Users Mailing List'
Betreff: RE: bean:message problems with i18n
Hi Bernhard,
I have the same problems as you
Have you tried opening up a new browser and trying again? Sounds like it may be a
caching issue. Also, check that your html:html tag is generating the correct lang
attribute. Reload the page and view source, then check the HTML tag.
-= J
-Original Message-
From: Hirschmann, Bernhard
back to struts 1.1b2, but with the same result.
Bernhard
-Ursprüngliche Nachricht-
Von: James Childers [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 13. Februar 2003 18:57
An: Struts Users Mailing List
Betreff: RE: bean:message problems with i18n
Have you tried opening up a new browser
This is a struts-user question so I'm forwarding over there...
Why are you prefixing message keys with locales? AFAIK, you name your
properties file with the locale prefix and the keys stay the same.
David
From: Jörg Maurer [EMAIL PROTECTED]
Reply-To: Struts Developers List [EMAIL
Only in Struts 1.1
Sri
-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 2:03 AM
To: Struts Users Mailing List
Subject: Re: Bean:message question
bean:define id=msg1
bean:message key=yours.msg1
/bean:define
bean:message key=yours.msg2
bean:define id=msg1
bean:message key=yours.msg1
/bean:define
bean:message key=yours.msg2 arg0=%=msg1% /
just a guess
-D
- Original Message -
From: Joao Araujo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 10:33 PM
Subject: Bean:message question
Hi,
Aahaah! Braces do the trick. Thanks Dave and Chris!
-Original Message-
From: Bartley, Chris P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 8:50 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message with parametric replacement in Struts 1.0.2
Change the line
Hi there,
Had this problem before and as a quick work around found that the tile
defintion below worked nicely. Just pass the key to your title as a string
in the tiles definiton and then use a 'hack' to load the text for the key in
your JSP.
So
definition name=doc.mainLayout
, 2002 4:27 PM
To: Struts Users Mailing List
Subject: Re: bean:message default key?
Hani,
No, its easy :-) , just see the sourcecode for
org.apache.struts.MessageTAG, remove the JSPException that is thrown and
return the key.
joachim gjesdal
Hani Hamandi wrote:
Man! Is this a hard
value
is displayed.
What do you guys think?
-Original Message-
From: keithBacon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 4:15 AM
To: Struts Users Mailing List
Subject: Re: bean:message default key?
me too!
Would anybody prefer returning a message like struts warning
Man! Is this a hard one? :(
-Original Message-
From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:49 AM
To: Struts Users Mailing List (E-mail)
Subject: bean:message default key?
Folks,
Is there any way to tell bean:message, if you can't find this key, then
Hani,
No, its easy :-) , just see the sourcecode for
org.apache.struts.MessageTAG, remove the JSPException that is thrown and
return the key.
joachim gjesdal
Hani Hamandi wrote:
Man! Is this a hard one? :(
-Original Message-
From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
Sent:
Ok, and then what? Re-jar struts myself with this new source-code?
Thanks!
-Original Message-
From: Joachim Gjesdal [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:27 PM
To: Struts Users Mailing List
Subject: Re: bean:message default key?
Hani,
No, its easy :-) , just see
: Monday, March 04, 2002 4:27 PM
To: Struts Users Mailing List
Subject: Re: bean:message default key?
Hani,
No, its easy :-) , just see the sourcecode for
org.apache.struts.MessageTAG, remove the JSPException that is thrown and
return the key.
joachim gjesdal
Hani Hamandi wrote:
Man! Is this a hard
It is not a problem with Struts, but with JSP : you can't nest a tag inside a
tag.
The correct way to do this, with template, is :
template:put name='title'bean:message key=index.title//template:put
Solution provided by Chris is also a possibility, but you need to use Tiles
instead of
Phil,
I ran into the same problem.
I don't know if my solution was the best approach...but it worked:
replace 4. with:
template:put name='title' content='index.title'/
then in your template use:
tiles:useAttribute id=title name=title classname=java.lang.String
/
titlebean:message
What about templates or tiles?
-Moritz.
-Original Message-
From: Francois-Xavier Bonnet [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: bean:message and performance
Hello all,
I am using bean:message tag for internationalizing
- Are you absolutely sure the i18n is the reason of the poor performance or
is it an assumption? Using some profiling tool could help pinpoint the
problem.
- Another solution to the size issue: decompose your pages into included
subcomponents that are of smaller size.
Fr.
-Original
Hi,
I don't know if your poor performances come from bean:message tags, but there
is an alternative to it.
Another approach to i18n is having one page for each Locale. Each page contains
appropriate translation. Pages can be grouped in localized directories.
Tiles framework can help you
Mike Bridge wrote:
Is it possible to embed a bean:message inside an html:link tag?
No. Check http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12720.html
--Vincent.
,
Voicemate - http://www.voicemate.com
-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 9:19 PM
To: [EMAIL PROTECTED]
Subject: RE: bean:message with bean
I made a mistake in what I sent. It should be.
logic:iterate id=key name=keys
If they are message keys from the resource file, like
msg.hello=Hello, then it should be key not name.
logic:iterate id=key name=keys
bean:message key=key /
/logic:iterate
The tag bean:write uses the name attribute (as do most
other tags in one way or another).
bean:write name=key/
David
: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 6:45 PM
To: [EMAIL PROTECTED]
Subject: Re: bean:message with bean
If they are message keys from the resource file, like
msg.hello=Hello, then it should be key not name.
logic:iterate id=key name=keys
bean:message key
]
Subject: Re: bean:message with bean
If they are message keys from the resource file,
like
msg.hello=Hello, then it should be key not name.
logic:iterate id=key name=keys
bean:message key=key /
/logic:iterate
The tag bean:write uses the name attribute (as do
most
other tags
Tom - it seems that you are correct, my html does show up correctly.
The reason I have html in my properties file is because I want to display
certain images with my messages.
Let's take the following key for example:
error.password.mismatch=trtd class=feedback height=20nbsp;nbsp;img
Matt,
what I'm currently doing is something like this: In, say, x.jsp I write
...
trtd class=feedback
bean:message key=login.error.1
img...
strongbean:message key=login.error.2/strong
/tr
whereas in AppRes.properties I have
login.error.1=...
login.error.2=...
Yeah,
The problem is that my image changes depending on the error message - so I need
a way of determining which image to display.
Oh well, I do everything from the design to the Action servlets, and stop
before the EJBs - so I guess it's only really a concern if someone else was
doing the design.
Matt,
I'm not sure whether I understood the problem correctly, but I did the
same thing for a while, and it worked for me without flush or other
tricks. I simply included the message via bean:message key=x/, not
matter whether there was HTML in it or not.
Note, however, that it can be
Hi Stephen,
Your solution sounds like its just what I'm after. I would greatly
appreciate a look at the code.
Jon.
-Original Message-
From: Stephen Schaub [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 23:34
To: [EMAIL PROTECTED]
Subject: Re: Bean:message with args
Is there a way
appreciate a look at the code.
Jon.
-Original Message-
From: Stephen Schaub [mailto:[EMAIL PROTECTED]]
Sent: 04 May 2001 23:34
To: [EMAIL PROTECTED]
Subject: Re: Bean:message with args
Is there a way to acheive the following :
bean:message key=prompt.password.sent arg0=bean:write
name
PROTECTED]
Sent: Tuesday, May 08, 2001 9:02 AM
Subject: RE: Bean:message with args
just curious... what about a minor enhancement to do it
like this:
bean:message key=prompt.password.sent
bean:write name=someBean property=email/
bean:write name=someBean property=otherAttr
Hello everybody,
I am trying to test the iterate tag and i am getting the following error..
Can somebody point out as to what i am doing wrong ? Thanks a lot. I am
including the jsp code also. I am using Tomcat 3.2 and struts 1.0
cheers,
Amar..
ERROR
-
javax.servlet.ServletException:
Is there a way to acheive the following :
bean:message key=prompt.password.sent arg0=bean:write
name=email//
without resorting to scriplets
I was looking for a way to do this a while back; currently
you have to resort to a scriptlet. I proposed and created an
implementation that allows you
78 matches
Mail list logo