Note that there are some explanatory texts on larger screens.

plurals
  1. POWicket: Showing the button during Ajax response
    text
    copied!<p>I have the problem related to showing the button on the page. There are two buttons called “Upload” and “Save”. On the beginning “Upload” button is visible, while Save button has .setVisible(false).</p> <pre><code>… &lt;tr&gt; &lt;td width="35%" align="right"&gt; &lt;input type="submit" wicket:id="createUploadButton" value="Upload" class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all"/&gt; &lt;/td&gt; &lt;td width="30%" align="right"&gt; &lt;/td&gt; &lt;td width="35%" align="left"&gt; &lt;input type="submit" wicket:id="createCancelButton" value="Cancel" class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all"/&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>During the AjaxRequest of Upload button it is necessary to show “Save” button and to hide Upload button, but there is the error. Code snippet is shown below:</p> <pre><code>AjaxButton createSaveButton=new IndicatingAjaxButton("createSaveButton"){ private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form&lt;?&gt; form) { // TODO Auto-generated method stub } }; createSaveButton.setVisible(uploaded); createSaveButton.setOutputMarkupId(true); form.add(createSaveButton); AjaxButton createUploadButton=new IndicatingAjaxButton("createUploadButton"){ private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form&lt;?&gt; form) { … createUploadButton.setVisible(false); createSaveButton.setVisible(true); target.addComponent(createUploadButton); target.addComponent(createSaveButton); } createUploadButton.setOutputMarkupId(true); form.add(createUploadButton); </code></pre> <p>Does somebody know where the problem is?</p> <p>Thanks! Sonja</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload