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 *need* to extract the DB meta data if you want the dynamics.
Wicket is web framework, not common data extraction framework.
Once you have the column names then you can create the
List<IColumn<Entity>> and IDataProvider<Entity> needed by DataTable.
>From there on Wicket will create the table for you.

So if you do the "easy" part to extract the columns meta data then
give it to me and I'll do the "hard" part to dress it in a DataTable
;-)

On Thu, Jul 21, 2011 at 5:08 PM, davut uysal <[email protected]> wrote:
> Yeah, I agree there must be some easier way. I hope the Wicket gurus and
> fanboys here can show the simple way and save the Wicket's title and pride -
> easiest framework ever :)
>
> I remember, even the Struts 1 framework had a component named "DisplayTag"
> that can be easily bind to dynamic datasets or resultsets. So Struts 1
> DisplayTag component can show any data in a Table format without needing to
> know the result of the SELECT SQL Queries. It can show the results of any
> SQL simply without coding any nested repeater to loop for headers and rows..
>
> I also remember, even 10 years ago it was very easy to do this kind of
> dynamic things in .NET. .NET has GridView component which can also be bind
> easily to any dataset simply, just simple as below:
>
>            DataSet ds = new DataSet();
>            OracleConnection conn = new
> OracleConnection(strConnectionString);
>            OracleDataAdapter adap = new OracleDataAdapter(txtSql.Text,
> conn);
>
>            conn.Open();
>            adap.Fill(ds);
>
>            GridView1.DataSource = ds;
>            GridView1.DataBind();
>
> So tell me if Wicket framework is that simple or not :)
>
>
> On 21 July 2011 15:18, Lurtz Nazgul <[email protected]> wrote:
>
>> Any simple way ?
>>
>> Thanks.
>>
>>
>>
>> ________________________________
>> From: Wilhelmsen Tor Iver <[email protected]>
>> To: "[email protected]" <[email protected]>
>> Sent: Thu, July 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 updates or inserts, try
>> ditching
>> the DataTable in favour of using nested repeaters over the
>> ResultSetMetaData
>> column info and ResultSet rows instead.
>>
>> - Tor Iver
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to