Actually, I've had success in have an editable grid even in the time of
the first Tapestry 5 alphas, using TextField and friends plus passing a
ValueEncoder and not using inplace="true". As Lance said, you'll either
need to write some JavaScript that submits the form when it's paged *or*
just consider the data will be lost when paging if the submit button is
not clicked.
On Tue, 21 Oct 2014 07:37:19 -0200, Lance Java <lance.j...@googlemail.com>
wrote:
Firstly, the pager links will not POST your form so even without this
exception you will lose form values when paging / sorting.
Secondly, adding dynamic fields to a tapestry form is tricky so it's best
to understand your needs before answering.
I'd possibly say the easiest solution would be to use a plain html input
(not a TextField component) and use a javascript listener to store all
values in a hidden field / javascript variable which is POSTed when the
save button is clicked.
On 20 Oct 2014 13:25, "akshay" <akshayestat...@gmail.com> wrote:
Hi,
I am trying to implement an editable grid. I have referenced Jump Start
example:-
http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editablegrid1
My code logic-
<form t:type="form" t:id="prefForm">
<t:grid source="preferences" row="preference"
include="name, value" inplace="true">
<p:ValueCell>
<input t:type="TextField" t:id="preferenceValue"
t:value="preference.value" />
</p:ValueCell>
</t:grid>
</form>
I have to use inplace="true", so that there is an ajax loading of table
without the page being reloaded again.
But the problem comes, when I try to switch to another page within the
table, I get the following error:-
component config/Console:preferencesconsole.preferencevalue must be
enclosed by a Form component.
at
org.apache.tapestry5.corelib.base.AbstractField.setup(AbstractField.java:192)
at
org.apache.tapestry5.corelib.base.AbstractField.setupRender(AbstractField.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:176)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:145).
I know that the problem is with the usage of inplace="true", but I
need it
in my case.
Anyone who faced similar issue or has a solution for such a case.
Regards And Thanks
Akshay
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org