I'm sure this has been asked before, but why isn't my "paging through the
results" code working using a stripes:hidden field?  In my action bean I
have a setter for newOffset and a getter for offset.  In the jsp I add 20
to offset and set newOffset to that.  My jsp has this:


${actionBean.offset}
    <stripes:form
beanclass="com.objecteffects.template.web.action.PostsActionBean">
<%--
        <input
            name="newOffset"
            value="${actionBean.offset + 20}"
            type="hidden"
        />
--%>

        <stripes:hidden
            name="newOffset"
            value="${actionBean.offset + 20}"
        />

In my action bean its handler forwards to this jsp and has the setter and
getter:


        return new ForwardResolution(PostsActionBean.VIEW);
    }

    public void setNewOffset(final long newOffset) {
        this.offset = newOffset;
    }

    public long getOffset() {
        return this.offset;
    }

There's no getter for newOffset and no setter for offset.

The first time on the page offset is 0 as it should be and when I submit
the form the action bean gets 20 for newOffset and then the jsp gets 20,
but then it stays at 20 each time I submit the page.

If I use the plain regular input (commented out in the above) then it works
fine.

Here are the full files:

https://code.google.com/p/oauth2-test/source/browse/trunk/template/template-web/src/main/java/com/objecteffects/template/web/action/PostsActionBean.java

https://code.google.com/p/oauth2-test/source/browse/trunk/template/template-web/src/main/webapp/WEB-INF/jsp/posts.jsp
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to