Re: DataTable adding one more div/span based on dynamic conditions
Hi, The question is not clear to me. I don't see how/where you want to use the fragment. And I don't understand what is the problem with it. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Aug 17, 2014 at 8:28 AM, dharmendra pandey dharmendra.pan...@gmail.com wrote: Hi, I am using the DataTable to render the data in tabular format and overridden the populateItem method to insert the span in case of particular scenario as mentioned below.. I have done the below way but think can be done in better ways.. earlier I have used the Fragment and was unable to add a div/span Could you please suggest... -- @Override public void populateItem(ItemICellPopulatorlt;LabTestData item, String componentId, IModelLabTestData rowModel) { if (colourName.equals(getPropertyExpression())) { item.add(new Label(componentId, nbsp;nbsp;nbsp; nbsp; + rowModel.getObject().getColourName()).setEscapeModelStrings(false)); item.add(new AttributeModifier(title, new ModelString(rowModel.getObject().getColourName(; } else { item.add(new Label(componentId, getDataModel(rowModel))); } } --- private class ColorPanelFragment extends Fragment { private static final long serialVersionUID = 1L; public ColorPanelFragment(String id, String markupId, MarkupContainer markupProvider) { super(id, markupId, markupProvider); } } --- Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-adding-one-more-div-span-based-on-dynamic-conditions-tp4667064.html Sent from the Users forum 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
Re: DataTable adding one more div/span based on dynamic conditions
Hi Martin, My question is simple. I have used DataTable to render data in table formats. I want to add one more extra Label (total 2 labels)in a cell.. More than one label/component wicket framework DataTable is not allowing(As I see only on div with id cell). Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-adding-one-more-div-span-based-on-dynamic-conditions-tp4667064p4667095.html Sent from the Users forum 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
Re: DataTable adding one more div/span based on dynamic conditions
Hi, Use a Panel for the cell and put as many children components inside your panel as you need. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Aug 18, 2014 at 3:34 PM, dharmendra pandey dharmendra.pan...@gmail.com wrote: Hi Martin, My question is simple. I have used DataTable to render data in table formats. I want to add one more extra Label (total 2 labels)in a cell.. More than one label/component wicket framework DataTable is not allowing(As I see only on div with id cell). Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-adding-one-more-div-span-based-on-dynamic-conditions-tp4667064p4667095.html Sent from the Users forum 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
Re: DataTable adding one more div/span based on dynamic conditions
Thanks Martin.. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-adding-one-more-div-span-based-on-dynamic-conditions-tp4667064p4667097.html Sent from the Users forum 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
DataTable adding one more div/span based on dynamic conditions
Hi, I am using the DataTable to render the data in tabular format and overridden the populateItem method to insert the span in case of particular scenario as mentioned below.. I have done the below way but think can be done in better ways.. earlier I have used the Fragment and was unable to add a div/span Could you please suggest... -- @Override public void populateItem(ItemICellPopulatorlt;LabTestData item, String componentId, IModelLabTestData rowModel) { if (colourName.equals(getPropertyExpression())) { item.add(new Label(componentId, nbsp;nbsp;nbsp; nbsp; + rowModel.getObject().getColourName()).setEscapeModelStrings(false)); item.add(new AttributeModifier(title, new ModelString(rowModel.getObject().getColourName(; } else { item.add(new Label(componentId, getDataModel(rowModel))); } } --- private class ColorPanelFragment extends Fragment { private static final long serialVersionUID = 1L; public ColorPanelFragment(String id, String markupId, MarkupContainer markupProvider) { super(id, markupId, markupProvider); } } --- Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-adding-one-more-div-span-based-on-dynamic-conditions-tp4667064.html Sent from the Users forum 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