Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Boon Leng
Struts 2 mapping? Any help would be appreciated. Thanks. Regards, Boon Leng -- View this message in context: http://www.nabble.com/Migrate-Struts-1-EventDispatchAction-to-Struts-2-tf4074633.html#a11580060 Sent from the Struts - User mailing list archive at Nabble.com

Re: Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-13 Thread Boon Leng
: ... Regards, Boon Leng Laurie Harper wrote: > > What do you specifically need help with? Struts2 supports wildcard > action paths, dispatch to different methods in an action and > parameterized results (equivalent to the forwards in your S1 config). Is > there something in particula

Re: Migrate Struts 1 EventDispatchAction to Struts 2

2007-07-14 Thread Boon Leng
the action mapping? or I need to handle the event dispatch inside the action class? Thanks. Regards, Boon Leng nuwan chandrasoma-2 wrote: > > Hi, > > you can have a action mapping like this. > > > > and in your action class have 2 method according to you example > >

Reload combo option if validation fail.

2007-08-20 Thread Boon Leng
In my form, I have a select box which get the option value populated from database. But when validation fail and return to input page (jsp page), I get the error where the option value cannot be found. I know this is because the method (e.g search) is not called to retrieve data from database. I

Re: Reload combo option if validation fail.

2007-08-20 Thread Boon Leng
Hi, I have tried using Preparable and putting all the collections loading in prepare(), but because my action contains multiple methods and each load different kind of collections, end up every method call will retrieve all the collections even though it's not using it. Is there anyway I able to

Re: Reload combo option if validation fail.

2007-08-20 Thread Boon Leng
Hi Dilip Ladhani-2, Thanks for you reply, I know your solution works on struts 1, but I'm using struts 2. How can I call validate method in my Action class explictly? Thanks. Regards, Boon Leng Dilip Ladhani-2 wrote: > > Well, here's what I do. > 1) Have a private method

Re: Reload combo option if validation fail.

2007-08-20 Thread Boon Leng
Hi Zarar, I managed to solve the problem by using PreResultListener and find the action info in ActionProxy. Now I can load the collections base on method and result type :) Thanks for your help. Regards, Boon Leng Zarar Siddiqi wrote: > > You could implement Preparable an

[S2] Type Coversion in nested bean.

2007-08-29 Thread Boon Leng
ublic void setRoles(Set value) { this.roles = value; } ... } JSP --- SampleAction-coversion.properties --- Element_user.roles=sample.model.Role KeyProperty_user.roles=id CreateIfNull_user.roles=true Regards, Boon Leng -- View this message in cont

[S2] Type Coversion in nested bean.

2007-08-29 Thread Boon Leng
Hi, I'm trying to use type conversion for nested bean. I have no problem populating the bean if the List is not nested inside another bean. Does struts 2 able to perform type conversion for nested bean? Any help would be appreciated. Thanks. JSP --- SampleAction

[S2] Excluding path with namespace in Sitemesh

2007-09-20 Thread Boon Leng
I tried to exclude some pages from sitemesh decorator, but it seem that sitemesh not able to recognise action path which has namespace. I have no problem with pages stored in the folder or pages without namespace. Any idea how to use namespace inside sitemesh decorator? Thanks. The following is m

Re: img tag?

2007-09-24 Thread Boon Leng
Yes, you need to use pure HTML. You can use jsp tag file to create something similar to (this is what i did). Adam Hardy-3 wrote: > > Is there a struts2 non-OGNL equivalent to the old taglib? > > Or do I have to use with pure HTML? > > > ${folder_shut} > > > > ---

Re: Add style such as bgcolor, height, width to s:optiontransferselect, s:form Tags

2007-09-24 Thread Boon Leng
You can set the attribute "cssClass", "cssStyle", "doubleCssClass", "doubleCssStyle" which is equivalent to html "class" and "style" attributes to control the style. Example: .mystyle { background-color: #00F; } Emi Lu-2 wrote: > > Hello, > > May I know how to give style such as border