I've written a small piece of code to reproduce the second empty
t:formdata hidden field :
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<body>
<t:form zone="myzone">
<t:label for="field1"/> : <t:textfield t:id="field1"/>
<t:checkbox t:id="moreFieldsSwitch" t:mixins="triggerfragment"
fragment="moreFields"/>
<t:label for="moreFieldsSwitch">more fields ?</t:label>
<t:formfragment t:id="moreFields" visible="moreFieldsSwitch">
<t:label for="field2"/> : <t:textfield t:id="field2"/>
</t:formfragment>
<input type="submit"/>
</t:form>
</body>
</html>
public class TestFragment {
@Persist @Property private String field1;
@Persist @Property private String field2;
@Persist @Property private boolean moreFieldsSwitch;
}
This results in the following XHR response seen in Firebug :
field1 test
field2
moreFieldsSwitch on
t:formdata
H4sIAAAAAAAAAFvzloG1XJRBOCS1uMStKDE9NzWvxCotMzUnxbC4iME0vyhdL7EgMTkjVa8ksQCopqjSVC85vyg1JzNJLymxOFXPMQkomJhc4gbSoxKcWlJaoBp6mPuh6PE/TAyMPgzcyfl5JUX5OX6JuaklDEI+WYllifo5iXnp+sElRZl56dYVBSUMbBAbcTvEkVSHBBTlJ6cWFweXJuVmFhdn5ucdXpdikvZt3jkmBoaKgnJ5BlkUi3KBJoEtKy4uzyxJziguZKhjYChhEABJgE0sDgZLENQJ0sgKACYX5qFWAQAA
t:formdata
H4sIAAAAAAAAAFvzloG1XJRBOCS1uMStKDE9NzWvxCotMzUnxai4iME0vyhdL7EgMTkjVa8ksQCopqjSVC85vyg1JzNJLymxOFXPMQkomJhc4gbSoxKcWlJaoBp6mPuh6PE/TAyMPgzcyfl5JUX5OX6JuaklDEI+W
and the second t:formdata is a copy of the first one or is empty. It
seems to depend of the initial state of the fragment.
Stephane
Howard Lewis Ship a écrit :
Very odd that you could end up with an empty t:formdata hidden field.
On Sun, Nov 9, 2008 at 6:00 AM, Stephane Decleire
<[EMAIL PROTECTED]> wrote:
It seems that my problem is linked to the correction of the JIRA issue 2563
: https://issues.apache.org/jira/browse/TAPESTRY-2563
What is very strange is that there is 2 t:formdata in the XHR post : here is
the firebug post listing :
endDateSearch
searchLevel SIMPLE
select BabysitterReguliere
select_0 FR
startDateSearch
submitRubricSelection
t:formdata
H4sIAAAAAAAAAJ2TMUvDQBiGPwWLWnUQnKS4KILWVKWK6FQEXYqIwVkul6/1JM3Fu0tTHfwP/gF/gTjo3sEOQgf/gz/ASXBS8JIzohRa2+mS9+N7n/fekNtXGInmIEdcWSgzqbapYAoFI5ZEIuiph3X0pIAtLqoWCQg9RUuRAKUSFxsW5QI95uizFnAffSWtI+Iyvi94GMzbqMLgerWZf5h6exyGoTJkKfeV4N4BqaGC6fIZqZOCR/xqwVaC+dWdRqAga8jlmPyfaMUBoq21G+32vf3ZHAZoBNEiLHRSROgIRiV6SJVlDk3b6EpziESr5GiRULXH0HNNCwvHrezLzNNHRwvncAVD8a0zhtBPlFK/UQ4FpyilHTo1JiXjfuvOLVbeb55NC5tQ7IWON9VvSZvI+A4ZBTNmepRM7XQ6qGtsOh4VYb1zuYr855nyUHd58bea70Cj5vVkdTAbkyAPS91XL1lAuYuVuOGUPKHFXS0mtfdnYagrsNx9xXRGXFfoD5piJ41aMmqfJgacg9nOHR8j88uloDGt2InSYyEx/QJ+L5QrZAQAAA==
t:formdata
zipCodeField
Without the second empty t:formdata, i think that my zone would be updated
nicely ...
Stephane
Stephane Decleire a écrit :
I get the following error when trying to refresh a Zone in my application
while the user session has expired :
org.apache.tapestry5.runtime.ComponentEventException
Forms require that the request method be POST and that the t:formdata
query parameter have values.
Any idea on how and where i can handle this exception to show the user a
better result than a blank zone ?
Thanks in advance.
Stephane