Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-03-19T06:01:40Z by SwapnilSingh2012
SwapnilInfinite
SwapnilInfinite
1 Post
ACCEPTED ANSWER

Pinned topic In single ajax call i need to submit on form and refresh the second form.

‏2012-03-15T06:40:36Z |
I tried using the <hx:ajaxRefershRequest> for one and <hx:ajaxRefreshSubmit>, but i m unable to refresh form 2, SEE the below code and suggest ,
<h:panelGroup id="hdrmessages" >

<h:messages id="CLMADMMS7" layout="table" showDetail="true"
style="color: red" showSummary="false" />

<hx:ajaxRefreshRequest target="hdrmessages" id="ajaxRefrshRqest3" >
</hx:ajaxRefreshRequest>

</h:panelGroup>
<h:panelGroup id="headeroverrideexception">

<jsp:include page="/jsp/claimentry/commonclaimentry/claimOverrideException.jsp" />

<hx:ajaxRefreshSubmit id="overridexcptnajax" target="headeroverrideexception" />

</h:panelGroup>

<h:commandButton title="Add" id="lineItemAddButton" value=" "
style="CURSOR:hand;" onclick="javascript:flagWarn=false;"
action="#{claimsControllerBean.addLineItem}" styleClass="add_icon"
onmousedown="javascript:focusThis(this.id);javascript:addeditrow('claimForm');javascript:flagWarn=false;">

<hx:behavior event="onclick" behaviorAction="get;get" targetAction="headeroverrideexception;hdrmessages" />

</h:commandButton>

when action is perform ajax is successfully submitting the form but the first panel is not refreshed.
Thanks inAdvance for Help
Updated on 2012-03-19T06:01:40Z at 2012-03-19T06:01:40Z by SwapnilSingh2012
  • SystemAdmin
    SystemAdmin
    6420 Posts
    ACCEPTED ANSWER

    Re: In single ajax call i need to submit on form and refresh the second form.

    ‏2012-03-15T13:32:44Z  in response to SwapnilInfinite
    Are you sure the second ajax request isn't being made (you can check by using Firefox with Firebug enabled).

    The messages generated by the first ajax submit call are not going to persist and be available for the second call.

    You need to either include the messages tag inside the panel being submitted, or you need to modify the action used on the submit to save the messages so that future ajax calls can see them.
    • SwapnilSingh2012
      SwapnilSingh2012
      1 Post
      ACCEPTED ANSWER

      Re: In single ajax call i need to submit on form and refresh the second form.

      ‏2012-03-19T06:01:40Z  in response to SystemAdmin
      I tested in Mozilla Firefox with firebug enabled its calling ajax single time, but still i need to display messages twice one for field level and other for header level.