ok but i must use personal interceptor for my project

Terry Gardner-2 wrote:
> 
> I think you can use date formatters in java.text to accomplish this  
> with no coding.
> 
> On Apr 7, 2009, at 6:36 PM, PEGASUS84 wrote:
> 
>>
>> I want create an interceptors wich converts the list of select tag  
>> mese in
>> another string:1,2...
>> i make this:
>>
>>
>> package bean;
>> import com.opensymphony.xwork2.ActionInvocation;
>> import com.opensymphony.xwork2.interceptor.Interceptor;
>> import com.opensymphony.xwork2.Action;
>> public class convMese implements Interceptor{
>>    String mese;
>>
>>
>>    public void setMese(String m){mese=m;}
>>    public String getMese(){return mese;}
>>
>>
>>
>> public void destroy() {
>> }
>> public void init() {
>> }
>> public String intercept( ActionInvocation actionInvocation) throws
>> Exception{
>>    if (getMese().equals("Gennaio"))
>>        setMese("1");
>>    else if(getMese().equals("Febbraio"))
>>        setMese("2");
>>    else if(getMese().equals("Marzo"))
>>        setMese("3");
>>    else if(getMese().equals("Aprile"))
>>        setMese("4");
>>    else if(getMese().equals("Maggio"))
>>        setMese("5");
>>    else if(getMese().equals("Giugno"))
>>        setMese("6");
>>    else if(getMese().equals("Luglio"))
>>        setMese("7");
>>    else if(getMese().equals("Settembre"))
>>        setMese("9");
>>    else if(getMese().equals("Ottobre"))
>>        setMese("10");
>>    else if(getMese().equals("Novembre"))
>>        setMese("11");
>>    else if(getMese().equals("Dicembre"))
>>        setMese("12");
>>    else
>>        setMese("0");
>>
>>
>>      return actionInvocation.invoke();
>>
>> }
>>
>> but it doesn't work
>> can someone help me?
>> -- 
>> View this message in context:
>> http://www.nabble.com/create-personal-interceptor-tp22939722p22939722.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
> 
> ==
> 
> terry.gard...@sun.com
> Mobile: +1 404 925 6385
> Blog: http://blogs.sun.com/terrygardner
> Blog: http://dtfar.blogspot.com
> Twitter: http://twitter.com/tgardner
> SLAMD: http://slamd2.dev.java.net
> 
> "It is better to know some of the questions than all of the answers."  
> - Thurber
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/create-personal-interceptor-tp22939722p22947039.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to