take a look at Wicket Examples -> FormInput

Dipu

On Tue, Jan 20, 2009 at 1:53 PM, itayke <exalink...@yahoo.com> wrote:
>
> Hi,
>
> I have this problem with my dropdownchoice with results in
> WicketMessage: No get method defined for class: class
> screens.CustomerFilters$FormInput expression: devices
>
> were the java class has:
>
>        public CustomerFilters(){
>                super();
>                FormInput formInput = new FormInput("Form");
>                setModel(new CompoundPropertyModel(formInput));
>                add(formInput);
>                           ......
>
>             }
>
>
> and the form class:
>
>        public class FormInput extends Form{
>
>                String deviceID;
>
>                public FormInput(String id) {
>                        super(id);
>
>                        DropDownChoice ddc =
>                                new DropDownChoice("devices",
>                                                getDevicesList(), //this will 
> return a list of Device POJOs
>                                                new IChoiceRenderer() {
>                                        public Object getDisplayValue(Object 
> object) {
>                                                return 
> ((Device)object).getDeviceName();
>                                        }
>                                        public String getIdValue(Object 
> object, int index) {
>                                                return 
> ((Device)object).getDeviceID();
>                                        }
>                                });
>
>                        add(ddc);
>                }
>
> I also have a simple "Device" POJO class with getters and setters.
> The HTML looks like that:
>
> ...
> <form wicket:id="Form">
> <table>
> <tr>
>    <th>Select Device</th>
>    <td><select wicket:id="devices">
>        <option>Some device</option>
>        </select>
>    </td>
> </tr>
> <tr><td colspan="2"><input type="submit" value="submit"/></td></tr>
> </table>
> </form>
>
> ...
>
>
>
> Any ideas what i'm doing wrong?
>
> --
> View this message in context: 
> http://www.nabble.com/problem-with-dropdownchoice-tp21563513p21563513.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

Reply via email to