Topic
1 reply Latest Post - ‏2014-09-20T11:43:21Z by jitupkp
HariprasadChirumamilla
1 Post
ACCEPTED ANSWER

Pinned topic How can we submit two panelgroups using hx:behavior

‏2012-03-15T08:57:02Z |
Hi all,

I want to submit two panelgroups using single hx:behavior. I have tried in the following way. its refreshing the two panels.but, commandbutton action is performing two times.

<h:form>
<hx:hx:scriptCollector>
<h:panelGroup id="hdrMsgRefresh">
<h:messages layout="table" showDetail="true" style="color: red"
showSummary="false" />
<hx:ajaxRefreshSubmit target="hdrMsgRefresh"></hx:ajaxRefreshSubmit>
</h:panelGroup>
<%-- here we have more than 10 jsp:include tags --%>

<h:panelGroup id="line">
<jsp:include page="/jsp/subview.jsp />
<hx:ajaxRefreshSubmit id="Lineitemajax" target="line"></hx:ajaxRefreshSubmit>
</h:panelGroup>

</hx:scriptCollector>
</h:from>

and inside subview.jsp we have a command button.

<h:commandButton id="addLineItemSummary" style="CURSOR:hand"
action="#{claimsControllerBean.addLineItem}" onclick="javascript:flagWarn=false;" styleClass="add_icon" title="Add" value=" " onmousedown="javascript:focusThis(this.id);" >
<hx:behavior event="onclick" behaviorAction="get;get" targetAction="line;hdrMsgRefresh"></hx:behavior>
</h:commandButton>
if i clicked on the above button i want to submit two panelgroups. its submitting successfully.but, command button action is performing two times.if anything i did wrong.please help me on this...