I believe there is already an answer to this in the earlier threads in the forum. You can search for this.
On Nov 23, 2011, at 12:19 PM, Ville <ville.virta...@cerion.fi> wrote: > Hi, > > we have grid inside form and we get this error: > > Caused by: java.lang.IllegalStateException: The rendered content did not > include any elements that allow for the positioning of the hidden form > field's element. > at > org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:90) > at org.apache.tapestry5.corelib.components.Zone.afterRender(Zone.java:226) > at org.apache.tapestry5.corelib.components.Zone.afterRender(Zone.java) > ....... > > The form is wrapped inside zone and the grid is inside second zone. We know > the partial form updates are not supported without form fragment etc., but > we only want to display data via the grid inside the form, and be able to > update it with ajax (hence the other zone). > > The structure is: > > zone > form > zone > grid > > Now I thought that if I just make the grid volatile, everything would be ok. > However, the stack leads to zone that tries to alter the form hidden input. > Then I found this in grid: > .... > 442 Object setupRender() > 443 { > 444 if (formSupport != null) > 445 formSupport.store(this, SETUP_DATA_SOURCE); > 446 > 447 setupDataSource(); > .... > > Is this intentional - even if the grid is volatile the formSupport is used > to store the setup data source event, which causes the zone to call the > hiddenFieldPositioner in row 226. > > If I change the code to this: > > Object setupRender() { > > setupDataSource(); > > // If there's no rows, display the empty block placeholder. > return null; > } > > everything works ok. So the if should be if (formSupport != null && > !volatile)? > > The real tml is here: > > <c:dialog t:id="organizationEditDialog" title="literal:Lisää uusi" > updateOnSuccess="organizationList" checkChangedValues="true"> > <c:errors /> > <c:ctextfield placeholder="Syötä koodi" c:label="literal:Koodi" > value="organizationToEdit.identifier" validate="required" /> > <c:ctextfield placeholder="Syötä tietovarastokoodi" > c:label="literal:Tietovarastokoodi" > value="organizationToEdit.externalIdentifier" validate="required" /> > <t:zone t:id="attrsZone" id="attrsZone"> > <t:grid t:id="attrs" inplace="true" > source="organizationToEdit.attributes" row="attribute" volatile="true" > formState="none" add="delete" include="name,description"> > <p:nameCell>${attrName}</p:nameCell> > <p:descriptionCell>${attrDescription}</p:descriptionCell> > <p:deleteCell><t:actionlink t:id="deleteAttr" > context="attribute.id" > zone="attrsZone">Poista</t:actionlink></p:deleteCell> > </t:grid> > </t:zone> > <div class="actions"> > <c:dialogsubmit class="btn primary" value="literal:Tallenna" > dialog="organizationEditDialog" /> > <c:dialogcloselink class="btn" > dialog="organizationEditDialog">Peruuta</c:dialogcloselink> > </div> > </c:dialog> > > The dialog defines the form, so it is not visible in this tml. > > So, is it time for another JIRA (with patch), or have I misunderstood > something? > > - Ville > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/T5-3-Volatile-grid-inside-form-tp5017357p5017357.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org