You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ken in Nashua <kc...@live.com> on 2012/09/21 03:15:39 UTC

T4 to T5 component usage

Posted by Ken in Nashua <kc...@live.com>.
Ivan,

Preeviette !!!

Thanks for the generous contribution and good faith. I am excited.
I will give that a shot over the weekend.

Your tech support for tapestry 5 looks good. 

I will be as generous to post my widget when I get it QA'd... going to be some weeks though... each month I think i have time and keep getting clobbered with interference.

I meant to get this gallery going months ago but been pre-empted.

I will be sure to share when done.

have a great week

KEN
 		 	   		  

Re: T4 to T5 component usage

Posted by Ken in Nashua <kc...@live.com>.
Referring to syntax... nothing personal.
kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: T4 to T5  <select> component usage
Date: Thu, 20 Sep 2012 23:06:27 -0400





Apologies for post... I uncovered some additional configurations that I failed to migrate to my T5 code base.

The actual definitions of the components usage I am attempting to use... inside my Home.tml

    <h1>
        <div id="page.title">
            <span jwcid="@Insert" value="Listings"/>
        </div>
    </h1>

    <form jwcid="galleryForm@Form" listener="listener:galleryFormSubmit">
        <div jwcid="galleryWidget@custom:Gallery"
            collectionType="ognl:@org.trails.demo.Listing@class"
            itemsPerPage="ognl:itemsPerPage"
            tableColumns="ognl:tableColumns"
            cursor="ognl:cursor"
            >

            <span jwcid="@RenderBody">content goes here</span>
        </div>
    </form>


<span jwcid="@Script" script="/org/trails/demo/components/Gallery.script"
    component = "ognl:components.galleryWidget"
    itemsPerPage = "ognl:components.galleryWidget.itemsPerPage"
    tableColumns = "ognl:components.galleryWidget.tableColumns"
    itemCount="ognl:components.galleryWidget.collection.size"
    cursor="ognl:cursor"
    />

ghack... glad ognl is gone... and thats no fluff

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: T4 to T5  <select> component usage
Date: Thu, 20 Sep 2012 21:15:39 -0400





Guys/Gals (if any),

I am upgrading some T4 code to T5

I have a T4 <select> component configuration/usage as follows:

--- TML snippet ---
            <tr>
                <td width="25%" align="left" nowrap="NOWRAP">
                    <t:Label>Items Per Page</t:Label>
                    <select t:type="Select" id="itemsPerPageSelect"
                        model="literal:5,10,15,25,50,100,250,500,1000,5000,10000"
                        value="itemsPerPage"
                        defaultValue="9"
                        onchange="tapestry.form.refresh(this.form)"
                        />

--- JAVA snippet --- 

    @Component(parameters =
    { "event=itemsPerPageChange", "clientId=itemsPerPageSelect" })

    private Select itemsPerPageSelect;

    @OnEvent(value = "action", component = "select")
    public Object onItemsPerPageChange()
    {
    ...

Am I missing something ? I don't understand the error below as to why this configuration is not sufficient.

Thanks in advance...

kcolassi@live.com

An unexpected application exception has occurred.java.lang.RuntimeExceptionException
 assembling root component of page Home: Embedded component(s) 
itemsPerPageSelect, page, tableColumnsSelect are defined within 
component class org.tynamo.examples.hibernatesecurity.components.Gallery
 (or a super-class of Gallery), but are not present in the component 
template 
(classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml).org.apache.tapestry5.ioc.internal.OperationExceptionEmbedded
 component(s) itemsPerPageSelect, page, tableColumnsSelect are defined 
within component class 
org.tynamo.examples.hibernatesecurity.components.Gallery (or a 
super-class of Gallery), but are not present in the component template 
(classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml).traceConstructing instance of page class org.tynamo.examples.hibernatesecurity.pages.HomeAssembling root component for page HomeCreating ComponentAssembler for org.tynamo.examples.hibernatesecurity.components.Galleryjava.lang.RuntimeExceptionEmbedded
 component(s) itemsPerPageSelect, page, tableColumnsSelect are defined 
within component class 
org.tynamo.examples.hibernatesecurity.components.Gallery (or a 
super-class of Gallery), but are not present in the component template 
(classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml).
 

 		 	   		   		 	   		   		 	   		  

RE: T4 to T5