Lookup Dispatch Action not working
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhay_Singh
Posted On:   Tuesday, January 17, 2006 06:50 PM

Hi, For one of the methods my lookupdispatch action doesnt work. Struts-config.xml ------------------- name="stopPaymentsDisplayForm" path="/secured/stoppayments/stopPaymentRemove" scope="request" type="com.scotiabank.sco.web.actions.stoppayments.StopPaymentsRemoveAction" validate="true" parameter="submit"> Action -------- protected Map getKeyMethodMap() { System.out.println("-===============StopPaymentsRemoveAction=============="); Map map = new HashMap(); map.put("button.remo   More>>

Hi,

For one of the methods my lookupdispatch action doesnt work.



Struts-config.xml
-------------------




name="stopPaymentsDisplayForm"
path="/secured/stoppayments/stopPaymentRemove"
scope="request"
type="com.scotiabank.sco.web.actions.stoppayments.StopPaymentsRemoveAction"
validate="true"
parameter="submit">








Action
--------



protected Map getKeyMethodMap() {
System.out.println("-===============StopPaymentsRemoveAction==============");
Map map = new HashMap();
map.put("button.remove", "remove");
map.put("button.select", "select");

return map;
}



and remove method




In Jsp
-------
















Similar stuff works for other method but for this one it doesnt work.




[17/01/06 18:28:29:031 EST] 49d6f896 DispatchActio E org.apache.struts.actions.DispatchAction Request[/secured/stoppayments/stopPaymentRemove] does not contain handler parameter named submit



Any help would be appreciated.

   <<Less

Re: Lookup Dispatch Action not working

Posted By:   Anonymous  
Posted On:   Tuesday, January 17, 2006 11:39 PM

hi Good Morning,


The above specified error will come in these situations.


1. If the Keys in hashmap are not present in applicationresoures.properies file.


2. If the property used as 'parameter' in struts-config.xml file is not present in the form bean.


3. If the property used is present in form bean and the value u are giving is not setting to the property.


4. If there is no method in lookupdispatchaction class as specified in hashmap of getKeyMethodMap().


We will use the LookupDispatchAction like this:


1. Action in config.xml same as u written.


2. Code written in getKeyMethodMap() same as u written.


3. But we will set the value to the property which is specified in config.xml file as parameter as follows -







In javascript function:


document.getElementsByName("submit")[0].value = remove (value for the button.remove as specified in .properties file)


regards,
kalyan

About | Sitemap | Contact