No subject


Tue Feb 3 02:35:55 PST 2004


the key you add not the string message.  So why don't we keep to the =
model that Struts has? =20
=20
In looking forward towards moving to JSTL tags I would like to have just =
one error tag not two and to support backwards compatablity I suggest =
keeping the tag name of ErrorTag and have the tag handle both senerios.  =
First it tries to make the string from the MessageBundle and then if =
that fails just print the key.  This would allow the adding of key to =
the collection to work while at the same time allow users to add the =
String itself to the collection to work.
=20
Any thoughts? =20
=20
Kris

-----Original Message-----
From: Michael Rimov [mailto:rimovm at centercomp.com]
Sent: Wednesday, April 02, 2003 12:41 PM
To: opensource at jcorporate.com
Subject: RE: [Opensource] i18n issues with errormessage not being =
displaye d based on locale


At 06:10 PM 3/31/2003 -0600, you wrote:


True, but it's still pretty clean - =
addError(getString("error.messagebundlekey")); instead of =
addError("error.messagebundlekey");
=20
Re: ErrorMessageBundleTag, at a glance, it seems to me that line 115 =
could just be switched to this:
writer.println( myResponse.getString( oneError.getKey() ) );
=20
Also, ErrorMessageBundleTag doesn't wrap the errors in <li></li>. I =
think this sort of deviates from the design of struts 1.02 and would =
make it difficult to use the along with the 'error' tag (they both use =
the same header and footer messages).


I should pipe up here.  I believe Mike N's original goal in Expresso was =
to have most of the i18n code done inside the Controller itself, so all =
the jsp does is then write the internationalized strings via =
Output.getContent().

It's a tough call which would be better, but I'm just clarifying what =
the original design was.
                                                -Mike




------_=_NextPart_001_01C2FAE9.B46910D8
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks=20
for providing us with the Nash's view but I feel what is more important =
is the=20
view of Struts since the ErrorCollection extends=20
ActionError.</FONT></SPAN></DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =
size=3D2>From=20
looking at the ActionError API it takes the philosophy that it is the =
key you=20
add not the string message.&nbsp; So why don't we keep to the model that =
Struts=20
has?&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =
size=3D2>In=20
looking forward towards moving to JSTL tags I would like to have just =
one error=20
tag not two and to support backwards compatablity I suggest keeping the =
tag name=20
of ErrorTag and have the tag handle both senerios.&nbsp; First it tries =
to make=20
the string from the MessageBundle and then if that fails just print the=20
key.&nbsp; This would allow the adding of key to the collection to work =
while at=20
the same time allow users to add the String itself to the collection to=20
work.</FONT></SPAN></DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =
size=3D2>Any=20
thoughts?&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D281275117-04042003><FONT face=3DArial color=3D#0000ff =

size=3D2>Kris</FONT></SPAN></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Michael Rimov=20
  [mailto:rimovm at centercomp.com]<BR><B>Sent:</B> Wednesday, April 02, =
2003 12:41=20
  PM<BR><B>To:</B> opensource at jcorporate.com<BR><B>Subject:</B> RE: =
[Opensource]=20
  i18n issues with errormessage not being displaye d based on=20
  locale<BR><BR></FONT></DIV>At 06:10 PM 3/31/2003 -0600, you wrote:<BR>
  <BLOCKQUOTE class=3Dcite cite=3D"" type=3D"cite"><FONT face=3Darial =
color=3D#0000ff=20
    size=3D2>True, but it's still pretty clean -=20
    addError(getString("error.messagebundlekey")); instead of=20
    addError("error.messagebundlekey");</FONT><BR>&nbsp;<BR><FONT =
face=3Darial=20
    color=3D#0000ff size=3D2>Re: ErrorMessageBundleTag, at a glance, it =
seems to me=20
    that line 115 could just be switched to this:</FONT><BR><FONT =
face=3Darial=20
    color=3D#0000ff size=3D2>writer.println( myResponse.getString( =
oneError.getKey()=20
    ) );</FONT><BR>&nbsp;<BR><FONT face=3Darial color=3D#0000ff =
size=3D2>Also,=20
    ErrorMessageBundleTag doesn't wrap the errors in =
&lt;li&gt;&lt;/li&gt;. I=20
    think this sort of deviates from the design of struts 1.02 and would =
make it=20
    difficult to use the along with the 'error' tag (they both use the =
same=20
    header and footer messages).</FONT><FONT =
face=3Darial></FONT></BLOCKQUOTE><BR>I=20
  should pipe up here.&nbsp; I believe Mike N's original goal in =
Expresso was to=20
  have most of the i18n code done inside the Controller itself, so all =
the jsp=20
  does is then write the internationalized strings via=20
  Output.getContent().<BR><BR>It's a tough call which would be better, =
but I'm=20
  just clarifying what the original design=20
  =
was.<BR><X-TAB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</X-TAB><X=
-TAB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</X-TAB><X-TAB>&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</X-TAB><X-TAB>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</X-TAB><X-TAB>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;</X-TAB><X-TAB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;</X-TAB>-Mike<BR><BR></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C2FAE9.B46910D8--



More information about the Opensource mailing list