Hi Mike,

I can't quite figure out what you're doing wrong. Don't know what you mean exactly about the "iterator value" - but I guess the problem lies with the config for your type conversions.

Do you have an xwork-conversions or an action-conversion.properties? That's where you tell the xwork engine which converter to use for that class and setter.

Mike Baranski on 04/02/09 16:28, wrote:
Here's my delima:

I have an interface to represent a Door, called IDoor
I have an interface to represent a DoorProvider, called IDoorProvider.

I use Spring to inject the DoorProvider implementation for the particular
application to get lists of doors.

I have an UnlockDoorAction that will unlock an IDoor implementing Door (that
comes from a provider)

Here is my UnlockDoorAction code that is relevant:

        public String execute() throws Exception
        {
            this.getDoor().unlockDoor(-1);
            return SUCCESS;
        }

     public IDoor getDoor()
        {
            return this.door;
        }

     public void setDoor(IDoor cd)
        {
            this.door = cd;
        }

Here is the JSP code that causes this action to be executed:

<s:url var="unlock_url" action="unlock" namespace="/door_control"><s:param
name="door" value="[0]"/></s:url>
<s:a href="%{unlock_url}"><center><img alt="Locked" src="<s:url
value="/images/locked.png"/>" border="none"/></center></s:a>

Now, the value="[0]" is an iterator value of an object that implements the
IDoor interface.

The Action returns "input", which (I think) is because it can't figure out
how to set the parameter on the UnlockDoorAction.  How do I make the thing
recognize that setDoor(IDoor cd) will take that parameter?


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

Reply via email to