0 Replies Latest reply on Jun 20, 2008 5:01 PM by bgregory

    Inplace Input [attempted]

      Here is some code that I've written in an attempt to set an inplace input:

       HtmlSpan span = (HtmlSpan)client.getElement(controlId);
       // Click the span control to activate & display text input
       span.focus();
       span.click();
       // Set text into tempValue field
       HtmlTextInput text = (HtmlTextInput)span.getFirstByXPath("//input[contains(@id,'"+controlId+"tempValue')]");
       text.focus();
       text.select();
       text.type(value);
       text.blur();
      
       // Click 'ok' button [itemsPerPageControlok]
       HtmlImageInput img = (HtmlImageInput)span.getFirstByXPath("//input[contains(@id,'"+controlId+"ok')]");
       img.focus();
       img.click();
      


      Here is the control declaration:

       <rich:inplaceInput id="controlId" value="#{backingBean.value}" showControls="true">
       <a4j:support id="controlActionListener" event="onviewactivated" ajaxSingle="true"
       actionListener="#{backingBean.doAction}"
       reRender="panel1,panel2"/>
       </rich:inplaceInput>
      


      It appears to be doing most of what it should, but it doesn't set the value, and it doesn't call the a4j:support method. It does appear to reload the page, which is very strange since I thought it was the actionlistener that caused that. [?]

      I will try to isolate this in an example project.