You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by 王文楠 <wq...@gmail.com> on 2007/04/28 09:14:31 UTC

[T4]a question about @Tableview component

when i use a Tableview component ,how can i customize the width of some
column

here is some code fragment
<span jwcid="@Contrib:TableView"  source="ognl:model"  columns="literal:
ramount, indate">
      <table width="800" >
        <tr> <th  jwcid="@Contrib:TableColumns" ></th> </tr>
        <tr jwcid="tableRows@Contrib:TableRows"><td
jwcid="@Contrib:TableValues"  align="center"></td></tr>
      </table>
 </span>
how can i specify the width of column "indate"

Re: [T4]a question about @Tableview component

Posted by Jesse Kuhnert <jk...@gmail.com>.
There are a few ways, but the easiest is to use the css class names that are
automatically created based on the columns you have given it.

In your case you should be able to view the source of the rendered table and
see that you have the css classes "ramountColumnHeader" and
"indateColumnHeader" defined. .It's then a matter of doing something along
the lines of:

<style>
   .ramountColumnHeader { width: 40%; }
   .indateColumnHeader { width:10%; }
</style>

On 4/28/07, 王文楠 <wq...@gmail.com> wrote:
>
> when i use a Tableview component ,how can i customize the width of some
> column
>
> here is some code fragment
> <span jwcid="@Contrib:TableView"  source="ognl:model"  columns="literal:
> ramount, indate">
>       <table width="800" >
>         <tr> <th  jwcid="@Contrib:TableColumns" ></th> </tr>
>         <tr jwcid="tableRows@Contrib:TableRows"><td
> jwcid="@Contrib:TableValues"  align="center"></td></tr>
>       </table>
> </span>
> how can i specify the width of column "indate"
>



-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com