params to action to populate list after validation

MartyH <[email protected]> Tue, 12 Dec 2006 13:51:52 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <27593973.1165953159621.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Ho folks,

I have a page that has two select boxes... the second being dependant on the first.
So to make this work i do something like this:

[code]
            <@ww.action name="listCompanies" id="allCompanies" />
            <@ww.select name="companyID" 
                        list="%{#allCompanies.companies}" 
                        listKey="companyID" 
                        listValue="companyName"
                        tabindex="1"
                        emptyOption="true" 
                        onchange="updateProjects()"/>
            <div id="projectsSelect">
              <@ww.action name="listProjects" id="allProjects" >
            	 <@ww.param name="companyID" value="%{#companyID}"/> 
              </@ww.action>
            
            <@ww.select name="projectID" 
                        list="%{#allProjects.projects}" 
                        listKey="projectID" 
                        listValue="projectName"
                        emptyOption="true"
                        tabindex="2" />   
            </div>
[/code]

so on changing the first the second updates.

But on validation failure and returning 'input', both actions get called... but I can't seem to get the 'companyID' param back into the action that gets called for this... I'm sure its something stupid that I'm missing here ( i have getters/setters for the action) but I can't see it.

Can another pair of eyes have a look?

thanks :-)

Marty
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=53225&messageID=107039#107039

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]