Hi,

 

I have a DatePicker inside an AjaxForm, the form is hidden by default with a button that displays it.

In the form there's a cancel button that hides the form.

Whenever the cancel button is pressed the page fails to render and I get some js errors like:

"dojo is not defined", "Tapestry is not defined"

And also the message: duplicate attribute, "Rewind of form MyAjaxPage/paletteForm expected only 0 form elements, but an additional id was requested by component MyAjaxPage/searchFromDate"
 
The html code is as follows:

<form jwcid="@Form">

<input jwcid="@Submit" listener="listener:showForm" value="Show Form"/>

</form>

<br/><br/>

<span jwcid="@Any" id="formDivAjax">

<div jwcid="@Any" id="formDiv" style="ognl:showForm">

        <form jwcid="paletteForm">
                <input jwcid="searchFromDate" type="text" size="20" maxlength="20"/>
               <input jwcid="@Submit" value="Cancel" listener="listener:onCancel"/>
        </form>
     </div>
</span>
 
The relevant java code:
@InitialValue("ognl:false")
public abstract boolean getIsShowForm();
public abstract void setIsShowForm(boolean isShow);
 
public String getShowForm() {
    if (getIsShowForm()) {
      return "display: inline";
    } else {
      return "display: none";
    }
}
 
public void onCancel() {
        setIsShowForm(false);
}

 

The page specification:

<component id="paletteForm" type="tacos:AjaxForm">

      <binding name="listener" value="listener:onFormSubmit"/>

<binding name="updateComponents" value="{'formDivAjax'}"/>

</component>

<component id="searchFromDate" type="tacos:DatePicker">

    <binding name="value" value="searchFromDate"/>

</component>

 

How can I solve this?

 

Thanks,

 

Jonathan Bullkich

Reply via email to