Hi Bob,

Any thoughts about changing things so that all controls were rendered from
velocity templates? Doing so would allow users to make global changes
without the need to subclass controls and keep their API somewhat smaller.
 Even when subclasses are needed it could just be a matter of overriding a
getTemplate() method or similar.

Thanks
Scott


On 6 July 2013 19:25, Bob Schellink <[email protected]> wrote:

>  Hi,
>
> You probably want to override the LinkDecorator#renderActionLinks method
> to customize your button style:
>
>
> http://click.apache.org/docs/extras-api/org/apache/click/extras/control/LinkDecorator.html
>
> There is a demo in the javadoc above as well.
>
> regards
>
> Bob
>
>
>
>
> On 2013/07/05 23:37, Kristian Lind wrote:
>
> Hi, I am using a table to show a list of items.
>
>  The item in the list is a order request.
>
>  *orderRequestItemsTable = new Table("orderRequestItemsTable");*
> *orderRequestItemsTable.setClass(Table.CLASS_ISI);*
> *orderRequestItemsTable.setPageSize(Constants.MAX_PAGE_SIZE);*
> *orderRequestItemsTable.setSortable(false);*
> *orderRequestItemsTable.addStyleClass("dash_table");*
> *.....*
> *orderRequestItemsTable.addColumn(createTableColumn("receivedDate",
> "Received Time Stamp", "20%", "left", null));
> *
> *
> *
>  *final PageLink linkToOrder = new PageLink("", "View ", viewer);*
> *linkToOrder.addStyleClass("btn_small btn-primary");*
> *
> *
> *orderRequestItemsTable.addColumn(createTableColumn("Order", "Order",
> "10%", "left",*
> *         new LinkDecorator(orderRequestItemsTable, new
> AbstractLink[]{linkToOrder}, "order.id", "order")));*
> *       *
> *addControl(orderRequestItemsTable);*
>
>
>  The order request object has a boolean variable, and if the value is
> true i want to show a blue button, else a green button.
> In the code above only a blue button is shown... 
> *linkToOrder.addStyleClass("btn_small
> btn-primary");*
>
>  Thanks....
>
>
>  --
> Best regards
>
> Kris
>
>
>

Reply via email to