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 nashua <nh...@hotmail.com> on 2007/10/09 21:48:22 UTC

propertyselection not cached

Folks,

I have a propertyselection component rigged with 1,2,3,4,5...

Everytime I select from my propertyselection... the this.form.submit() listener gets called... but my property gets reset. Nothing sticks...

Gallery.JAVA
    public IPage onFormSubmit (IRequestCycle cycle) {
        IPage page = cycle.getPage();
        return page;
    }

Any ideas? My rendering is fine...Template follows:

Best regards
Ken in nashua

<span jwcid="$content$">

    <span jwcid="autoPagingContent@Block">
        <table width="100%" border=1>
            <tr>
                <td width="25%" align="left" NOWRAP>
                    <span jwcid="@Insert" value="Table Size"/>
                    <select jwcid="@PropertySelection" model="ognl:@org.trails.demo.components.Gallery@tableSizeModel" value="ognl:tableSize" onchange="javascript:this.form.submit();"></select>
                    <span jwcid="@Insert" value="Paging Span"/>
                    <select jwcid="@PropertySelection" model="ognl:@org.trails.demo.components.Gallery@pagingSpanModel" value="ognl:pagingSpan" onchange="javascript:this.form.submit();"></select>
                </td>
                <td align="left" NOWRAP>
                    <a jwcid="@DirectLink" listener="listener:onBegin" style="fontSize:15px;"> <span jwcid="@Insert" value="<<"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPrev"> <span jwcid="@Insert" value="<"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:1"> <span jwcid="@Insert" value="ognl:1"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:2"> <span jwcid="@Insert" value="ognl:2"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:3"> <span jwcid="@Insert" value="ognl:3"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:4"> <span jwcid="@Insert" value="ognl:4"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:5"> <span jwcid="@Insert" value="ognl:5"/> </a>
                    <a jwcid="@DirectLink" listener="listener:onNext"> <span jwcid="@Insert" value=">"/>  </a>
                    <a jwcid="@DirectLink" listener="listener:onEnd"> <span jwcid="@Insert" value=">>"/> </a>
                </td>
            </tr>
        </table>
    </span>

    <span jwcid="collectionContent@Block">
        <table width="100%">
            <tr>
                <span jwcid="foreach@For" source="ognl:collection" value="ognl:currentObject" index="ognl:index">
                    <span jwcid="@If" condition="ognl:(index % tableSize) == 0">
                        <span jwcid="@Insert" value="</tr><tr>" raw="true"/>
                    </span>
                    <td>
                    <a jwcid="editLinkElse@LinkSubmit" listener="listener:edit" parameters="ognl:currentObject">
                        <img jwcid="@Image"
                             image="ognl:photoAsset"
                             alt="ognl:currentObject.demographics.city"
                             title="ognl:currentObject.demographics.city" width="160" height="110"
                             />
                    </a>
                    </td>
                </span>
            </tr>
        </table>
    </span>

    <form jwcid="galleryForm@Form" listener="listener:onFormSubmit">
        <div jwcid="@RenderBlock" block="ognl:components.autoPagingContent"/>
        <div jwcid="@RenderBlock" block="ognl:components.collectionContent"/>
        <div jwcid="@RenderBlock" block="ognl:components.autoPagingContent"/>
    </form>

_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline

RE: propertyselection not cached

Posted by Jonathan Barker <jo...@gmail.com>.
I'm assuming this is related to your later post:

"is not bound and can not be updated or BINDINGEXCEPTION ?"

Play it safe and choose names for the persistent page parameters for your
select values that are different from the parameters used for components on
the page - at least until you can understand what's happening.

Then wire the component parameter to the persistent page property. I've hit
odd stuff before when I've had the same page property name as component
parameter name.


Jon




> -----Original Message-----
> From: Ken nashua [mailto:nhhockeyplayer@hotmail.com]
> Sent: Tuesday, October 09, 2007 3:48 PM
> To: users@tapestry.apache.org
> Subject: propertyselection not cached
> 
> 
> Folks,
> 
> I have a propertyselection component rigged with 1,2,3,4,5...
> 
> Everytime I select from my propertyselection... the this.form.submit()
> listener gets called... but my property gets reset. Nothing sticks...
> 
> Gallery.JAVA
>     public IPage onFormSubmit (IRequestCycle cycle) {
>         IPage page = cycle.getPage();
>         return page;
>     }
> 
> Any ideas? My rendering is fine...Template follows:
> 
> Best regards
> Ken in nashua
> 
> <span jwcid="$content$">
> 
>     <span jwcid="autoPagingContent@Block">
>         <table width="100%" border=1>
>             <tr>
>                 <td width="25%" align="left" NOWRAP>
>                     <span jwcid="@Insert" value="Table Size"/>
>                     <select jwcid="@PropertySelection"
> model="ognl:@org.trails.demo.components.Gallery@tableSizeModel"
> value="ognl:tableSize" onchange="javascript:this.form.submit();"></select>
>                     <span jwcid="@Insert" value="Paging Span"/>
>                     <select jwcid="@PropertySelection"
> model="ognl:@org.trails.demo.components.Gallery@pagingSpanModel"
> value="ognl:pagingSpan"
> onchange="javascript:this.form.submit();"></select>
>                 </td>
>                 <td align="left" NOWRAP>
>                     <a jwcid="@DirectLink" listener="listener:onBegin"
> style="fontSize:15px;"> <span jwcid="@Insert" value="<<"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPrev">
> <span jwcid="@Insert" value="<"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPage"
> parameters="ognl:1"> <span jwcid="@Insert" value="ognl:1"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPage"
> parameters="ognl:2"> <span jwcid="@Insert" value="ognl:2"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPage"
> parameters="ognl:3"> <span jwcid="@Insert" value="ognl:3"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPage"
> parameters="ognl:4"> <span jwcid="@Insert" value="ognl:4"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onPage"
> parameters="ognl:5"> <span jwcid="@Insert" value="ognl:5"/> </a>
>                     <a jwcid="@DirectLink" listener="listener:onNext">
> <span jwcid="@Insert" value=">"/>  </a>
>                     <a jwcid="@DirectLink" listener="listener:onEnd">
> <span jwcid="@Insert" value=">>"/> </a>
>                 </td>
>             </tr>
>         </table>
>     </span>
> 
>     <span jwcid="collectionContent@Block">
>         <table width="100%">
>             <tr>
>                 <span jwcid="foreach@For" source="ognl:collection"
> value="ognl:currentObject" index="ognl:index">
>                     <span jwcid="@If" condition="ognl:(index % tableSize)
> == 0">
>                         <span jwcid="@Insert" value="</tr><tr>"
> raw="true"/>
>                     </span>
>                     <td>
>                     <a jwcid="editLinkElse@LinkSubmit"
> listener="listener:edit" parameters="ognl:currentObject">
>                         <img jwcid="@Image"
>                              image="ognl:photoAsset"
>                              alt="ognl:currentObject.demographics.city"
>                              title="ognl:currentObject.demographics.city"
> width="160" height="110"
>                              />
>                     </a>
>                     </td>
>                 </span>
>             </tr>
>         </table>
>     </span>
> 
>     <form jwcid="galleryForm@Form" listener="listener:onFormSubmit">
>         <div jwcid="@RenderBlock"
> block="ognl:components.autoPagingContent"/>
>         <div jwcid="@RenderBlock"
> block="ognl:components.collectionContent"/>
>         <div jwcid="@RenderBlock"
> block="ognl:components.autoPagingContent"/>
>     </form>
> 
> _________________________________________________________________
> Help yourself to FREE treats served up daily at the Messenger Café. Stop
> by today.
> http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_Oct
> WLtagline


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