You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Frank <fa...@verizon.net> on 2005/08/25 15:35:37 UTC

contrib:table What am I doing wrong?

<table jwcid="table@contrib:Table" width="90%"
     source="ognl:toDoList"
     columns="item.title"/>

Hello,

The above code shows a column but no rows.
This was working ok in the Foreach below.
Thanks for the help.

Frank

<tr jwcid="@Foreach" element="tr" source="ognl:toDoList" value="ognl:item">
   <td><input type="text" jwcid="title@TextField" size="50" 
value="ognl:item.title"/></td>
</tr> 



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


Re: contrib:table What am I doing wrong?

Posted by Phil Ulrich <ph...@gmail.com>.
Well, if you've set up the column to display DirectLink components,
then you can set the id as a parameter on the DirectLink.

I highly recommend deploying the TapestryTables example of this
website: https://tapestrywebcomponentexamples.dev.java.net/. Take a
look at how the table examples are done. (There's also one for trees,
should you need one.)

--Phil

On 8/25/05, Frank <fa...@verizon.net> wrote:
>  >>pageSize<<
> 
> Phil, that was too easy.<g>
> 
> How about passing a hidden field called id to a page for update?
> In jsp, I would code the field as <input type="hidden" and pass it
> when the user clicked on my row link.
> 
> How does tapestry do this?
> 
> Thanks again
> 
> Frank
> 
> 
> 
> ---------------------------------------------------------------------
> 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: contrib:table What am I doing wrong?

Posted by Frank <fa...@verizon.net>.
Thanks for the link and code example.

I am downloading it now.

Best Regards,

Frank



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


Re: contrib:table What am I doing wrong?

Posted by Phil Ulrich <ph...@gmail.com>.
To give you an example from my own work, taken almost directly from
the tutorial I linked in my last email:

-- HTML file --
<table border="1" jwcid="resultsTable">
                    <span jwcid="NameColumnValue@Block">
                        <span jwcid="jumpLink">
                            <span jwcid="jumpLinkText" />
                        </span>
                    </span>
                </table>

(In your case, you'd use TitleColumnValue.)

-- Page Specification file --
    <component id="jumpLink" type="DirectLink">
        <binding name="listener" expression="listeners.jump" />
        <binding name="parameters"
expression="components.resultsTable.tableRow.id" />
    </component>
    
    <component id="jumpLinkText" type="InsertText">
        <binding name="value"
expression="components.resultsTable.tableRow.name" />
    </component>
    
    <component id="resultsTable" type="contrib:Table">
        <binding name="source" expression="searchResults" />
        <binding name="columns" expression="columns" />
        <binding name="row" expression="searchResult" />
    </component>

Again, this is taken almost directly from the TapestryTables example project.

On 8/25/05, Frank <fa...@verizon.net> wrote:
> How does this get coded in the contrib:Table?
> 
> So far I have:
> 
> 
> <table jwcid="table@contrib:Table" width="90%"
>          source="ognl:toDoList"
>          columns="Title:title,Id:id"
>          pageSize=20/>
> 
> 
> Regards,
> 
> Frank
> 
> 
> 
> ---------------------------------------------------------------------
> 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: contrib:table What am I doing wrong?

Posted by Frank <fa...@verizon.net>.
How does this get coded in the contrib:Table?

So far I have:


<table jwcid="table@contrib:Table" width="90%"
         source="ognl:toDoList"
         columns="Title:title,Id:id"
         pageSize=20/>


Regards,

Frank 



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


Re: contrib:table What am I doing wrong?

Posted by Chris Chiappone <ch...@gmail.com>.
<input jwcid="@Hidden" .../>

Does this

On 8/25/05, Frank <fa...@verizon.net> wrote:
>  >>pageSize<<
> 
> Phil, that was too easy.<g>
> 
> How about passing a hidden field called id to a page for update?
> In jsp, I would code the field as <input type="hidden" and pass it
> when the user clicked on my row link.
> 
> How does tapestry do this?
> 
> Thanks again
> 
> Frank
> 
> 
> 
> ---------------------------------------------------------------------
> 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: contrib:table What am I doing wrong?

Posted by Frank <fa...@verizon.net>.
 >>pageSize<<

Phil, that was too easy.<g>

How about passing a hidden field called id to a page for update?
In jsp, I would code the field as <input type="hidden" and pass it 
when the user clicked on my row link.

How does tapestry do this?

Thanks again

Frank



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


Re: contrib:table What am I doing wrong?

Posted by Phil Ulrich <ph...@gmail.com>.
> This is working now.
> Next I need to find out how to display x records per page with paging.

There is an attribute you can set on the table component, called
'pageSize,' that controls the number of elements shown per page.
Pagination should happen automatically.

--Phil

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


Re: contrib:table What am I doing wrong?

Posted by Frank <fa...@verizon.net>.
 >>In your case, I would try this:

<table jwcid="table@contrib:Table" width="90%"
     source="ognl:toDoList"
     columns="Title:title"/>
<<

Thanks Phil,

This is working now.
Next I need to find out how to display x records per page with paging.

Most of my web apps now our from Dreamweaver using JSP.

This is a big change for me.
Right now it seems like a lot of work.
I have looked at JSF also because of the IDE sun has (Creator)

I am starting to like Tapestry, but wish there were more examples 
written on how to so the basic things like
displaying a page of records to be edited or deleted. Add new records, ect.

Regards,

Frank



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


page flow integration (spring web flow)

Posted by hari ks <ha...@yahoo.com>.
Hi,
   Hangman application in TIA uses Visit object as a
facade for domain objects. This is seen in
betterpetshop project also.
Enterprise scale applications can't be programmed in
this pattern right?

Has any one done integration of spring web flow with
tapestry?

If so how? Or does any other page flow framework
integrate with tapestry. Is it a recommended way of
doing it?

Also what are the patterns of use in Tapestry?

Thanks,
Hari.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: contrib:table What am I doing wrong?

Posted by Jesse Kuhnert <jk...@gmail.com>.
you might want to look at a working example as well...I think tapestry
comes with a set of examples in the distribution..Try copying and
pasting some portion of that table logic into your own stuff until you
get it working...
On 8/25/05, Phil Ulrich <ph...@gmail.com> wrote:
> Frank,
> 
> Check the definition of what the columns binding should be.
> 
> "The table columns to be displayed. The parameter must be an array, a
> list, or an Iterator of ITableColumn objects, an ITableColumnModel, or
> a String describing the columns (see documentation)."
> 
> In your case, I would try this:
> 
> <table jwcid="table@contrib:Table" width="90%"
>     source="ognl:toDoList"
>     columns="Title:title"/>
> 
> The "Title" before the colon being an id for the column, and the
> "title" after the colon being an OGNL expression to extract the title
> element from the row object.
> 
> --Phil
> 
> On 8/25/05, Frank <fa...@verizon.net> wrote:
> > <table jwcid="table@contrib:Table" width="90%"
> >      source="ognl:toDoList"
> >      columns="item.title"/>
> >
> > Hello,
> >
> > The above code shows a column but no rows.
> > This was working ok in the Foreach below.
> > Thanks for the help.
> >
> > Frank
> >
> > <tr jwcid="@Foreach" element="tr" source="ognl:toDoList" value="ognl:item">
> >    <td><input type="text" jwcid="title@TextField" size="50"
> > value="ognl:item.title"/></td>
> > </tr>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: contrib:table What am I doing wrong?

Posted by Phil Ulrich <ph...@gmail.com>.
Frank,

Check the definition of what the columns binding should be.

"The table columns to be displayed. The parameter must be an array, a
list, or an Iterator of ITableColumn objects, an ITableColumnModel, or
a String describing the columns (see documentation)."

In your case, I would try this:

<table jwcid="table@contrib:Table" width="90%"
    source="ognl:toDoList"
    columns="Title:title"/>

The "Title" before the colon being an id for the column, and the
"title" after the colon being an OGNL expression to extract the title
element from the row object.

--Phil

On 8/25/05, Frank <fa...@verizon.net> wrote:
> <table jwcid="table@contrib:Table" width="90%"
>      source="ognl:toDoList"
>      columns="item.title"/>
> 
> Hello,
> 
> The above code shows a column but no rows.
> This was working ok in the Foreach below.
> Thanks for the help.
> 
> Frank
> 
> <tr jwcid="@Foreach" element="tr" source="ognl:toDoList" value="ognl:item">
>    <td><input type="text" jwcid="title@TextField" size="50"
> value="ognl:item.title"/></td>
> </tr>
> 
> 
> 
> ---------------------------------------------------------------------
> 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