You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leena Borle <ls...@gmail.com> on 2008/12/08 21:54:47 UTC

problem with s:inputtransferselect

Hi,
  I am having problem with the tag "s:inputtransferselect". All I have is a
list defined inside a bean. This bean is used by action to add/edit the
values. I see all the values except values of this tag does not get
reflected back to the action. Am I missing something in this tag ?
  My Jsp code is,
            <s:inputtransferselect list="user.shoes"  theme="ajax"
labelposition="left">
Variable "user" and it's getter/setter are defined in my action. Variable
"shoes" is an ArrayList declared and defined in user object.


I would appreciate help with this.
Thanks
Leena

Re: problem with s:inputtransferselect

Posted by Dave Newton <ne...@yahoo.com>.
> It is of type "ArrayList".

Er... of what type? What's *in* the list?

> It does renders fine.

Are the form values from the inputtransferselect being submitted? You can verify this by using a tool like Firebug or similar.

Does the *rendered* select element have a "name" attribute? Without a "name" or "key" attribute in the <s:inputtransferselect...> tag I just don't think it'll work--the name or key is what names the action property that will be set with the values in the list. It may be different in S2.0; I don't have the means to test that quickly. Without it in S2.1 it will fail.

It may also use the Dojo stuff (not sure about S2.0, I know it does in S2.1)--are you using the <s:head...> tag?

Dave


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


Re: problem with s:inputtransferselect

Posted by Leena Borle <ls...@gmail.com>.
Hi,
 It is of type "ArrayList". It does renders fine.
Leena

> Without a "key" or "name" attribute, from the way all the other tags work,
> I wouldn't expect it to work right. If you're saying the select box is being
> rendered properly with a name (and you've verified the form values are being
> sent in the request) then I'd want to know the type of the "shoes"
> collection to know if it's a type conversion issue.



>
>
>

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

Re: problem with s:inputtransferselect

Posted by Dave Newton <ne...@yahoo.com>.
--- On Mon, 12/8/08, Leena Borle wrote:
>  No, I do mean "inputtransferselect". [...]

Oh, weird; I'll try to add that to the documentation this week.

> I'm not using name field because I have these keys defined in
> package.properties file from which it picks up name and
> lable which should match with the name in the beans.

I don't see anything in the API doc that would lead me to think the list value is anything other than the populating list.

Without a "key" or "name" attribute, from the way all the other tags work, I wouldn't expect it to work right. If you're saying the select box is being rendered properly with a name (and you've verified the form values are being sent in the request) then I'd want to know the type of the "shoes" collection to know if it's a type conversion issue.

Dave


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


Re: problem with s:inputtransferselect

Posted by Leena Borle <ls...@gmail.com>.
Hi Dave,
  No, I do mean "inputtransferselect". It is the tag with textfield and a
list. Values that you enter in the text field appear in the list. They have
shown in Struts2 Showcase UI tag examples. I don't know why its not listed
in "Tag reference Guide". (
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/components/InputTransferSelect.html
)

      I'm not using name field because I have these keys defined in
package.properties file from which it picks up name and lable which should
match with the name in the beans.

  e.g.
User user
user.shoes=Shoes      (User is valriable in action, shoes is variable in
User object).
Leena

On Mon, Dec 8, 2008 at 1:14 PM, Dave Newton <ne...@yahoo.com> wrote:

> You mean optiontransferselect, right?
>
> Don't you need a "name" attribute or something? I thought the "list"
> attribute was what populated the control.
>
> Dave
>
>
> --- On Mon, 12/8/08, Leena Borle <ls...@gmail.com> wrote:
>
> > From: Leena Borle <ls...@gmail.com>
> > Subject: problem with s:inputtransferselect
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Date: Monday, December 8, 2008, 3:54 PM
> > Hi,
> >   I am having problem with the tag
> > "s:inputtransferselect". All I have is a
> > list defined inside a bean. This bean is used by action to
> > add/edit the
> > values. I see all the values except values of this tag does
> > not get
> > reflected back to the action. Am I missing something in
> > this tag ?
> >   My Jsp code is,
> >             <s:inputtransferselect
> > list="user.shoes"  theme="ajax"
> > labelposition="left">
> > Variable "user" and it's getter/setter are
> > defined in my action. Variable
> > "shoes" is an ArrayList declared and defined in
> > user object.
> >
> >
> > I would appreciate help with this.
> > Thanks
> > Leena
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: problem with s:inputtransferselect

Posted by Dave Newton <ne...@yahoo.com>.
You mean optiontransferselect, right?

Don't you need a "name" attribute or something? I thought the "list" attribute was what populated the control.

Dave


--- On Mon, 12/8/08, Leena Borle <ls...@gmail.com> wrote:

> From: Leena Borle <ls...@gmail.com>
> Subject: problem with s:inputtransferselect
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Monday, December 8, 2008, 3:54 PM
> Hi,
>   I am having problem with the tag
> "s:inputtransferselect". All I have is a
> list defined inside a bean. This bean is used by action to
> add/edit the
> values. I see all the values except values of this tag does
> not get
> reflected back to the action. Am I missing something in
> this tag ?
>   My Jsp code is,
>             <s:inputtransferselect
> list="user.shoes"  theme="ajax"
> labelposition="left">
> Variable "user" and it's getter/setter are
> defined in my action. Variable
> "shoes" is an ArrayList declared and defined in
> user object.
> 
> 
> I would appreciate help with this.
> Thanks
> Leena

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