Re: Struts 2.1 book

2009-11-04 Thread Dave Newton
James Cook wrote: I have that book and thoroughly enjoyed it, gave me a great platform for me to transition from S1 to S2... So I second the recommendation Thank you both very much--that means a lot to me. Stay tuned for "Inside Struts 2" as well, although I'm a bit delayed at the moment :/

Re: Default mapping to a result.

2009-11-04 Thread Dave Newton
Siddiq Syed wrote: Once an action method returns a string and if the string is not mapped to a result name in struts.xml , is there any way where we can display a default page. For example as mention in the below struts.xml file, editGuidelinesCaseEvaluation edi

Re: retrieving the result from strust config.

2009-11-04 Thread Dave Newton
Siddiq Syed wrote: Is there any way where I can retrieve the result name from the prepare method of an action. For example, I have the below mapping in the struts.xml file. editGuidelinesCaseEvaluation editShortSentenceCaseEvaluation editShortSentenceCaseEvaluation

Re: ActionRedirect

2009-11-04 Thread Dave Newton
fea jabi wrote: Is there a way I can get this list thru redirect??? No, a redirect is a new request. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.

ActionRedirect

2009-11-04 Thread fea jabi
I am setting an list as a request attibute. I am creating a new ActionRedirect(...) and adding parameter to it. redirected action class is not having the request attribute list. request.setAttribute("EMPLIST", emplist ); AcitonRedirect redirect = new ActionRedirect(...) .

Re: struts2 tabbedpanel tag

2009-11-04 Thread fr Rouxel
any help? fr Rouxel wrote: > > Hi, > > I have a jsp which contains a div which contains a tabbedpanel component. > when I refresh that div in ajax mode, It's getting slower and slower ??? > with all browsers, IE, FF, even Chrome. > > is it normal? > > I read I need to use parseContent=false

Re: s:iterator ¿begin -> end?

2009-11-04 Thread Musachy Barroso
Prints: 2 3 4 5 6 7 8 9 it seems to work fine. On Wed, Nov 4, 2009 at 1:35 PM, Volker Karlmeier wrote: > With 2.1.8, you can use > > > ... > > > But it still has a bug: see http://issues.apache.org/struts/browse/WW-3314 > > Regards > >  Volker > > Am 04.02.2009 16:04, schrieb Igna

Re: Default mapping to a result.

2009-11-04 Thread Greg Lindholm
I've never tried this and haven't found any documentation but reading the source it appears you can configure a wildcard result using . see com.opensymphony.xwork2.DefaultActionInvocation.createResult() source [1] [1] http://svn.opensymphony.com/fisheye/browse/~raw,r=1851/xwork/trunk/src/java/com

Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Dale Newfield
Graham Leggett wrote: Dale Newfield wrote: Check out the httpheader result type. Does any documentation exist anywhere for this? At least: http://struts.apache.org/2.1.8/struts2-core/apidocs/org/apache/struts2/dispatcher/HttpHeaderResult.html -Dale -

Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Chris Pratt
There's some info in the wiki, like there is for all the standard results ( http://cwiki.apache.org/WW/httpheader-result.html) (*Chris*) On Wed, Nov 4, 2009 at 1:49 PM, Graham Leggett wrote: > Dale Newfield wrote: > > >> I am currently trying to find out whether a struts2 action can return a >

Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Graham Leggett
Dale Newfield wrote: >> I am currently trying to find out whether a struts2 action can return a >> specific response code (eg 404, or 500). > > Check out the httpheader result type. Does any documentation exist anywhere for this? After a whole lot of googling for httpheader, I eventually came a

Re: s:iterator ¿begin -> end?

2009-11-04 Thread Volker Karlmeier
With 2.1.8, you can use ... But it still has a bug: see http://issues.apache.org/struts/browse/WW-3314 Regards Volker Am 04.02.2009 16:04, schrieb Ignacio de Córdoba: Hi there, I've checked struts2 docs and this forum and have found no inside syntax for s:iterator tag to do: Examples i

Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Chris Pratt
Yup, just define your result to use the httpheader type. Like so, 404 (*Chris*) On Wed, Nov 4, 2009 at 1:25 PM, Graham Leggett wrote: > Hi all, > > I am currently trying to find out whether a struts2 action can return a > specific response code (eg 404, or 500). > > Is this possible? >

Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Dale Newfield
Graham Leggett wrote: I am currently trying to find out whether a struts2 action can return a specific response code (eg 404, or 500). Check out the httpheader result type. -Dale - To unsubscribe, e-mail: user-unsubscr...@str

Default mapping to a result.

2009-11-04 Thread Siddiq Syed
Hi all, Once an action method returns a string and if the string is not mapped to a result name in struts.xml , is there any way where we can display a default page. For example as mention in the below struts.xml file, editGuidelinesCaseEvaluation editShortSente

Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Graham Leggett
Hi all, I am currently trying to find out whether a struts2 action can return a specific response code (eg 404, or 500). Is this possible? Regards, Graham -- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For addi

filter exception on deployment

2009-11-04 Thread larryreed
I'm having a persistent problem deploying my project to my tomcat 6 server in which the struts filter generates a null pointer exception. What confuses me is that I do not have this problem running the system under Eclipse, but only when I deploy it to my standalone Tomcat instance. Under Eclips

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Greg Lindholm
On Wed, Nov 4, 2009 at 2:54 PM, Siddiq Syed wrote: > > When you have a validation file like actionname-aliase-validation.xml and > you want to carryout date validation in that as other validation , there is > no direct way to do that. > Correct, this is a limitation, there currently is no way t

retrieving the result from strust config.

2009-11-04 Thread Siddiq Syed
Is there any way where I can retrieve the result name from the prepare method of an action. For example, I have the below mapping in the struts.xml file. editGuidelinesCaseEvaluation editShortSentenceCaseEvaluation editShortSentenceCaseEvaluation If I passes the stri

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Siddiq Syed
When you have a validation file like actionname-aliase-validation.xml and you want to carryout date validation in that as other validation , there is no direct way to do that. Handling DateFormat.parse() is more java specific way and can be done in any layer of the application. The front-end val

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Greg Lindholm
Still a bad idea as it allows invalid dates (e.g. Nov. 31) and does nothing for leap years. If you want to know if a date is valid use DateFormat.parse(). On Wed, Nov 4, 2009 at 2:16 PM, Kawczynski, David < david_kawczyn...@merck.com> wrote: > That is unreadable. What about this, it's much eas

RE: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Siddiq Syed
Does it checks for leap year ? (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d I guess this does not check for leap year, If the user enter the leap year the framework passes the validation successfully. which it should not and give you the error message. Kawczynski, David wrot

RE: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Kawczynski, David
That is unreadable. What about this, it's much easier on the eyes: (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d From http://www.regular-expressions.info/regexbuddy/datemmdd.html > > Greg Lindholm-2 wrote: > > > > > >> > >> > (((0[13578])|(1[02]))[\/]((0[1-9])|([12

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Siddiq Syed
But I guess there is no direct validation for a date in struts 2. If you give date validation like mention below 01/01/1990 01/01/2000 Joining date must be supplied between ${min} and ${max} It will check for the range , not the validation , like invalid value and leap

Re: s:debug tag causes exception running in Jetty

2009-11-04 Thread wild_oscar
Well, I was running some more tests when it started working. This was when I ran the application in debug mode (in Eclipse), rather than simply run the application. Have you tried that, Bruce? phillips1021 wrote: > > I have not been able to figure out why the s:debug tag doesn't work in > Jett

Re: How to setup package based on Struts2-REST-Showcase app?

2009-11-04 Thread jamestan
Since I have not seen your struts.xml, I can just reply based on some assumption. Please make sure your package name is website, e.g. HTH J Haulyn R. Jason wrote: > > Hi, all > > I test my application based on Struts2-REST-Showcase.2.1.2Beta app. > Without any changes, it works well and lo

Re: s:debug tag causes exception running in Jetty

2009-11-04 Thread phillips1021
I have not been able to figure out why the s:debug tag doesn't work in Jetty but works fine in Tomcat. Bruce What the... I found out about s:debug today and tried it. It worked without a hassle. Some minutes later, I tried again and now it doesn't work on any page! Did you

Re: s:debug tag causes exception running in Jetty

2009-11-04 Thread wild_oscar
phillips1021 wrote: > > Using the s:debug tag on a JSP in an application running in the Jetty > servlet container ( http://www.mortbay.org/jetty/ > http://www.mortbay.org/jetty/ ) cause Jetty to throw the following > exception: > > org.apache.jasper.JasperException: Class: > org.apache.jasper.

RE: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
My understanding was wrong - thought it has to be "List". Also did not think about LinkedHashMap. Tried also and working fine. Guess should also work. Cheers! -Original Message- From: Samuel Robert [mailto:samuelrobert@gmail.com] Sent: 04 November 2009 16:52 To: Struts Users Mail

Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Samuel Robert
At least with String keys, it works fine: Code in your action: private Map myMap = new LinkedHashMap(); .. myMap .put("key1", "Yes");// or getText(..) myMap .put("key2", "No"); .. public Map getMyMap() { return myMap; } JSP: 2009/11/4 Qunhuan Mei > Greg and Samuel, > > Thank yo

RE: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
Greg and Samuel, Thank you very much indeed for your quick response. Your suggestions are indeed working! Just out from my curiosity, would it be possible to achieve the same effect by the code from the action class (I have got no more clue since all my effort failed)? The documentation (2.1.8,

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Greg Lindholm
> > (((0[13578])|(1[02]))[\/]((0[1-9])|([12]\d)|(3[01])))|(((0[469])|(11))[\/]?((0[1-9])|([12]\d)|(30)))|((0?2)[\/]((0[1-9])|(1\d)|(2[0-8][\/](((19)|([1-9][0-9]))([\d][\d]|((0?2)[\/](29)[\/](((19)|([1-9][0-9]))(([02468][048])|([13579][26])$ > > > > IMHO this is unreadable and unma

Re: s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread Siddiq Syed
As far as date validation are concerned , declare the date variable as string in your view bean, Add regular expression validation in the validation file. (((0[13578])|(1[02]))[\/]((0[1-9])|([12]\d)|(3[01])))|(((0[469])|(11))[\/]?((0[1-9])|([12]\d)|(30)))|((0?2)[\/]((0[1-9])|(1\d)|(2[0-8]))

Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Samuel Robert
This should also work: 2009/11/4 Greg Lindholm > You can't nest struts tags so you can't put a inside of > tag but you should be able to call getText(). > I would try this: > > value="true" /> > > > On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei > wrote: > > > Hi, > > > > > > > > For a s

Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Greg Lindholm
You can't nest struts tags so you can't put a inside of tag but you should be able to call getText(). I would try this: On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei wrote: > Hi, > > > > For a single pair of radio buttons, e.g. "Yes" or "No" without > localisation, > the following jsp code

Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
Hi, For a single pair of radio buttons, e.g. "Yes" or "No" without localisation, the following jsp code seems to be straight forward and will always come out with true/false returned to the server (localised Yes or No can be received on the server after user have made choice, but this is not t

Re: NoResult - write response in the Action

2009-11-04 Thread Greg Lindholm
Hey Admins... I don't seem to be able to edit http://struts.apache.org/2.x/docs/result-configuration.html is there a problem with the wiki (or is it just down for maintenance)? On Wed, Nov 4, 2009 at 10:24 AM, Greg Lindholm wrote: > Thanks. I did see the javadoc for NONE (after you suggested usi

Re: NoResult - write response in the Action

2009-11-04 Thread Greg Lindholm
Thanks. I did see the javadoc for NONE (after you suggested using it). It just seemed to me to be a little vague considering that NONE really is a special case as it is the only result that is 'functional' where the others are more like 'convention'. In any case it certainly wasn't a place I thoug

Re: NoResult - write response in the Action

2009-11-04 Thread Haroon Rafique
On Today at 9:42am, GL=>Greg Lindholm wrote: GL> Thanks that did the trick. GL> GL> Where did you learn about the NONE result? Is it documented somewhere? GL> Hi Greg, I first saw it in the 2.0.11 source code when trying to create a new result type. The javadoc for it was quite helpful:

Re: NoResult - write response in the Action

2009-11-04 Thread Brian Thompson
Yes. See: http://www.opensymphony.com/xwork/api/com/opensymphony/xwork/ActionSupport.html http://www.opensymphony.com/xwork/api/com/opensymphony/xwork/Action.html#NONE -Brian On Wed, Nov 4, 2009 at 8:42 AM, Greg Lindholm wrote: > Thanks that did the trick. > > Where did you learn about the NONE

s:textfield and date format as dd/MM/yyyy

2009-11-04 Thread carl ballantyne
Hi All, I have a Person object with a birthday attribute which is a Date. In the form I have a textfield to enter the value. I want the field to display the date in the format dd/MM/ and the validation to apply using that format. However everything I am trying does not work. I tried p

Re: NoResult - write response in the Action

2009-11-04 Thread Greg Lindholm
Thanks that did the trick. Where did you learn about the NONE result? Is it documented somewhere? On Tue, Nov 3, 2009 at 5:56 PM, Haroon Rafique wrote: > On Today at 5:13pm, GL=>Greg Lindholm wrote: > > GL> I have a situation where I want to fully handle the result in the > Action > GL> includi

Re: Using Struts2 JQuery drag & drop

2009-11-04 Thread Ignacio de Córdoba
Hello, I agree with your point of view, but sj: tags are a good start point to get introduced to JQuery. I'll look anyway at remote divs the jQuery "direct way"... Thanks for your reply Sparecreative wrote: > > Hey Ignacio, > > I’m not a big fan of integrated ajax functionality. While it prov

Re: Tags html into tags JSP

2009-11-04 Thread peibel80
thanks Liang It was this. Liang ZHOU-2 wrote: > > hi: > > you can try this attribute of c:out tag: > escapeXml="false" > > good luck > > 2009/11/2 peibel80 : >> >> Hi, >> >> I have a variable with tags html. >> >> String oldDate = "Cod=23Des=Area 22" >> >> and I use this tag jsp: >> >> >>