You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2006/05/27 12:19:26 UTC

@Persist never works for Serializable.

hi all
  I have  a query form and a contrib:Table in one page.

java:

@Persist("client")
@InitValue("new corner.sandbox.model.BlogEntity()")
public abstract BlogEntity getTestEntity();
public abstract void setTestEntity(BlogEntity entity);

page:
<component type="TextField" id="blogTitleField">
        <binding name="translator" value="translator:string"/>
        <binding name="value" value="ognl:testEntity.blogTitle"/>
</component>
html:
<form jwcid="BlogEntityQueryForm">
            <input jwcid="blogTitleField"/>
            <input type="submit"/>
</form>


I query database by the testEntity.

criteria.add(ExpressionExample.create(this.getTestEntity()).enableLike()
                    .ignoreCase());

The first search ,it woks fine.When I click the page link
(@contrib:TablePages) ,It wil show all records.
My entity class is
public class BlogEntity implements  Serializable {
            ....................
}


How to fix it?

Thanks.





-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net