Thanks Sven. That was very clear.

On Fri, Mar 17, 2017 at 3:34 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> you can just pass an empty collection of columns to dataTable:
>
>     private List<IColumn<Contact, String>> columns = new ArrayList<>();
>
>     public DataTablePage() {
>         DataTable<Contact, String> dataTable = new
> DefaultDataTable<>("table", columns, dataProvider, 8);
>         add(....);
>     }
>
>     protected void onConfigure()
>     {
>         // modify columns as needed
>         columns.clear();
>         if (...) {
>             columns.add(...);
>         }
>     }
>
> In #onConfigure() you adjust the columns as needed for each rendering -
> that's all.
>
> Sven
>
>
>
> On 17.03.2017 08:20, James Selvakumar wrote:
>
>> Hi Sven,
>>
>> I'm a bit clueless about this.
>> Could you share a little code example to help me? Thanks.
>>
>>
>> On Thu, Mar 16, 2017 at 5:03 PM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> Hi Sven,
>>>
>>> Thanks for the info. Will try that out.
>>>
>>> On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier <s...@meiers.net> wrote:
>>>
>>> Hi,
>>>>
>>>> you can just change the columns list (e.g. in #onConfigure) and
>>>> everything will work fine:
>>>>
>>>>    https://issues.apache.org/jira/browse/WICKET-4596
>>>>
>>>> Have fun
>>>> Sven
>>>>
>>>>
>>>> On 16.03.2017 04:34, James Selvakumar wrote:
>>>>
>>>> Hi all,
>>>>>
>>>>> I want to render a datatable with dynamically different columns based
>>>>> on
>>>>> user input (via a DropDownChoice) over ajax.
>>>>> I came across this old post
>>>>> <http://apache-wicket.1842946.n4.nabble.com/Dynamic-DataTabl
>>>>> e-columns-td1856733.html>
>>>>> which mentions that this feature might be available in Wicket 1.4.
>>>>> Is this feature available in Wicket now?
>>>>> Can someone explain me how to achieve this?
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>>
>>> --
>>> Thanks & regards
>>> James
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James

Reply via email to