AW: [S2] trim textfield
This one worked for me. public class StringTrimInterceptor extends AbstractInterceptor { /* (non-Javadoc) * @see com.opensymphony.xwork2.interceptor.AbstractInterceptor#intercept(com.opensymphony.xwork2.ActionInvocation) */ @Override public String intercept(ActionInvocation pActionInvocation) throws Exception { // trim params Map params = pActionInvocation.getInvocationContext().getParameters(); for (Object o : params.entrySet()) { Entry e = (Entry) o; if (e.getValue() instanceof String[]) { String[] values = (String[]) e.getValue(); ListString newvalues = new ArrayListString(); for (String string : values) { newvalues.add(string.trim()); } e.setValue(newvalues.toArray(new String[newvalues.size()])); } } pActionInvocation.getInvocationContext().setParameters(params); return pActionInvocation.invoke(); } } interceptor name=stringTrimInterceptor class=xxx.core.interceptors.StringTrimInterceptor /interceptor -- --- Adrian Ost Applikations-Entwickler Tel.: +49 89 322986 591 Fax: +49 89 322986 570 Mobile: +49 172 8389 591 E-Mail: adrian@mindmatics.de --- www.mindmatics.com www.mopay.com www.clanmo.com MindMatics AG, Marcel-Breuer-Str. 18 80807 Muenchen, Germany --- The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert (Vorsitzender), Christian Hinrichs, Armin Barbalata Aufsichtsratsvorsitzender: Olav Ostin --- -Ursprüngliche Nachricht- Von: mailtolouis2020-str...@yahoo.com [mailto:mailtolouis2020-str...@yahoo.com] Gesendet: Dienstag, 14. September 2010 17:20 An: Struts Users Mailing List Betreff: Re: [S2] trim textfield Hi Dave, Hope u can commit it when u free, it quite useful though From: Dave Newton davelnew...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Tue, September 14, 2010 3:55:03 PM Subject: Re: [S2] trim textfield Not by default. I'd probably just write an interceptor with optional excludes... I had one I was going to commit but never did then I was busy for a year. On Tue, Sep 14, 2010 at 10:50 AM, mailtolouis2020-str...@yahoo.com wrote: Hi, In struts2 is there anyway to set to trim the value in textfield or textarea when it set to action/model? Regards LV - 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
Re: Clearing Action properties from ValueStack
hi, not sure if this is really what you're problem is about, but adding the parameter includeParams to the struts url-tag solved my problem of having the old value + my new value send on resubmitting. greets, adrian Rushikesh Thakkar schrieb: Hi Group, Can anyone tell me how long is the value of Action Property held on the ValueStack. I am asking this b'coz I am facing a problem: Background: My action has 4 members (and getter,setter for them). One of them is a POJO with many properties. So my JSP has different fields for supplying values to these properties (none of them is mandatory). Finally, I am printing the values of these properties when I submit the form to Action. *Actual Problem*: At the time of re-submitting the form with different set of propeties, the older property-values are still present. They show up in the sysouts. I have also made sure to declare the members of the Action class using new operator and no-argument constructor, but that too didn't help for this POJO. Kindly help me out with this. !-- Gentle Reminder: Still waiting for somebody to look at my previous post. --
Re: Clearing Action properties from ValueStack
oh..forgot...set its value to 'none' Adrian Ost schrieb: hi, not sure if this is really what you're problem is about, but adding the parameter includeParams to the struts url-tag solved my problem of having the old value + my new value send on resubmitting. greets, adrian Rushikesh Thakkar schrieb: Hi Group, Can anyone tell me how long is the value of Action Property held on the ValueStack. I am asking this b'coz I am facing a problem: Background: My action has 4 members (and getter,setter for them). One of them is a POJO with many properties. So my JSP has different fields for supplying values to these properties (none of them is mandatory). Finally, I am printing the values of these properties when I submit the form to Action. *Actual Problem*: At the time of re-submitting the form with different set of propeties, the older property-values are still present. They show up in the sysouts. I have also made sure to declare the members of the Action class using new operator and no-argument constructor, but that too didn't help for this POJO. Kindly help me out with this. !-- Gentle Reminder: Still waiting for somebody to look at my previous post. --
[s2] Changing target-attribute-value in action class?
hi, is there a way to change the target, set in struts 2 ajax tags, within the corresponding action class? thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XWORK2/struts2 logs out Unable to find text for key
I use struts 2.0.9 and the s:i18n-Tag and s:text to get values from a resource bundle. My jsp-pages get rendered the correct way, but it happens more often that somehow my resource bundle gets lost during writing the response. The result is a page where my text, at the beginning, consists of the the correct value but then it happens that text values are missing and instead only the key-name is written out. All values exist in the resource-bundle. I really don't know how it could be that my resource bundle gets lost while rendering the page as the values and the resource bundle are found at the beginning of the page and the error occurs within the page rendering. This error results in the log warning of the method findText(...) in LocalizedTextUtil.class, xwork2.jar. Anybody has a clue or run into the same occurance? Page buffering? Tomcat hot deployment? (But it also occures when the war file is not hot deployed) thanks in advance, greets adrian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] s:text somtimes doesn't render the key porperties
Hi everybody, i have a property file and by using the s:text tag i am rendering out text from a property file. Some text s:text name=my.existing.property /. Works fine, but sometimes it doesn't render the value of the property, but the key name itself (Results in: Some text my.existing.property.) Cannot reproduce this. Any ideas how to make SURE that the value of the property will always be shown? greets, adrian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:present available in struts 2 ?
Hi all, can I still use the logic-taglib in struts 2? or is there any other way to ask for the correct role? logic:present role=someRole ... some context /logic thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
freemarker @s.property within @s.text not working
hi all, Iterating over a ListString type arrayList works fine just like this: @s.iterator value=%{myList} ... @s.property / ... /@s.iterator BUT this is not working: @s.iterator value=%{myList} ... b@s.text name=@s.property / //b ... /@s.iterator Result in HTML: *@s.property /* Means: property gets taken as value and not replaced by its value Am I doing sth wrong? Possible way would be to have something like a counter within the iterator but I don't know how to set a variable inside ???: (Note: %{myList[3]} works fine) @s.iterator value=%{myList} ... / myCounter = 0;/ b@s.text name=%{myList[/myCounter/]} //b /myCounter++;/ ... /@s.iterator thanks for all replies! -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail.
Re: freemarker @s.property within @s.text not working
Adrian Ost schrieb: hi all, Iterating over a ListString type arrayList works fine just like this: @s.iterator value=%{myList} ... @s.property / ... /@s.iterator BUT this is not working: @s.iterator value=%{myList} ... b@s.text name=@s.property / //b ... /@s.iterator Result in HTML: *@s.property /* Means: property gets taken as value and not replaced by its value Am I doing sth wrong? Possible way would be to have something like a counter within the iterator but I don't know how to set a variable inside ???: (Note: %{myList[3]} works fine) @s.iterator value=%{myList} ... / myCounter = 0;/ b@s.text name=%{myList[/myCounter/]} //b /myCounter++;/ ... /@s.iterator thanks for all replies! GOT it. Solution: @s.iterator status=stat value=%{myList} b@s.text name=%{clientApps[#stat.index]} //b /@s.iterator -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tab Persistance
Brian Trzupek schrieb: I have a page with several Struts Tabs on it. When I submit the page, I would like it to come back to the 'active' tab (the previous selected tab). Is there a best practice on how to do this? Thanks, Brian- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] if you use an ajax submit you can put your current tab id as target otherwise you have to set the tabbedpanel attribute 'selectedTab' to your active-tab-id. -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make tabs in JSP
Angelo zerr schrieb: Hi, perhaps you could be interest with JSPTabControl http://jsptabcontrol.sourceforge.net/ which generate tabs with ul/li HTML. Regards Angelo 2007/6/26, Kavita Mehta [EMAIL PROTECTED]: Hi, I want to code a JSP page with tabs . Does struts support an easy way of doing the same. Any link to the related resource would be helpful ...I have searched on Struts-Layout ...any other option ? Thanks Kavita *DISCLAIMER* This message and/or attachment(s) contained here are confidential, proprietary to HUGHES SYSTIQUE and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the entity it is addressed to. If you are not the intended recipient of this message, it is strictly prohibited to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately and delete the message. or u just go for the struts 2 tag tabbedpanel ... pretty easy to customize with new template. http://struts.apache.org/2.x/docs/tabbedpanel.html greets adi -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Exporting to CSV and Excel
David Durham, Jr. schrieb: On 6/18/07, Jeff Amiel [EMAIL PROTECTED] wrote: On 6/18/07, Skip Hollowell [EMAIL PROTECTED] wrote: I see that in the new 2.0.8 (Thanks Ted, Don and team) that the Jasper plugin is included. Does that mean that Jasper is the endorsed recommended way to export data to Excel and or CSV? If so, great. If not, can you offer up what you feel is a preferred mechanism for exporting to Excel? I personally use display tag (http://displaytag.sourceforge.ne) which has fine excel, csv and pdf export mechanism. It all depends on what you are trying to 'export'. Both of these tools use Apache POI http://poi.apache.org/ as an underlying Excel format generator. I wouldn't use Jasper as an Excel generator, unless I were already using or intended to use Jasper as a reporting engine. Display tag is only applicable, in this case, if you need tabular data within a JSP along with an option to export in Excel format. POI is fairly easy to use, I've found, but it does have some memory related problems associated with very large excel files. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I am using display Tag as well but as soon as I sourrond it with the ajax:displayTag it returns me an empty excel file. -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
building struts 2.0.6 from source
Hi all, I downloaded struts 2.0.6-src, did an ANT build and replaced the resulting struts2-core.jar with my recent jar struts2-core-2.0.6. Didn't make any changes in the source nor my webapp. But now, when deploying my webapp I get an Filterstart-errror. any ideas? -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tabbedpanel look changes
Has anybody made experiences modifing the look of struts 2.0.6's -tag tabbedPanel ? I'd like to overwrite the related files within my application. Best case: Using attributes like templateCssPath for the file TabContainer.css and templatePath for TabContainer.html. Both are originally set in the according file TabContainer.js. Of course I could change the settings within this file. But it would't make much sense as I want to change the look within the appliktion. Best Regards, adrian -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tabbedpanel modification
Has anybody made experiences modifing the look of struts 2.0.6's -tag tabbedPanel ? I'd like to overwrite the related files within my application. Best case: Using attributes like templateCssPath for the file TabContainer.css and template for TabContainer.html. Both are originally set in the according file TabContainer.js. Of course I could change the settings within this file. But it would't make much sense as I want to change the look within the appliktion. Best Regards, adrian -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 - parameter passing (newbie) question
not ognl-syntax but these work: s:property value=${param.param2} / s:property value=${param['param2']} / c:out value=${param['param2']} / Scott Trafton schrieb: I am having difficulty accessing the parameters I am passing into the s:include.. tag. I have tried everything I can think of to get access to these parameters. Could anyone tell me where I am going wrong and how you are suppose to access the parameter values. Thanks, Scott == Page 1) s:push value=callPass s:include value=/web/common/callpassRow.jsp s:param name=param1 value='01234'/ s:param name=param2 value='666'/ s:param name=param3 value='1'/ /s:include /s:push Page 2 )callPassRow.jsp to be included.. [EMAIL PROTECTED] prefix=s uri=/struts-tags % tr class=campaign-s:property value=#parameters.param1/ id=sub-s:property value=#parameters.param2/-s:property value=#parameters.param3/ td class=canFade indent2s:property value=name//td td.../td /tr = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Adrian Ost MindMatics AG Marcel-Breuer-Str. 18 D-80807 München E-Mail: [EMAIL PROTECTED] Web: www.MindMatics.de Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitten wir Sie, uns unverzüglich zu benachrichtigen und die E-Mail zu löschen. Ust-IdNr. DE211603599 Registergericht München: HRB 131369 Vorstand: Ingo Lippert, Christian Hinrichs, Oliver Beckmann, Armin Barbalata Aufsichtsrat: Martin Weber (Vorsitzender), Dr. Dirk Brückner (stellvertr. Vorsitzender) The contents of this e-mail are confidential. If you received this e-mail in error, please notify us immediately and delete the e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]