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?

Thanks,
Mike.

 -------------------------------------------------------------
Mike Baranski
O: 919 788 9200
F: 919 510 0037
M: 919 395 0620

m...@secmgmt.com

CVI Authorized User Number: CVI-20080925-1020950
-------------------------------------------------------------

Warning: The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the original sender
immediately by replying to this message and then delete it from your
computer. All e-mail sent to this address will be received by the SMC
corporate e-mail system and are subject to archiving and review by someone
other than the recipient.




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

Reply via email to