Re: S2 s:form in interator really slow

2010-03-30 Thread Lukasz Lenart
2010/3/29 Greg Lindholm greg.lindh...@gmail.com: s:iterator value=#action.userConnectionsPaged What is this? Did you try with static list (not from DB or so)? Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl

Re: [s2] number format s:textfield tag

2010-03-30 Thread Juanjo C
Any idea? 2007/10/23 Pedro Herrera pedro_herr...@hotmail.com Hi, I have a currency input field (BigDecimal). In my location the decimal point is comma, eg, 10,00(==10.00) must be permitted. Struts is throwing a message error : Invalid field value for field valor. Thanks Herrera

Re: [s2] number format s:textfield tag

2010-03-30 Thread Eduard Neuwirt
Hi, This is very diffcult issue in struts. First you have to set your locale correctly. Second you have to use in the jsp the correct calls for number formatting. The struts docummenattion explains this point in FAQ (I hold in mind so). Alternatively you can write your own converter for

Populate: Implement preparable or richer getter approach

2010-03-30 Thread Alex Rodriguez Lopez
Hi to all, as I learn more things about S2 some questions emerge about best practices more experiences users might know how to do best. I believe it is a common problem having to populate fields like selects first thing (with data from DB or stored in session) before any task is done.

Re: [s2] number format s:textfield tag

2010-03-30 Thread Greg Lindholm
In my experience it's better to define number (and time) input fields as String and perform the conversion and validation in your action using java.text.NumberFormat . This puts you in control of the process and let's you handle I18N issues that way you want to without fighting Struts. I

Re: Populate: Implement preparable or richer getter approach

2010-03-30 Thread Greg Lindholm
I will typically retrieve everything I need to populate the fields in prepare() and try to do it within a single db transaction. One issue with doing db retrieval from within a getter is the getter may be called multiple times which would mean repeating db queries (inefficient) or doing lazy

textfield with Date object

2010-03-30 Thread Wick, Dan
Does anyone know how to change the format of dates coming in on a text input being backed by a java.util.Date in the Action? If I enter dates in US format (ex: 3/31/2010 for March 31, 2010) everything is fine. This requires a different style input though, using Day/Month/Year (31/3/2010). I

Re: textfield with Date object

2010-03-30 Thread Greg Lindholm
(Seems like I just answered this question... but here it is again this time for Dates) In my experience it's better to define number (and time) input fields as String and perform the conversion and validation in your action using java.text.NumberFormat (and java.text.DateFormat). This puts you

Re: Populate: Implement preparable or richer getter approach

2010-03-30 Thread Paweł Wielgus
Hi Alex, if i would take your code and try to change something, i would lose some time to find where this damn select options come from, of course getter would be the last place to check. That's the only real con that i can think of. Best greetings, Paweł Wielgus. 2010/3/30 Alex Rodriguez Lopez