By chance I used one for the first time this-morning.


I have:

<t:grid t:source="searchResults" t:rowsPerPage="10" t:rowIndex="rowIndex" t:empty="There are currently no search results" t:model="mymodel" t:row="listItem">
...
                        <t:parameter t:name="viewMetadataCell">
                                <t:ActionLink t:id="viewMetadata" 
t:context="rowIndex">
                                        &gt;
                                </t:ActionLink>
                        </t:parameter>
...

and code:

...
        @SuppressWarnings("unused")
        @Property
        @Persist
        private int rowIndex;
...

and it works just fine. Try it without explicit getters/setters (which is the only difference I can see between your code and mine) and see what happens.

p.


Quoting Geoff Callender <[EMAIL PROTECTED]>:

Has anyone been able to use Grid's rowIndex parameter in their page  class?
I see that it is supposed to be available from 5.0.15 (
https://issues.apache.org/jira/browse/TAPESTRY-1310  ) but I just
cannot make it work.

From my template:

        <form t:type="form">
                <table t:type="grid" t:source="persons" t:row="person"
t:rowindex="rowIndex">

and from my page class:

        private int _rowIndex;

        public int getRowIndex() {
                System.out.println(">>> getRowIndex(), _rowIndex = " + _rowIndex +  
")");
                return _rowIndex;
        }

        public void setRowIndex(int index) {
                System.out.println(">>> setRowIndex(" + index + ")");
                _rowIndex = index;
        }

but the getter and setter are never called - not during render and not
during form submission.  Any ideas?

Thanks,

Geoff




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to