You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by simonm <si...@redbend.com> on 2008/11/27 13:50:45 UTC

Label & Link item within a same table cell

I am drawing a table using DataView and implement the populateItem method to
add every table row item.
One of my table cell should display a simple text OR a link OR both (e.g.
the cell will have a text, and a link beneath – both in the same cell)
My HTML snippet: 
<table>….
  <tr>…
       <td wicket:id="operation" rowspan="3">[Here should come Text &
Link]</td>
  <tr>…
</table>
My question is how can I insert those two items into one cell? AFAIK, I can
add only one wicket:id to a table column and therefore only one Component is
attached to it (in the Java code). I have tried to split the cell to two
rows (rowspan="2") such that the above part will have the text and the
bottom part will have the link, but then I get into undesired UI problems
(the border is shown though it is not desirable and the partition of the
cell is always fixed – 50-50 for rowspan=2 etc...)
Lots of WEB search yields no result (I read Wicket in Action at a whole!) -
still can't figure out how to do that!

Any idea how can I combine those two items into one table cell ?
!Thanks!

-- 
View this message in context: http://www.nabble.com/Label---Link-item-within-a-same-table-cell-tp20718713p20718713.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Label & Link item within a same table cell

Posted by James Carman <ja...@carmanconsulting.com>.
I typically use Fragments for these kinds of situations, unless of course,
the same type of component will need to be used elsewhere.  Then, I use a
custom Panel class.

On Thu, Nov 27, 2008 at 8:01 AM, Nicolas Castin <nc...@gmail.com>wrote:

> Hello,
>
> I had approxymatly the same think to do (with image in place of link /
> label).
> I created a custom panel handling the content of the cell, which allows
> more
> that one element into it.
>
> Regards
>
> On Thu, Nov 27, 2008 at 1:50 PM, simonm <si...@redbend.com> wrote:
>
> >
> > I am drawing a table using DataView and implement the populateItem method
> > to
> > add every table row item.
> > One of my table cell should display a simple text OR a link OR both (e.g.
> > the cell will have a text, and a link beneath – both in the same cell)
> > My HTML snippet:
> > <table>….
> >  <tr>…
> >       <td wicket:id="operation" rowspan="3">[Here should come Text &
> > Link]</td>
> >  <tr>…
> > </table>
> > My question is how can I insert those two items into one cell? AFAIK, I
> can
> > add only one wicket:id to a table column and therefore only one Component
> > is
> > attached to it (in the Java code). I have tried to split the cell to two
> > rows (rowspan="2") such that the above part will have the text and the
> > bottom part will have the link, but then I get into undesired UI problems
> > (the border is shown though it is not desirable and the partition of the
> > cell is always fixed – 50-50 for rowspan=2 etc...)
> > Lots of WEB search yields no result (I read Wicket in Action at a whole!)
> -
> > still can't figure out how to do that!
> >
> > Any idea how can I combine those two items into one table cell ?
> > !Thanks!
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Label---Link-item-within-a-same-table-cell-tp20718713p20718713.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Nicolas Castin
> Senior Software Developer
> EURid.eu
>

Re: Label & Link item within a same table cell

Posted by Nicolas Castin <nc...@gmail.com>.
Hello,

I had approxymatly the same think to do (with image in place of link /
label).
I created a custom panel handling the content of the cell, which allows more
that one element into it.

Regards

On Thu, Nov 27, 2008 at 1:50 PM, simonm <si...@redbend.com> wrote:

>
> I am drawing a table using DataView and implement the populateItem method
> to
> add every table row item.
> One of my table cell should display a simple text OR a link OR both (e.g.
> the cell will have a text, and a link beneath – both in the same cell)
> My HTML snippet:
> <table>….
>  <tr>…
>       <td wicket:id="operation" rowspan="3">[Here should come Text &
> Link]</td>
>  <tr>…
> </table>
> My question is how can I insert those two items into one cell? AFAIK, I can
> add only one wicket:id to a table column and therefore only one Component
> is
> attached to it (in the Java code). I have tried to split the cell to two
> rows (rowspan="2") such that the above part will have the text and the
> bottom part will have the link, but then I get into undesired UI problems
> (the border is shown though it is not desirable and the partition of the
> cell is always fixed – 50-50 for rowspan=2 etc...)
> Lots of WEB search yields no result (I read Wicket in Action at a whole!) -
> still can't figure out how to do that!
>
> Any idea how can I combine those two items into one table cell ?
> !Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/Label---Link-item-within-a-same-table-cell-tp20718713p20718713.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Nicolas Castin
Senior Software Developer
EURid.eu

Re: Label & Link item within a same table cell

Posted by Dipu <di...@googlemail.com>.
take a look at the LinkIconPanel.java to get an idea, either you can use it
or you can roll out a similar component that fits your requirement.

Cheers
Dipu

On Thu, Nov 27, 2008 at 12:50 PM, simonm <si...@redbend.com> wrote:

>
> I am drawing a table using DataView and implement the populateItem method
> to
> add every table row item.
> One of my table cell should display a simple text OR a link OR both (e.g.
> the cell will have a text, and a link beneath – both in the same cell)
> My HTML snippet:
> <table>….
>  <tr>…
>       <td wicket:id="operation" rowspan="3">[Here should come Text &
> Link]</td>
>  <tr>…
> </table>
> My question is how can I insert those two items into one cell? AFAIK, I can
> add only one wicket:id to a table column and therefore only one Component
> is
> attached to it (in the Java code). I have tried to split the cell to two
> rows (rowspan="2") such that the above part will have the text and the
> bottom part will have the link, but then I get into undesired UI problems
> (the border is shown though it is not desirable and the partition of the
> cell is always fixed – 50-50 for rowspan=2 etc...)
> Lots of WEB search yields no result (I read Wicket in Action at a whole!) -
> still can't figure out how to do that!
>
> Any idea how can I combine those two items into one table cell ?
> !Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/Label---Link-item-within-a-same-table-cell-tp20718713p20718713.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>