struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guilherme Barile <...@prosoma.com.br>
Subject LookupDispatchAction
Date Tue, 03 Feb 2004 12:07:21 GMT
Hi
	I have the following DispatchAction working here

public MyDispatchAction extends DispatchAction {
	public unspecified(...) {
		read_data_from_database();
		populate_form();
		return(mapping.findForward("renderForm");
	}
}

renderForm renders the form (I don't access the jsp directly, just the
action, this way it calls unspecified, which reads data from a database
and populates the form).
I tried converting this to a LookupDispatchAction, making
MyDispatchAction extend LookupDispatchAction and adding

protected Map getKeyMethodMap() {
        Map map = new HashMap();
        map.put("button.save", "save");
        return map;
}

To the code ... the parameter is called "action" it exists on
struts-config, the message "button.save" exists on
ApplicationResources.properties but everytime I run it, I get the error
Request[/myform] does not contain handler parameter named action

I *guess* it happens because the first time I accessed this form no
buttons were pressed, so "action" really doesn't exist (yet) ... problem
is this must happen this way, otherwise I won't be able to read data
from the database to populate the form.

With an ordinary DispatchAction it works fine, but I can't localize my
buttons. Any ideas ?

Thanks in advance

gui


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


Mime
View raw message