You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Reinier Mostert <re...@clabo.co.za> on 2003/11/11 23:55:16 UTC

DirectLink from within ForEach

Hi all,

Maybe I'm just missing something obvious, but if so, please refresh me. 
I'm rendering a table using a Foreach.  (I've mailed Mindbridge a couple
of months ago, and after looking at the details he suggested that this
is not a job for Contrib:table).

After doing a couple of these tables, I implemented a spreadsheet like
structure where I can fill in my values, set alignment, formats, etc,
and then spool it into a list for the ForEach.  Now I want to make some
of the cells (or values) clickable.  The problem is I want to do it from
the Java side, without changing the HTML.  So I want to do
cell.setClickable(id)
and this should then render a Directlink with the Id as the parameter. 
Is this at all possible, and how should I go about it?

I include the ForEach subset of the html file for reference below.

Thanks
reinier

<span jwcid="@Foreach" source="ognl:arrayRows" value="ognl:row">
<tr>
    <span jwcid="@Foreach" source="ognl:row" value="ognl:cell">
	<td jwcid="@Any" element="td" colspan="ognl:cell.colSpan"
class="ognl:cell.style">
		<span jwcid="@Insert" value="ognl:cell.contents"/>
	</td>
    </span>
</tr>
</span>

-- 
Reinier Mostert <re...@clabo.co.za>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink from within ForEach

Posted by Reinier Mostert <re...@clabo.co.za>.
Thanx a million, Harish!  That worked perfectly, and it was a small
change.  Exactly what I was looking for.

reinier

On Wed, 2003-11-12 at 03:07, Harish Krishnaswamy wrote:
> I don't think you can do it unless you either override Insert with a custom component or wrap it 
> with one of the link components. Why can't you always wrap it with a link component and disable it 
> if you don't want a link?
> 
> -Harish
> 
> Reinier Mostert wrote:
> > Hi all,
> > 
> > Maybe I'm just missing something obvious, but if so, please refresh me. 
> > I'm rendering a table using a Foreach.  (I've mailed Mindbridge a couple
> > of months ago, and after looking at the details he suggested that this
> > is not a job for Contrib:table).
> > 
> > After doing a couple of these tables, I implemented a spreadsheet like
> > structure where I can fill in my values, set alignment, formats, etc,
> > and then spool it into a list for the ForEach.  Now I want to make some
> > of the cells (or values) clickable.  The problem is I want to do it from
> > the Java side, without changing the HTML.  So I want to do
> > cell.setClickable(id)
> > and this should then render a Directlink with the Id as the parameter. 
> > Is this at all possible, and how should I go about it?
> > 
> > I include the ForEach subset of the html file for reference below.
> > 
> > Thanks
> > reinier
> > 
> > <span jwcid="@Foreach" source="ognl:arrayRows" value="ognl:row">
> > <tr>
> >     <span jwcid="@Foreach" source="ognl:row" value="ognl:cell">
> > 	<td jwcid="@Any" element="td" colspan="ognl:cell.colSpan"
> > class="ognl:cell.style">
> > 		<span jwcid="@Insert" value="ognl:cell.contents"/>
> > 	</td>
> >     </span>
> > </tr>
> > </span>
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
-- 
Reinier Mostert <re...@clabo.co.za>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink from within ForEach

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I don't think you can do it unless you either override Insert with a custom component or wrap it 
with one of the link components. Why can't you always wrap it with a link component and disable it 
if you don't want a link?

-Harish

Reinier Mostert wrote:
> Hi all,
> 
> Maybe I'm just missing something obvious, but if so, please refresh me. 
> I'm rendering a table using a Foreach.  (I've mailed Mindbridge a couple
> of months ago, and after looking at the details he suggested that this
> is not a job for Contrib:table).
> 
> After doing a couple of these tables, I implemented a spreadsheet like
> structure where I can fill in my values, set alignment, formats, etc,
> and then spool it into a list for the ForEach.  Now I want to make some
> of the cells (or values) clickable.  The problem is I want to do it from
> the Java side, without changing the HTML.  So I want to do
> cell.setClickable(id)
> and this should then render a Directlink with the Id as the parameter. 
> Is this at all possible, and how should I go about it?
> 
> I include the ForEach subset of the html file for reference below.
> 
> Thanks
> reinier
> 
> <span jwcid="@Foreach" source="ognl:arrayRows" value="ognl:row">
> <tr>
>     <span jwcid="@Foreach" source="ognl:row" value="ognl:cell">
> 	<td jwcid="@Any" element="td" colspan="ognl:cell.colSpan"
> class="ognl:cell.style">
> 		<span jwcid="@Insert" value="ognl:cell.contents"/>
> 	</td>
>     </span>
> </tr>
> </span>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org