Why can't we just do this?

<table wicket:id="grid" cellspacing="0" cellpadding="2">
        <tr wicket:id="row">
                <td wicket:id="column">cell</td>
        </tr>
</table>

I mean, this way you don't need special renderers (you just put all your stuff directly into the HTML file) and you can still do either old HTML tables or CSS or whatever. We allow developers to attach three IDs on the markup end (one for the grid, one for the row, one for the column) and they can use any tags (i.e. table, tr, td, div, span, etc) and put any markup before or after them.

        Wouldn't this work?

Gili

Igor Vaynberg wrote:
There are plenty of components in wicket that write out html directly to the
response stream, sometimes it is the best and easiest solution.

In this case all we are interested in is generating a simple grid layout
that hosts cells. Is it easier to write your own renderer to customize your
css or whatever as opposed to having to write markup for two dataviews
everytime and making sure you get that exactly right.

With a renderer all you do is:

<table wicket:id="grid" cellspacing="0" cellpadding="2">
        [cell markup]
</table>

Anyways, if you don't like it I wont implement it until I need it :)


-Igor

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 3:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems


        Looks bad :)

We should have external markup files (i.e. *.html) instead of doing this the old servlet/JSP way of manually writing out HTML.

Gili

Igor Vaynberg wrote:

Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
        begin(...) {}
        beginRow(GridView view) {
                view.getResponse().write("<tr>");
        }
        beginCell(GridView view) {
                view.getResponse().write("<td>");
        }
        ...
}

Mmm this gives me an idea, we can have an excelrenderer or a csvrenderer, etc.. Almost like an exporter.

-Igor




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems


Looks ok I think although I'm not too familiar with this whole concept of a seperate renderer. I'd have to try it to see

what I think
:)

Gili



How about this idea:
We have a gridview extends dataview. A gridview takes a render interface that it uses to render the grid (instead of body

markup), so


we can have a tablerenderer or cssrenderer or whatever, and the interface would roughly look like this:

Interface IGridRenderer {
        begin(GridView view);
        beginRow(GridView view);
        beginCell(GridView view);
        endCell(GridView view);
        endRow(GridView view);
        end(GridView view);
}

Basically this is the same as my first post that inserted the html directly but now its tucked away in a renderer. This way we

don't have


the unnceessary row-wise views and you can even use OIR

cleanly since


it is basically a dataview.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing

Projects & Teams
* Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing

Projects & Teams
* Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


--
http://www.desktopbeautifier.com/


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


--
http://www.desktopbeautifier.com/


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to