Thanks for the information. However, I was looking for something along the lines of

                 protected void populateItem(final ListItem item) {
final PickDetail pickDet = (PickDetail)item.getModelObject();
                     *item.addAllBeanProperties(pickDet);*
                 }

I also looked up the javadocs on and theres some information there I don't know how to apply

protected IModel <cid:[email protected]> *getListItemModel*(IModel <cid:[email protected]> listViewModel, int index) "ListItemModel implementation should use an id (e.g. the database' record id) to identify and load the list item model object."

what id is it talking about ?

thanks

Huy

Martijn Dashorst wrote:

      add(new ListView("rows", Arrays.asList(pick.getPickDetails()))
              {
       protected IModel getListItemModel(IModel arg0, int arg1) {
return new CompoundPropertyModel(super.getListItemModel(arg0, arg1));
       }
                  protected void populateItem(final ListItem item) {
final PickDetail pickDet = (PickDetail)item.getModelObject();
                      item.add(new Label("numberOfItems"));
                      item.add(new Label("batchCode"));
                  }
              });

Rename the ID of the first label. See the documentation on CompoundPropertyModel for more information.

Martijn

Huy Do wrote:

Hi,

Please see code below in relation to my question

       add(new ListView("rows", Arrays.asList(pick.getPickDetails()))
               {
                   protected void populateItem(final ListItem item) {
final PickDetail pickDet = (PickDetail)item.getModelObject(); item.add(new Label("items", pickDet.getNumberOfItems().toString())); item.add(new Label("batchCode", pickDet.getBatchCode()));
                   }
               });

Is there some sort of shortcut for the list view to use java bean properties which can then be accessed in the html as <span wicket:id="bean.getProperty()">blah</span> this would simplify things alot without the verbose Label code.

Of course the existing method is still useful when you need more control but most of the time, it just adds additional code which I really don't want to write :-)

Regards,

Huy


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to