On Wed, 23 May 2007 15:42:15 +0200
Thomas Singer <[EMAIL PROTECTED]> wrote:

> I'm trying to create following page in Wicket:
> 
>   http://www.syntevo.com/smartcvs/comparison.jsp
> 
> Generally, I want to keep the text (including the links to other
> pages in it) in the HTML files for now. My problem is the creation of
> these tags without adding a separate component for each one:
> 
> <td align="center">
>    <img src="/graphics/feature-absent.gif" border="0" alt="-"
> width="9" height="9">
> </td>
> 
> and
> 
> <td align="center">
>     <img src="/graphics/feature-present.gif" border="0" alt="+"
> width="9" height="9">
> </td>
> 
> What approach the Wicket experts suggest? Thanks in advance.

I'm not sure <td> should go into this component. You may eventually use
this outside of a <table> ;) and align="center" should probably go to
css.

As for <img>...
One way is to subclass wicket Image and
override onComponentTag.

protected void onComponentTag (ComponentTag tag) {
    checkComponentTag (tag, "img");
    super.onComponentTag (tag);
    tag.put ("alt", "+");
    tag.put ("border", "0");
    //so on....
  }

Is this considered a hack, I wonder?

There is also something like AttributeAppender or something like this,
don't remember.

Best regards,
Alexey.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to