i couldnt get that to work either.. suggest setting the value and truncating the value to a new String variable in action class or setting the value and truncating the value to a new String variable in backing bean
Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: stefano.tranquill...@gmail.com > Date: Mon, 22 Jun 2009 18:26:45 +0200 > Subject: Re: Display only 100 chars of a string > To: user@struts.apache.org > > are you sure that this thing works? > because i don't see anything. > I'm inside an iterator , with this thing works <s:property > value="%{description}" /> with yours no. > seems that description is empty when i do <s:property > value="@java.lang.str...@format('%.100s', description)" /> > > On Mon, Jun 22, 2009 at 18:09, Jon Pearson<jon.pear...@sixnet.com> wrote: > > Sorry, I accidentally embedded double quotes inside double quotes, > > here's a fix: > > > > <s:property value="@java.lang.str...@format('%.100s', description)" /> > > > >> -----Original Message----- > >> From: stefano.tranquill...@gmail.com > >> [mailto:stefano.tranquill...@gmail.com] On Behalf Of Stefano > >> Sent: Monday, June 22, 2009 12:07 PM > >> To: Struts Users Mailing List > >> Subject: Re: Display only 100 chars of a string > >> > >> @Greg: do u put that code inside the bean? i can't do this. > >> @Jon thanks, but i've some problem with the " of the part: "%.100s" > >> the system found a end tag " at the first " that it encountred. i > >> tried to put \" but doesn't work. > >> > >> On Mon, Jun 22, 2009 at 18:00, Jon > >> Pearson<jon.pear...@sixnet.com> wrote: > >> > <s:property value="@java.lang.str...@format("%.100s", > >> description)" /> > >> > should work (check > >> > > >> http://www.opensymphony.com/ognl/html/LanguageGuide/staticMethods.html > >> > for OGNL for calling static methods) > >> > > >> >> -----Original Message----- > >> >> From: Stefano Tranquillini [mailto:stefano.tranquill...@gmail.com] > >> >> Sent: Monday, June 22, 2009 11:58 AM > >> >> To: Struts Users Mailing List > >> >> Subject: Re: Display only 100 chars of a string > >> >> > >> >> On Mon, Jun 22, 2009 at 17:46, Jon > >> >> Pearson<jon.pear...@sixnet.com> wrote: > >> >> > String.format("%.100s", s); > >> >> how can i put this thing in the jsp? > >> >> > >> >> > >> >> -- > >> >> Stefano > >> >> > >> >> > >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> >> For additional commands, e-mail: user-h...@struts.apache.org > >> >> > >> >> > >> > > >> > > >> --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> > For additional commands, e-mail: user-h...@struts.apache.org > >> > > >> > > >> > >> > >> > >> -- > >> Stefano > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > Stefano > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Microsoft brings you a new way to search the web. Try Bing™ now http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1