You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ralph Churchill <mr...@yahoo.com> on 2004/04/19 02:12:22 UTC

nesting components in Table

I want to nest some sort of link element as a column
inside a contrib:FormTable. Right now I have:

<table cellspacing="0" border="1" width="100%"
jwcid="tableView">
        <tr>
            <td>&nbsp;</td>
            <td jwcid="tableColumns"/>
        </tr>
        <tr jwcid="tableFormRows">
           <td><span jwcid="checkbox"/></td>
           <td jwcid="tableValues"/>
        </tr>

In my page spec:
    <component id="tableView"
type="contrib:TableView">
        <binding name="source"
expression="supplierTableModel"/>
        <binding name="columns">
        'supplierNumber, '+
        'supplierShortName, '+
        'cciStatus, '+
        'supplierName, '+
        'epaNumber, '+
        'brandedAdditiveStatus'
        </binding>
    </component>
    <component id="tableColumns"
type="contrib:TableColumns"/>
    <component id="tableFormRows"
type="contrib:TableFormRows">
        <binding name="row" expression="supplier"/>
        <binding name="convertor"
expression="convertor"/>
        <binding name="class"
expression="beans.evenOdd.next"/>
    </component>
    <component id="tableValues"
type="contrib:TableValues"/>

Now, however, I want to make the values in the rows of
the first column be links -- not just data. How can I
do that *and* retain the benefits of it being in
TableColumns (e.g. sort by, etc)?

RMC

 


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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


Re: nesting components in Table

Posted by Ralph Churchill <mr...@yahoo.com>.
I don't know if I'm on the right track or not... but
what I've done is to make the column in which I want
the link into a "SimpleTableColumn" (returned by
getSupplierNumberColumn()), and remove it from the
"columns" list in TableView. Then, I manually add the
column heading and manually add the link below::

    <table cellspacing="0" border="1" width="100%"
jwcid="tableView">
        <tr>
            <th>&nbsp;</th>
            <th><span jwcid="@Insert"
value="ognl:getSupplierNumberColumn().getDisplayName()"/></th>
            <th jwcid="tableColumns"/>
        </tr>
        <tr jwcid="tableFormRows">
            <td><span jwcid="checkbox"/></td>
            <td><a href="#"><span
jwcid="supplierNumber@Insert"
value="ognl:supplier.supplierNumber"/></a></td>
            <td jwcid="tableValues"/>
        </tr>
  

This works partially... in that it displays the column
*name*... Is there some way to use the
SimpleTableColumn to "render" all the other details??

RMC

--- Ralph Churchill <mr...@yahoo.com> wrote:
> I want to nest some sort of link element as a column
> inside a contrib:FormTable. Right now I have:
> 
> <table cellspacing="0" border="1" width="100%"
> jwcid="tableView">
>         <tr>
>             <td>&nbsp;</td>
>             <td jwcid="tableColumns"/>
>         </tr>
>         <tr jwcid="tableFormRows">
>            <td><span jwcid="checkbox"/></td>
>            <td jwcid="tableValues"/>
>         </tr>
> 
> In my page spec:
>     <component id="tableView"
> type="contrib:TableView">
>         <binding name="source"
> expression="supplierTableModel"/>
>         <binding name="columns">
>         'supplierNumber, '+
>         'supplierShortName, '+
>         'cciStatus, '+
>         'supplierName, '+
>         'epaNumber, '+
>         'brandedAdditiveStatus'
>         </binding>
>     </component>
>     <component id="tableColumns"
> type="contrib:TableColumns"/>
>     <component id="tableFormRows"
> type="contrib:TableFormRows">
>         <binding name="row" expression="supplier"/>
>         <binding name="convertor"
> expression="convertor"/>
>         <binding name="class"
> expression="beans.evenOdd.next"/>
>     </component>
>     <component id="tableValues"
> type="contrib:TableValues"/>
> 
> Now, however, I want to make the values in the rows
> of
> the first column be links -- not just data. How can
> I
> do that *and* retain the benefits of it being in
> TableColumns (e.g. sort by, etc)?
> 
> RMC
> 
>  
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25�
> http://photos.yahoo.com/ph/print_splash
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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


RE: nesting components in Table

Posted by Ralph Churchill <mr...@yahoo.com>.
Perfect! Thank you. I knew there had to be a
straightforward way to do this. The use of
"selectColumnHeader@Block" and
"selectColumnValue@Block" was not immediately apparent
to me. It's very helpful.

RMC


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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


RE: nesting components in Table

Posted by Mind Bridge <mi...@yahoo.com>.
Hi Ralph,

Please see the documentation of Table:
http://jakarta.apache.org/tapestry/doc/ComponentReference/contrib.Table.html

I believe you are interested in something similar to the example there:

<table jwcid="table@contrib:Table" width="90%"
    source="ognl:@java.util.Locale@getAvailableLocales()"
    columns="Locale:toString(), Language, Country, Variant, ISO3Language,
ISO3Country, !select"/>

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



-----Original Message-----
From: Ralph Churchill [mailto:mrchucho@yahoo.com]
Sent: Monday, April 19, 2004 5:34 PM
To: Tapestry users
Subject: Re: nesting components in Table


Is this even possible? Is there some straightforward
way in which I can have the rows of one column include
another component while maintaining the column header?

RMC

--- Ralph Churchill <mr...@yahoo.com> wrote:
> I want to nest some sort of link element as a column
> inside a contrib:FormTable. Right now I have:
>
> <table cellspacing="0" border="1" width="100%"
> jwcid="tableView">
>         <tr>
>             <td>&nbsp;</td>
>             <td jwcid="tableColumns"/>
>         </tr>
>         <tr jwcid="tableFormRows">
>            <td><span jwcid="checkbox"/></td>
>            <td jwcid="tableValues"/>
>         </tr>
>
> In my page spec:
>     <component id="tableView"
> type="contrib:TableView">
>         <binding name="source"
> expression="supplierTableModel"/>
>         <binding name="columns">
>         'supplierNumber, '+
>         'supplierShortName, '+
>         'cciStatus, '+
>         'supplierName, '+
>         'epaNumber, '+
>         'brandedAdditiveStatus'
>         </binding>
>     </component>
>     <component id="tableColumns"
> type="contrib:TableColumns"/>
>     <component id="tableFormRows"
> type="contrib:TableFormRows">
>         <binding name="row" expression="supplier"/>
>         <binding name="convertor"
> expression="convertor"/>
>         <binding name="class"
> expression="beans.evenOdd.next"/>
>     </component>
>     <component id="tableValues"
> type="contrib:TableValues"/>
>
> Now, however, I want to make the values in the rows
> of
> the first column be links -- not just data. How can
> I
> do that *and* retain the benefits of it being in
> TableColumns (e.g. sort by, etc)?
>
> RMC
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25"
> http://photos.yahoo.com/ph/print_splash
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>





__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25"
http://photos.yahoo.com/ph/print_splash

---------------------------------------------------------------------
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: nesting components in Table

Posted by Ralph Churchill <mr...@yahoo.com>.
Is this even possible? Is there some straightforward
way in which I can have the rows of one column include
another component while maintaining the column header?

RMC

--- Ralph Churchill <mr...@yahoo.com> wrote:
> I want to nest some sort of link element as a column
> inside a contrib:FormTable. Right now I have:
> 
> <table cellspacing="0" border="1" width="100%"
> jwcid="tableView">
>         <tr>
>             <td>&nbsp;</td>
>             <td jwcid="tableColumns"/>
>         </tr>
>         <tr jwcid="tableFormRows">
>            <td><span jwcid="checkbox"/></td>
>            <td jwcid="tableValues"/>
>         </tr>
> 
> In my page spec:
>     <component id="tableView"
> type="contrib:TableView">
>         <binding name="source"
> expression="supplierTableModel"/>
>         <binding name="columns">
>         'supplierNumber, '+
>         'supplierShortName, '+
>         'cciStatus, '+
>         'supplierName, '+
>         'epaNumber, '+
>         'brandedAdditiveStatus'
>         </binding>
>     </component>
>     <component id="tableColumns"
> type="contrib:TableColumns"/>
>     <component id="tableFormRows"
> type="contrib:TableFormRows">
>         <binding name="row" expression="supplier"/>
>         <binding name="convertor"
> expression="convertor"/>
>         <binding name="class"
> expression="beans.evenOdd.next"/>
>     </component>
>     <component id="tableValues"
> type="contrib:TableValues"/>
> 
> Now, however, I want to make the values in the rows
> of
> the first column be links -- not just data. How can
> I
> do that *and* retain the benefits of it being in
> TableColumns (e.g. sort by, etc)?
> 
> RMC
> 
>  
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25�
> http://photos.yahoo.com/ph/print_splash
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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