Re: Dynamic datatable columns (sequel)

2017-03-20 Thread James Selvakumar
Thanks Sven. That was very clear. On Fri, Mar 17, 2017 at 3:34 PM, Sven Meier wrote: > Hi, > > you can just pass an empty collection of columns to dataTable: > > private List> columns = new ArrayList<>(); > > public DataTablePage() { >

Re: Dynamic datatable columns (sequel)

2017-03-17 Thread Sven Meier
Hi, you can just pass an empty collection of columns to dataTable: private List> columns = new ArrayList<>(); public DataTablePage() { DataTable dataTable = new DefaultDataTable<>("table", columns, dataProvider, 8); add();

Re: Dynamic datatable columns (sequel)

2017-03-17 Thread James Selvakumar
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 wrote: > Hi Sven, > > Thanks for the info. Will try that out. > > On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier

Re: Dynamic datatable columns (sequel)

2017-03-16 Thread James Selvakumar
Hi Sven, Thanks for the info. Will try that out. On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier 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 >

Re: Dynamic datatable columns (sequel)

2017-03-16 Thread Sven Meier
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

Re: dynamic DataTable

2011-08-07 Thread Clint Checketts
Sorry for taking 2 weeks. Here is a quick and dirty implementation: https://github.com/checketts/wicket-datasource-table It needs a bit of cleanup. 2 points that I like to note is 1) the use of a datasource instead of a java.sql.Connection will allow automatically opening and closing connections

Re: dynamic DataTable

2011-07-23 Thread davut uysal
Hi Bertrand, What is SQLResultRow, is it a Wicket Type? Or should I create a custom class named SQLResultRow? The problem is, I can't create a custom SQLResultRow because I can't be sure of its member fields. User can run any SQL, so the type must be compatible with any result. For example: 1)

Re: dynamic DataTable

2011-07-23 Thread Bertrand Guay-Paquet
Hi, SQLResultRow is a type I made up. I didn't know what type you received from your SQL query, so I used that. I assumed that your result set is composed of rows where each row can be used as a map with key=column name and value=column value. With that in hand, you could iterate over the

Re: dynamic DataTable

2011-07-23 Thread davut uysal
Thanks for the tip Bertrand, I understand SQLResultRow better now. I will try that Regards, On Saturday, 23 July 2011, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, SQLResultRow is a type I made up. I didn't know what type you received from your SQL query, so I used that. I assumed

Re: dynamic DataTable

2011-07-22 Thread davut uysal
Someone in another forum advised me this: *** Maybe in latest Wicket something changed but in 1.4.16 you can't change Columns in DataTable. So it's immutable in some sense. But you may replace whole DataTable component instead when your sql statement changes: form.add(new Button(sqlSubmit) {

Re: dynamic DataTable

2011-07-22 Thread Bertrand Guay-Paquet
Hi, Here is the outline of a possible implementation : Execute SQL String Create a ListIColumnSQLResultRow for each SQL result column: add a column to the list that displays one column of a SQLResultRow Create a very simple ISortableDataProvider that returns the SQL result from above

RE: dynamic DataTable

2011-07-21 Thread Wilhelmsen Tor Iver
Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using

Re: dynamic DataTable

2011-07-21 Thread Lurtz Nazgul
Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count

Re: dynamic DataTable

2011-07-21 Thread davut uysal
simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count

Re: dynamic DataTable

2011-07-21 Thread Martin Grigorov
or not :) On 21 July 2011 15:18, Lurtz Nazgul lu...@ymail.com wrote: Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable

Re: dynamic DataTable

2011-07-21 Thread Josh Kamau
wickets AjaxFallbackDefaultDatatable is my favourite component. Josh On 21 Jul 2011 17:23, Martin Grigorov mgrigo...@apache.org wrote: Am I that old or .NET is younger than 10 years ? First tell me what is so complex with wicket-extensions DataTable and I'll tell you how to do it ;-) You

Re: dynamic DataTable

2011-07-21 Thread davut uysal
21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing

Re: dynamic DataTable

2011-07-21 Thread Andrew Fielden
Hi again Davut :) Are you asking this question in every possible forum in the hope of getting a different answer? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/dynamic-DataTable-tp3683514p3683930.html Sent from the Users forum mailing list archive at Nabble.com.

Re: dynamic DataTable

2011-07-21 Thread davut uysal
Yes Andrew, until I find a real simple solution :) I am currently migrating a Struts project to Wicket. And this is the only issue I have. I hate doing things in a long way, there must be a simple solution. Btw: nice to see you here too after stackoverflow and linkedin :) On Jul 21, 2011 6:05

Re: dynamic DataTable

2011-07-21 Thread Andrew Fielden
I see your problem Davut, but I really don't think Wicket can solve it in the way you want it to. As Martin said, you need an entity to populate the models used by the various Wicket components. Could you somehow parse the SQL statement to extract the table name, and find its meta data? -- View

Re: Dynamic DataTable columns, paging by columns

2008-05-02 Thread liza6218
I see, thank you for the reply. - Liza igor.vaynberg wrote: you will have to roll your own component. i would take a look at how datatable works: it is basically a repeater (for columns) inside another repeater(for rows) -igor On Thu, Apr 17, 2008 at 9:36 AM, liza6218 [EMAIL

Re: Dynamic DataTable columns, paging by columns

2008-04-17 Thread Igor Vaynberg
you will have to roll your own component. i would take a look at how datatable works: it is basically a repeater (for columns) inside another repeater(for rows) -igor On Thu, Apr 17, 2008 at 9:36 AM, liza6218 [EMAIL PROTECTED] wrote: Hi, I have to show a table where the number of columns

RE: Dynamic DataTable columns

2008-01-29 Thread UPBrandon
, January 28, 2008 10:26 PM To: users@wicket.apache.org Subject: Re: Dynamic DataTable columns On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still have the same problem - not being able to change change the columns after the DataTable has been declared, at render time. Any

RE: Dynamic DataTable columns

2008-01-29 Thread Clay Lehman
To: users@wicket.apache.org Subject: Re: Dynamic DataTable columns On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still have the same problem - not being able to change change the columns after the DataTable has been declared, at render time. Any suggestions? Roll your own

Re: Dynamic DataTable columns

2008-01-29 Thread Igor Vaynberg
the container holding the Table? -Clay -Original Message- From: Timo Rantalaiho [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 10:26 PM To: users@wicket.apache.org Subject: Re: Dynamic DataTable columns On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still

Re: Dynamic DataTable columns

2008-01-29 Thread Igor Vaynberg
:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 10:26 PM To: users@wicket.apache.org Subject: Re: Dynamic DataTable columns On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still have the same problem - not being able to change change the columns after

Re: Dynamic DataTable columns

2008-01-28 Thread Igor Vaynberg
are you sure that will help you? does datatable refresh the component hierarchy that defines the toolbars on every requests? -igor On Jan 28, 2008 11:32 AM, UPBrandon [EMAIL PROTECTED] wrote: Is there any chance simply removing the final modifier could make it into a 1.3.1 type of release?

Re: Dynamic DataTable columns

2008-01-28 Thread UPBrandon
Hmm... looking at the code a bit, I don't think making getColumns() non-final it will help after all. I assumed that getColumns() was used internally by DataTable but it doesn't appear to be. What would really be nice is if DataTable took a List (or a model wrapping a list) instead of an

Re: Dynamic DataTable columns

2008-01-28 Thread UPBrandon
Is there any chance simply removing the final modifier could make it into a 1.3.1 type of release? igor.vaynberg wrote: you will have to roll your own for now. we might fix this in 1.4 if you add this to the wiki wishlist for 1.4 page. -igor I was wondering if there is any way to

Re: Dynamic DataTable columns

2008-01-28 Thread Igor Vaynberg
you will have to roll your own for now. we might fix this in 1.4 if you add this to the wiki wishlist for 1.4 page. -igor On Jan 28, 2008 11:01 AM, UPBrandon [EMAIL PROTECTED] wrote: I was wondering if there is any way to change the columns of a DataTable once it has been declared. On my

Re: Dynamic DataTable columns

2008-01-28 Thread Timo Rantalaiho
On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still have the same problem - not being able to change change the columns after the DataTable has been declared, at render time. Any suggestions? Roll your own using DataView. You can take ideas from DataTable but I doubt