You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Chiappone <ch...@gmail.com> on 2005/08/19 17:07:25 UTC

anyone good with contrib:Table ?

I am having difficulty understanding how to show rows differently
using contrib table.

Lets see if I can describe what I am trying to do.  I basically have a
table with 5 rows.  One of the rows is a link to delete the row.  The
thing is only the owner of the document can delete the row.  my table
is set up like this:

<table jwcid="table@contrib:Table" source="ognl:page.docList"
columns="type", "title", "desc", "file", "id">
 <span jwcid="@base:If" condition="ognl:docOwner">
  <span jwcid="idColumnValue@Block'>
    <span jwcid="deleteLink"/>
  </span>
 </span>
</table>

The issues is that docOwner needs to know the value of of the current
rows 'id' in order to validate its this users document.  How would I
go about doing that?

Thanks.

-- 
~chris

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


Re: anyone good with contrib:Table ?

Posted by 邓君涛 <uf...@gmail.com>.
I have seen the url,but the tapestrytables example hasn't that.I am a 
beginer to tapestry, but I need it now.
Can you tell me which components response for rendering the table headers?Or 
I should rewrite which component in contrib table. Thanks 

 在05-8-20,Mind Bridge <mi...@yahoo.com> 写道: 
> 
> No problem.
> 
> In the HTML-only case that would be done by using one table and setting
> 'colspan' on the A, B, and C cells.
> 
> I would suggest to use lower level table components such as TableView,
> TableRows, etc. That will allow you to lay out the table sections in
> exactly the same way. The A, B, and C titles will be hard-coded in the
> template, and A1, A2, etc would be handled by the table components as
> they are true columns.
> 
> Please see the LocaleList component in the workbench or the example on
> the following site:
> https://tapestrywebcomponentexamples.dev.java.net/
> 
> 
> 
> 邓君涛 wrote:
> 
> >for example
> > A B C
> > A1 A2 A3 B1 B2
> >B21 B22
> > the true columns is *A1,A2,A3,B1,B21,B22,C*, but A1,A2 is assembled to A 
> ,
> >etc.How can i realize it?Thanks.
> >
> >2005/8/20, Mind Bridge <mi...@yahoo.com>:
> >
> >
> >>Please elaborate what you mean by "multi header table" because there are
> >>several possible meanings.
> >>
> >>邓君涛 wrote:
> >>
> >>
> >>
> >>>can any one tell me how to realize multi header table with contrib
> >>>table? I need it,thanks.
> >>>
> >>>2005/8/20, Darío Vasconcelos <da...@gmail.com>:
> >>>
> >>>
> >>>
> >>>
> >>>>Oh I see. Maybe you can do this
> >>>>
> >>>>public boolean getDocOwner() {
> >>>>Table table = (Table)
> >>>>
> >>>>
> >getRequestCycle().getPage().getNestedComponent("table");
> >
> >
> >>>>MyObject obj = (MyObject) table.getTableRow();
> >>>>int id = obj.getId();
> >>>>// .. determine whether or not this is the doc owner
> >>>>// ...
> >>>>return docOwner;
> >>>>}
> >>>>
> >>>>don't know if using "table" inside getNestedComponent would be enough,
> >>>>
> >>>>
> >though...
> >
> >
> >>>>Dario
> >>>>
> >>>>
> >>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>I am aware of that but the problem is I need a conditional to either
> >>>>>show the link or not depending on the user. Which I can't seem to
> >>>>>figure out.
> >>>>>
> >>>>>On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>If the objects in each row aren't too big, you can use
> >>>>>>
> >>>>>>ognl:components.table.tableRow
> >>>>>>
> >>>>>>as a parameter for your link, providing that you're using
> >>>>>>table@contrib:Table as the name of your table.
> >>>>>>
> >>>>>>I'm pasting this directly from the contrib:Table component 
> reference:
> >>>>>>
> >>>>>><a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> >>>>>>parameters="ognl:components.table.tableRow">select</a>
> >>>>>>
> >>>>>>Since tableRow returns your row object, you can extract the id or 
> any
> >>>>>>other fields from there.
> >>>>>>
> >>>>>>
> >>>>>>Hope it helps,
> >>>>>>
> >>>>>>Dario
> >>>>>>
> >>>>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>I am having difficulty understanding how to show rows differently
> >>>>>>>using contrib table.
> >>>>>>>
> >>>>>>>Lets see if I can describe what I am trying to do. I basically have 
> a
> >>>>>>>table with 5 rows. One of the rows is a link to delete the row. The
> >>>>>>>thing is only the owner of the document can delete the row. my 
> table
> >>>>>>>is set up like this:
> >>>>>>>
> >>>>>>><table jwcid="table@contrib:Table" source="ognl:page.docList"
> >>>>>>>columns="type", "title", "desc", "file", "id">
> >>>>>>><span jwcid="@base:If" condition="ognl:docOwner">
> >>>>>>><span jwcid="idColumnValue@Block'>
> >>>>>>><span jwcid="deleteLink"/>
> >>>>>>></span>
> >>>>>>></span>
> >>>>>>></table>
> >>>>>>>
> >>>>>>>The issues is that docOwner needs to know the value of of the 
> current
> >>>>>>>rows 'id' in order to validate its this users document. How would I
> >>>>>>>go about doing that?
> >>>>>>>
> >>>>>>>Thanks.
> >>>>>>>
> >>>>>>>--
> >>>>>>>~chris
> >>>>>>>
> 
> >>>>>>>---------------------------------------------------------------------
> >>>>>>>To unsubscribe, e-mail: 
> tapestry-user-unsubscribe@jakarta.apache.org
> >>>>>>>For additional commands, e-mail:
> >>>>>>>
> >>>>>>>
> >tapestry-user-help@jakarta.apache.org
> >
> >
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>--
> >>>>>>I have enough money to last me the rest of my life, unless I buy
> >>>>>>
> >>>>>>
> >something.
> >
> >
> >>>>>>Jackie Mason
> >>>>>>
> 
> >>>>>>---------------------------------------------------------------------
> >>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>>>>For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>--
> >>>>>~chris
> >>>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>>>For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>I have enough money to last me the rest of my life, unless I buy
> >>>>
> >>>>
> >something.
> >
> >
> >>>>Jackie Mason
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: anyone good with contrib:Table ?

Posted by Mind Bridge <mi...@yahoo.com>.
No problem.

In the HTML-only case that would be done by using one table and setting
'colspan' on the A, B, and C cells.

I would suggest to use lower level table components such as TableView,
TableRows, etc. That will allow you to lay out the table sections in
exactly the same way. The A, B, and C titles will be hard-coded in the
template, and A1, A2, etc would be handled by the table components as
they are true columns.

Please see the LocaleList component in the workbench or the example on
the following site:
https://tapestrywebcomponentexamples.dev.java.net/



邓君涛 wrote:

>for example
>  A B C
> A1 A2 A3 B1 B2 
>B21 B22 
> the true columns is *A1,A2,A3,B1,B21,B22,C*, but A1,A2 is assembled to A ,
>etc.How can i realize it?Thanks.
>
>2005/8/20, Mind Bridge <mi...@yahoo.com>:
>  
>
>>Please elaborate what you mean by "multi header table" because there are
>>several possible meanings.
>>
>>邓君涛 wrote:
>>
>>    
>>
>>>can any one tell me how to realize multi header table with contrib
>>>table? I need it,thanks.
>>>
>>>2005/8/20, Darío Vasconcelos <da...@gmail.com>:
>>>
>>>
>>>      
>>>
>>>>Oh I see. Maybe you can do this
>>>>
>>>>public boolean getDocOwner() {
>>>>Table table = (Table) 
>>>>        
>>>>
>getRequestCycle().getPage().getNestedComponent("table");
>  
>
>>>>MyObject obj = (MyObject) table.getTableRow();
>>>>int id = obj.getId();
>>>>// .. determine whether or not this is the doc owner
>>>>// ...
>>>>return docOwner;
>>>>}
>>>>
>>>>don't know if using "table" inside getNestedComponent would be enough, 
>>>>        
>>>>
>though...
>  
>
>>>>Dario
>>>>
>>>>
>>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
>>>>
>>>>
>>>>        
>>>>
>>>>>I am aware of that but the problem is I need a conditional to either
>>>>>show the link or not depending on the user. Which I can't seem to
>>>>>figure out.
>>>>>
>>>>>On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>If the objects in each row aren't too big, you can use
>>>>>>
>>>>>>ognl:components.table.tableRow
>>>>>>
>>>>>>as a parameter for your link, providing that you're using
>>>>>>table@contrib:Table as the name of your table.
>>>>>>
>>>>>>I'm pasting this directly from the contrib:Table component reference:
>>>>>>
>>>>>><a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
>>>>>>parameters="ognl:components.table.tableRow">select</a>
>>>>>>
>>>>>>Since tableRow returns your row object, you can extract the id or any
>>>>>>other fields from there.
>>>>>>
>>>>>>
>>>>>>Hope it helps,
>>>>>>
>>>>>>Dario
>>>>>>
>>>>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I am having difficulty understanding how to show rows differently
>>>>>>>using contrib table.
>>>>>>>
>>>>>>>Lets see if I can describe what I am trying to do. I basically have a
>>>>>>>table with 5 rows. One of the rows is a link to delete the row. The
>>>>>>>thing is only the owner of the document can delete the row. my table
>>>>>>>is set up like this:
>>>>>>>
>>>>>>><table jwcid="table@contrib:Table" source="ognl:page.docList"
>>>>>>>columns="type", "title", "desc", "file", "id">
>>>>>>><span jwcid="@base:If" condition="ognl:docOwner">
>>>>>>><span jwcid="idColumnValue@Block'>
>>>>>>><span jwcid="deleteLink"/>
>>>>>>></span>
>>>>>>></span>
>>>>>>></table>
>>>>>>>
>>>>>>>The issues is that docOwner needs to know the value of of the current
>>>>>>>rows 'id' in order to validate its this users document. How would I
>>>>>>>go about doing that?
>>>>>>>
>>>>>>>Thanks.
>>>>>>>
>>>>>>>--
>>>>>>>~chris
>>>>>>>
>>>>>>>---------------------------------------------------------------------
>>>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>>>For additional commands, e-mail: 
>>>>>>>              
>>>>>>>
>tapestry-user-help@jakarta.apache.org
>  
>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>--
>>>>>>I have enough money to last me the rest of my life, unless I buy 
>>>>>>            
>>>>>>
>something.
>  
>
>>>>>>Jackie Mason
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>--
>>>>>~chris
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>--
>>>>I have enough money to last me the rest of my life, unless I buy 
>>>>        
>>>>
>something.
>  
>
>>>>Jackie Mason
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>

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


Re: anyone good with contrib:Table ?

Posted by 邓君涛 <uf...@gmail.com>.
for example
  A B C
 A1 A2 A3 B1 B2 
B21 B22 
 the true columns is *A1,A2,A3,B1,B21,B22,C*, but A1,A2 is assembled to A ,
etc.How can i realize it?Thanks.

2005/8/20, Mind Bridge <mi...@yahoo.com>:
> Please elaborate what you mean by "multi header table" because there are
> several possible meanings.
> 
> 邓君涛 wrote:
> 
> >can any one tell me how to realize multi header table with contrib
> >table? I need it,thanks.
> >
> >2005/8/20, Darío Vasconcelos <da...@gmail.com>:
> >
> >
> >>Oh I see. Maybe you can do this
> >>
> >>public boolean getDocOwner() {
> >> Table table = (Table) 
getRequestCycle().getPage().getNestedComponent("table");
> >> MyObject obj = (MyObject) table.getTableRow();
> >> int id = obj.getId();
> >> // .. determine whether or not this is the doc owner
> >> // ...
> >> return docOwner;
> >>}
> >>
> >>don't know if using "table" inside getNestedComponent would be enough, 
though...
> >>
> >>
> >>Dario
> >>
> >>
> >>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> >>
> >>
> >>>I am aware of that but the problem is I need a conditional to either
> >>>show the link or not depending on the user. Which I can't seem to
> >>>figure out.
> >>>
> >>>On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
> >>>
> >>>
> >>>>If the objects in each row aren't too big, you can use
> >>>>
> >>>> ognl:components.table.tableRow
> >>>>
> >>>>as a parameter for your link, providing that you're using
> >>>>table@contrib:Table as the name of your table.
> >>>>
> >>>>I'm pasting this directly from the contrib:Table component reference:
> >>>>
> >>>><a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> >>>>parameters="ognl:components.table.tableRow">select</a>
> >>>>
> >>>>Since tableRow returns your row object, you can extract the id or any
> >>>>other fields from there.
> >>>>
> >>>>
> >>>>Hope it helps,
> >>>>
> >>>>Dario
> >>>>
> >>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> >>>>
> >>>>
> >>>>>I am having difficulty understanding how to show rows differently
> >>>>>using contrib table.
> >>>>>
> >>>>>Lets see if I can describe what I am trying to do. I basically have a
> >>>>>table with 5 rows. One of the rows is a link to delete the row. The
> >>>>>thing is only the owner of the document can delete the row. my table
> >>>>>is set up like this:
> >>>>>
> >>>>><table jwcid="table@contrib:Table" source="ognl:page.docList"
> >>>>>columns="type", "title", "desc", "file", "id">
> >>>>> <span jwcid="@base:If" condition="ognl:docOwner">
> >>>>> <span jwcid="idColumnValue@Block'>
> >>>>> <span jwcid="deleteLink"/>
> >>>>> </span>
> >>>>> </span>
> >>>>></table>
> >>>>>
> >>>>>The issues is that docOwner needs to know the value of of the current
> >>>>>rows 'id' in order to validate its this users document. How would I
> >>>>>go about doing that?
> >>>>>
> >>>>>Thanks.
> >>>>>
> >>>>>--
> >>>>>~chris
> >>>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>>>For additional commands, e-mail: 
tapestry-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>I have enough money to last me the rest of my life, unless I buy 
something.
> >>>> Jackie Mason
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>--
> >>>~chris
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>--
> >>I have enough money to last me the rest of my life, unless I buy 
something.
> >> Jackie Mason
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: anyone good with contrib:Table ?

Posted by Mind Bridge <mi...@yahoo.com>.
Please elaborate what you mean by "multi header table" because there are 
several possible meanings.

邓君涛 wrote:

>can any one tell me how to realize multi header table with contrib
>table? I need it,thanks.
>
>2005/8/20, Darío Vasconcelos <da...@gmail.com>:
>  
>
>>Oh I see. Maybe you can do this
>>
>>public boolean getDocOwner() {
>> Table table = (Table) getRequestCycle().getPage().getNestedComponent("table");
>> MyObject obj = (MyObject) table.getTableRow();
>> int id = obj.getId();
>> // .. determine whether or not this is the doc owner
>> // ...
>> return docOwner;
>>}
>>
>>don't know if using "table" inside getNestedComponent would be enough, though...
>>
>>
>>Dario
>>
>>
>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
>>    
>>
>>>I am aware of that but the problem is I need a conditional to either
>>>show the link or not depending on the user.  Which I can't seem to
>>>figure out.
>>>
>>>On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
>>>      
>>>
>>>>If the objects in each row aren't too big, you can use
>>>>
>>>>  ognl:components.table.tableRow
>>>>
>>>>as a parameter for your link, providing that you're using
>>>>table@contrib:Table as the name of your table.
>>>>
>>>>I'm pasting this directly from the contrib:Table component reference:
>>>>
>>>><a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
>>>>parameters="ognl:components.table.tableRow">select</a>
>>>>
>>>>Since tableRow returns your row object, you can extract the id or any
>>>>other fields from there.
>>>>
>>>>
>>>>Hope it helps,
>>>>
>>>>Dario
>>>>
>>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
>>>>        
>>>>
>>>>>I am having difficulty understanding how to show rows differently
>>>>>using contrib table.
>>>>>
>>>>>Lets see if I can describe what I am trying to do.  I basically have a
>>>>>table with 5 rows.  One of the rows is a link to delete the row.  The
>>>>>thing is only the owner of the document can delete the row.  my table
>>>>>is set up like this:
>>>>>
>>>>><table jwcid="table@contrib:Table" source="ognl:page.docList"
>>>>>columns="type", "title", "desc", "file", "id">
>>>>> <span jwcid="@base:If" condition="ognl:docOwner">
>>>>>  <span jwcid="idColumnValue@Block'>
>>>>>    <span jwcid="deleteLink"/>
>>>>>  </span>
>>>>> </span>
>>>>></table>
>>>>>
>>>>>The issues is that docOwner needs to know the value of of the current
>>>>>rows 'id' in order to validate its this users document.  How would I
>>>>>go about doing that?
>>>>>
>>>>>Thanks.
>>>>>
>>>>>--
>>>>>~chris
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>--
>>>>I have enough money to last me the rest of my life, unless I buy something.
>>>>   Jackie Mason
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>--
>>>~chris
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>      
>>>
>>--
>>I have enough money to last me the rest of my life, unless I buy something.
>>   Jackie Mason
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

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


Re: anyone good with contrib:Table ?

Posted by 邓君涛 <uf...@gmail.com>.
can any one tell me how to realize multi header table with contrib
table? I need it,thanks.

2005/8/20, Darío Vasconcelos <da...@gmail.com>:
> Oh I see. Maybe you can do this
> 
> public boolean getDocOwner() {
>  Table table = (Table) getRequestCycle().getPage().getNestedComponent("table");
>  MyObject obj = (MyObject) table.getTableRow();
>  int id = obj.getId();
>  // .. determine whether or not this is the doc owner
>  // ...
>  return docOwner;
> }
> 
> don't know if using "table" inside getNestedComponent would be enough, though...
> 
> 
> Dario
> 
> 
> On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> > I am aware of that but the problem is I need a conditional to either
> > show the link or not depending on the user.  Which I can't seem to
> > figure out.
> >
> > On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
> > > If the objects in each row aren't too big, you can use
> > >
> > >   ognl:components.table.tableRow
> > >
> > > as a parameter for your link, providing that you're using
> > > table@contrib:Table as the name of your table.
> > >
> > > I'm pasting this directly from the contrib:Table component reference:
> > >
> > > <a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> > > parameters="ognl:components.table.tableRow">select</a>
> > >
> > > Since tableRow returns your row object, you can extract the id or any
> > > other fields from there.
> > >
> > >
> > > Hope it helps,
> > >
> > > Dario
> > >
> > > On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> > > > I am having difficulty understanding how to show rows differently
> > > > using contrib table.
> > > >
> > > > Lets see if I can describe what I am trying to do.  I basically have a
> > > > table with 5 rows.  One of the rows is a link to delete the row.  The
> > > > thing is only the owner of the document can delete the row.  my table
> > > > is set up like this:
> > > >
> > > > <table jwcid="table@contrib:Table" source="ognl:page.docList"
> > > > columns="type", "title", "desc", "file", "id">
> > > >  <span jwcid="@base:If" condition="ognl:docOwner">
> > > >   <span jwcid="idColumnValue@Block'>
> > > >     <span jwcid="deleteLink"/>
> > > >   </span>
> > > >  </span>
> > > > </table>
> > > >
> > > > The issues is that docOwner needs to know the value of of the current
> > > > rows 'id' in order to validate its this users document.  How would I
> > > > go about doing that?
> > > >
> > > > Thanks.
> > > >
> > > > --
> > > > ~chris
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > I have enough money to last me the rest of my life, unless I buy something.
> > >    Jackie Mason
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> I have enough money to last me the rest of my life, unless I buy something.
>    Jackie Mason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: anyone good with contrib:Table ?

Posted by Robert Zeigler <ro...@scazdl.org>.
You could maybe even simplify things a bit...
<table jwcid="@contrib:Table" source="ognl:id, ..." columns="..."
row="ognl:currentRow"/>

<span jwcid="idColumnValue@Block">
  <!-- you could substitute If for base:If if you're using 3.0.x, or
       for Conditional i 3.0.x or tp4 -->
  <span jwcid="@If" condition="ognl:canDelete(visit.user,currentRow)"
element="ognl:null">
   <!-- direct link -->
  </span>
  <span jwcid="@Else" element="ognl:null">
    <!-- plain  text -->
  </span>
</span>

.java:

public boolean canDelete(User user, MyObject currentRow) {
  boolean canDelete=false;
  ... //custom logic for determining stuff...
  return canDelete;
}

Or whatever.  The authentication doesn't have to be in the
page/component class, either... you could just as easily do something like:

<span jwcid="@If" condition="ognl:currentRow.userCanDelete(visit.user)"/>

HTH.

Robert

Darío Vasconcelos wrote:
> Oh I see. Maybe you can do this
> 
> public boolean getDocOwner() {
>   Table table = (Table) getRequestCycle().getPage().getNestedComponent("table");
>   MyObject obj = (MyObject) table.getTableRow();  
>   int id = obj.getId();
>   // .. determine whether or not this is the doc owner
>   // ...
>   return docOwner;
> }
> 
> don't know if using "table" inside getNestedComponent would be enough, though...
> 
> 
> Dario
> 
> 
> On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> 
>>I am aware of that but the problem is I need a conditional to either
>>show the link or not depending on the user.  Which I can't seem to
>>figure out.
>>
>>On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
>>
>>>If the objects in each row aren't too big, you can use
>>>
>>>  ognl:components.table.tableRow
>>>
>>>as a parameter for your link, providing that you're using
>>>table@contrib:Table as the name of your table.
>>>
>>>I'm pasting this directly from the contrib:Table component reference:
>>>
>>><a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
>>>parameters="ognl:components.table.tableRow">select</a>
>>>
>>>Since tableRow returns your row object, you can extract the id or any
>>>other fields from there.
>>>
>>>
>>>Hope it helps,
>>>
>>>Dario
>>>
>>>On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
>>>
>>>>I am having difficulty understanding how to show rows differently
>>>>using contrib table.
>>>>
>>>>Lets see if I can describe what I am trying to do.  I basically have a
>>>>table with 5 rows.  One of the rows is a link to delete the row.  The
>>>>thing is only the owner of the document can delete the row.  my table
>>>>is set up like this:
>>>>
>>>><table jwcid="table@contrib:Table" source="ognl:page.docList"
>>>>columns="type", "title", "desc", "file", "id">
>>>> <span jwcid="@base:If" condition="ognl:docOwner">
>>>>  <span jwcid="idColumnValue@Block'>
>>>>    <span jwcid="deleteLink"/>
>>>>  </span>
>>>> </span>
>>>></table>
>>>>
>>>>The issues is that docOwner needs to know the value of of the current
>>>>rows 'id' in order to validate its this users document.  How would I
>>>>go about doing that?
>>>>
>>>>Thanks.
>>>>
>>>>--
>>>>~chris
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>--
>>>I have enough money to last me the rest of my life, unless I buy something.
>>>   Jackie Mason
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>--
>>~chris
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
> 
> 
> 


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


Re: anyone good with contrib:Table ?

Posted by Darío Vasconcelos <da...@gmail.com>.
Oh I see. Maybe you can do this

public boolean getDocOwner() {
  Table table = (Table) getRequestCycle().getPage().getNestedComponent("table");
  MyObject obj = (MyObject) table.getTableRow();  
  int id = obj.getId();
  // .. determine whether or not this is the doc owner
  // ...
  return docOwner;
}

don't know if using "table" inside getNestedComponent would be enough, though...


Dario


On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> I am aware of that but the problem is I need a conditional to either
> show the link or not depending on the user.  Which I can't seem to
> figure out.
> 
> On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
> > If the objects in each row aren't too big, you can use
> >
> >   ognl:components.table.tableRow
> >
> > as a parameter for your link, providing that you're using
> > table@contrib:Table as the name of your table.
> >
> > I'm pasting this directly from the contrib:Table component reference:
> >
> > <a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> > parameters="ognl:components.table.tableRow">select</a>
> >
> > Since tableRow returns your row object, you can extract the id or any
> > other fields from there.
> >
> >
> > Hope it helps,
> >
> > Dario
> >
> > On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> > > I am having difficulty understanding how to show rows differently
> > > using contrib table.
> > >
> > > Lets see if I can describe what I am trying to do.  I basically have a
> > > table with 5 rows.  One of the rows is a link to delete the row.  The
> > > thing is only the owner of the document can delete the row.  my table
> > > is set up like this:
> > >
> > > <table jwcid="table@contrib:Table" source="ognl:page.docList"
> > > columns="type", "title", "desc", "file", "id">
> > >  <span jwcid="@base:If" condition="ognl:docOwner">
> > >   <span jwcid="idColumnValue@Block'>
> > >     <span jwcid="deleteLink"/>
> > >   </span>
> > >  </span>
> > > </table>
> > >
> > > The issues is that docOwner needs to know the value of of the current
> > > rows 'id' in order to validate its this users document.  How would I
> > > go about doing that?
> > >
> > > Thanks.
> > >
> > > --
> > > ~chris
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > --
> > I have enough money to last me the rest of my life, unless I buy something.
> >    Jackie Mason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> ~chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

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


Re: anyone good with contrib:Table ?

Posted by Chris Chiappone <ch...@gmail.com>.
I am aware of that but the problem is I need a conditional to either
show the link or not depending on the user.  Which I can't seem to
figure out.

On 8/19/05, Darío Vasconcelos <da...@gmail.com> wrote:
> If the objects in each row aren't too big, you can use
> 
>   ognl:components.table.tableRow
> 
> as a parameter for your link, providing that you're using
> table@contrib:Table as the name of your table.
> 
> I'm pasting this directly from the contrib:Table component reference:
> 
> <a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> parameters="ognl:components.table.tableRow">select</a>
> 
> Since tableRow returns your row object, you can extract the id or any
> other fields from there.
> 
> 
> Hope it helps,
> 
> Dario
> 
> On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> > I am having difficulty understanding how to show rows differently
> > using contrib table.
> >
> > Lets see if I can describe what I am trying to do.  I basically have a
> > table with 5 rows.  One of the rows is a link to delete the row.  The
> > thing is only the owner of the document can delete the row.  my table
> > is set up like this:
> >
> > <table jwcid="table@contrib:Table" source="ognl:page.docList"
> > columns="type", "title", "desc", "file", "id">
> >  <span jwcid="@base:If" condition="ognl:docOwner">
> >   <span jwcid="idColumnValue@Block'>
> >     <span jwcid="deleteLink"/>
> >   </span>
> >  </span>
> > </table>
> >
> > The issues is that docOwner needs to know the value of of the current
> > rows 'id' in order to validate its this users document.  How would I
> > go about doing that?
> >
> > Thanks.
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> I have enough money to last me the rest of my life, unless I buy something.
>    Jackie Mason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
~chris

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


Re: anyone good with contrib:Table ?

Posted by Darío Vasconcelos <da...@gmail.com>.
If the objects in each row aren't too big, you can use

   ognl:components.table.tableRow

as a parameter for your link, providing that you're using
table@contrib:Table as the name of your table.

I'm pasting this directly from the contrib:Table component reference:

<a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
parameters="ognl:components.table.tableRow">select</a>

Since tableRow returns your row object, you can extract the id or any
other fields from there.


Hope it helps,

Dario

On 8/19/05, Chris Chiappone <ch...@gmail.com> wrote:
> I am having difficulty understanding how to show rows differently
> using contrib table.
> 
> Lets see if I can describe what I am trying to do.  I basically have a
> table with 5 rows.  One of the rows is a link to delete the row.  The
> thing is only the owner of the document can delete the row.  my table
> is set up like this:
> 
> <table jwcid="table@contrib:Table" source="ognl:page.docList"
> columns="type", "title", "desc", "file", "id">
>  <span jwcid="@base:If" condition="ognl:docOwner">
>   <span jwcid="idColumnValue@Block'>
>     <span jwcid="deleteLink"/>
>   </span>
>  </span>
> </table>
> 
> The issues is that docOwner needs to know the value of of the current
> rows 'id' in order to validate its this users document.  How would I
> go about doing that?
> 
> Thanks.
> 
> --
> ~chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

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