Carfield Yim a écrit :

>On 11/14/06, Carfield Yim <[EMAIL PROTECTED]> wrote:
>  
>
>[snip]
>
>However, if I like to display a link, I will not work if I just add a
>BookmarkableLink like
>
>
>    private static class OrderIdColumn extends AbstractColumn {
>        public OrderIdColumn() {
>            super(new Model("OrderId"), "OrderId");
>        }
>
>        private static final long serialVersionUID = 1L;
>
>        public void populateItem(Item cellItem, String componentId,
>IModel model) {
>            final Order order = (Order) model.getObject(cellItem);
>            final Map<String, String> map = new HashMap<String, String>();
>            map.put("orderid", order.getOrderId().toString());
>            cellItem.add(new BookmarkablePageLink(componentId,
>Edit.class, new PageParameters(map)));
>        }
>    }
>
>It just display a text call "[cell]". How can I solve this?
>  
>
How customize your cell table :
You may create a panel which contains only your link :
<wicket:panel>
    <a wicket:id="mylink"><span wicket:id="mytext"></span<</a>
</wicket:panel>

and in the populateItem:
MyPanel panel = new MyPanel(componentId);
cellItem.add(panel);

And in your panel constructor
MyPanel()
{
    add(new BookmarkablePageLink(componentId, Edit.class, new 
PageParameters(map)));
    add(new Label("mytext", "click here"));
}

If you wich to add several types of content in your cell (a link, an 
image, a blob, a form, ...), or if you wich to select a row and make 
actions, it may more interresting to use a ListView.

-- 
Robert JACOLIN
M2M
ANYWARE TECHNOLOGIES
Tél : +33 (0)5.61.00.06.56
Fax : +33 (0)5 61 00 51 46
www.anyware-tech.com


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to