Re: [Struts 2] Simple combobox behaviour

2008-05-19 Thread Laurie Harper
The name attribute can reference an object-typed property, but Struts needs to know how to convert a string (which is all that HTTP can transmit) into that type. That's where type conversion comes in: http://struts.apache.org/2.0.11.1/docs/type-conversion.html L. Milan Milanovic wrote: No on

Re: [Struts 2] Simple combobox behaviour

2008-05-19 Thread Milan Milanovic
No one can help ?! It seems for me that wrote: I hope that someone can answer this simple question. If I have object Person buyer; in my Fruit class (with get/set methods), and I have fruit object in my action class, where I also have List allBuyers in my action class. How can I define c

Re: [Struts 2] Simple combobox behaviour

2008-05-16 Thread Milan Milanovic
I hope that someone can answer this simple question. If I have object Person buyer; in my Fruit class (with get/set methods), and I have fruit object in my action class, where I also have ListallBuyers in my action class. How can I define combo box so that when buyer is selected, that Person o

Re: [Struts 2] Simple combobox behaviour

2008-05-16 Thread Milan Milanovic
It is wierd that it generated for tag in my jsp page textbox and combobox too ? -- Thx, Milan Milan Milanovic <[EMAIL PROTECTED]> wrote: I fixed my first problem, it was naming issue. But I still have this question: If I have object Person buyer; in my Fruit class (with get/set method

Re: [Struts 2] Simple combobox behaviour

2008-05-16 Thread Milan Milanovic
I fixed my first problem, it was naming issue. But I still have this question: If I have object Person buyer; in my Fruit class (with get/set methods), and I have Fruit fruit object in my action class, where I also have ListallBuyers in my action class. How can I define combo box so that w

Re: [Struts 2] Simple combobox behaviour

2008-05-16 Thread Milan Milanovic
I'm just not sure when I put listValue = "name" and listKey="id" I get and emtpy combo box with exactly 4 places (it have value option good) ? One more thing, if I have object Person buyer; in my Fruit class (with get/set methods), and I have Fruit fruit object in my action class, where I also

Re: [Struts 2] Simple combobox behaviour

2008-05-15 Thread Milan Milanovic
I'm just not sure when I put listValue = "name" and listKey="id" I get and emtpy combo box with exactly 4 places (it have value option good) ? One more thing, if I have object Person buyer; in my Fruit class (with get/set methods), and I have Fruit fruit object in my action class, where I also h

Re: [Struts 2] Simple combobox behaviour

2008-05-15 Thread Milan Milanovic
When I removed listKey then it works good. But I now have the same problem with my datetimepicker field. I have "date" attrib (of type java.util.Date with get/set methods) in my Fruit class. I have defined it in jsp like this: ? -- Thx, Milan Felipe Lorenz <[EMAIL PROTECTED]> wrote: Ok.. if

Re: [Struts 2] Simple combobox behaviour

2008-05-15 Thread Felipe Lorenz
Ok.. if i get your idea... the list yout want to put in combobox is fruit.buyers, hu? Then, try it: if you have the object fruit, then: maybe the name is not correct. Try chage the attr name to person, for example. On Thu, May 15, 2008 at 6:05 PM, Milan Milanovic <[EMAIL PROTECTED]> wro

Re: [Struts 2] Simple combobox behaviour

2008-05-15 Thread Milan Milanovic
When I set listKey="fruit.buyers.id", I get a empty combo box, but with correct number of emtpy spaces (in my case 4) ? -- Thanks, Milan Felipe Lorenz <[EMAIL PROTECTED]> wrote: You need eht attribute "listKey" where you'll put the Person id!!! see: http://struts.apache.org/2.x/struts2-core/ap

Re: [Struts 2] Simple combobox behaviour

2008-05-15 Thread Felipe Lorenz
You need eht attribute "listKey" where you'll put the Person id!!! see: http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Select.html On Thu, May 15, 2008 at 5:19 PM, Milan Milanovic <[EMAIL PROTECTED]> wrote: > Hi, > > I have simple class Fruit, that have "id" (lon

[Struts 2] Simple combobox behaviour

2008-05-15 Thread Milan Milanovic
Hi, I have simple class Fruit, that have "id" (long), "name" (String), and "buyers" List of . In my action class I have Fruit fruit; object with get/set methods. In my jsp I have combo box defined like this: and when I sumbit form that contain this combo box, it generates following error: