I have a question, please see code of my action:

public class PrepareLawDraftAction extends ActionSupport{

private LawDraft lawDraft; //has method getDateIntro(), which returns Date
private Date loadDate;

public String execute(){
//...
}
@TypeConversion(converter = "struts2.action.admin.converter.DateConverter")
//coverter presents date as dd.MM.yyyy
        public Date getLoadDate() {
                return loadDate;
        }
}

and my jsp code, which goes after described action?

<s:textfield name="loadDate" label="date of loading" disabled="true"
size="10"/>
<s:datetimepicker label="Date of introduction" name="dateIntro"
displayFormat="dd.MM.yyyy" value="%{lawDraft.dateIntro}" toggleType="fade"
language="RU"/>

And the question:
conversion on loadDate works fine, my jsp is rendered with appropriate
format of date, but how can I apply format to getter getDateIntro of
lawDraft?

I don't want to spread conversion in my project. As i undersand, i can apply
annotation on the getter getDateIntro() of class LawDraft.
But my LawDraft class belongs to EBJ module, and I don't want spread STRUTS2
logic on my business-logic module, it is bad design. That's not right. How
can I overcome this difficulty?
-- 
View this message in context: 
http://www.nabble.com/%40Conversion-on-method-of-the-previous-Action-field-tp18584142p18584142.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to