You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Todd Nine <to...@gmail.com> on 2005/02/08 21:20:04 UTC
Extending Action Mapping
Hi all, I am trying to extend the ActionMapping Class with my own,
LaserActionMapping. I have a List that I want to populate with
MessageResource keys,. I have the configuration below, and my class.
The setter is never being called, does anyone have any suggestions?
<action path="/otherparties"
type="com.llic.web.action.OtherPartiesAction" parameter="method"
input="newBusiness/OtherPartiesTab.jsp" name="otherPartiesForm"
scope="request" validate="true"
className="com.llic.web.action.LaserActionMapping" >
<set-property property="ignore" value="annuity.button.next"/>
<set-property property="ignore" value="annuity.button.previous"/>
<set-property property="ignore" value="annuity.defaultmethod"/>
<set-property property="ignore" value="annuity.reloadmethod"/>
<forward name="load" path="newBusiness/OtherPartiesTab.jsp"/>
<forward name="next" path="newBusiness/OtherPartiesTab.jsp"/>
<forward name="addnewparty" path="newBusiness/OtherPartiesTab.jsp"/>
<forward name="removeparty" path="newBusiness/OtherPartiesTab.jsp"/>
<forward name="updatechanges" path="newBusiness/OtherPartiesTab.jsp"/>
<forward name="loadParty" path="newBusiness/OtherPartiesTab.jsp"/>
</action>
/*
* Created on Feb 8, 2005
*
*/
package com.llic.web.action;
import java.util.ArrayList;
import java.util.List;
import org.apache.struts.action.ActionMapping;
/**
* @author Todd Nine
* This implementation allows for multiple keys to be set.
* This will allow us to skip validation on certain mappings.
*/
public class LaserActionMapping extends ActionMapping {
//map of parameters to ignore
private List ignore;
/**
* Constructor for LaserActionMapping.
*/
public LaserActionMapping() {
super();
ignore = new ArrayList();
}
/**
* @param map
*/
public void setIgnore(String value) {
ignore.add(value);
}
/**
* @return A list of keys to ignore
*/
public List getIgnore() {
return ignore;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org