i am trying to create a link to the newly created record, and the link i am including inside the success message panel after successful creation of the link, But i am unable to call the action using tag.

following is my peace of code:

<div class="panel-success">
<a4j:outputPanel id="succes_submit">
 <rich:notify stayTime="1000" rendered="#{user.accountsSaved}"
                styleClass="panel-success fsgui-input-panel-success">
<f:facet name="summary">
   <a4j:commandLink ajaxSingle="true" action="#{user.metod}"
         value="#{user.accSeriesInfo.number} :"oncomplete="#{rich:component('details-update')}.show();">                                   

<f:setPropertyActionListener target="#{orgseries.accSeriesInfo}" value="#{dataItem}" />
</a4j:commandLink>
<h:outputText value="Record updated successfully "></h:outputText>
</f:facet>
</rich:notify>
</a4j:outputPanel>
</div>

instead of a4j:commandLink i tried with h:commandLink here i am able to call the action but unable to render or perform onComplete operations.

Can any body tell me where is the mistake,

Thanks in advance.

有帮助吗?

解决方案

I found the solution to include the link in rich:notify tag

<div class="panel-success" id="success_submit_div">
<a4j:outputPanel id="stru_succes_submit">
 <rich:notify stayTime="1000" rendered="#{emp.saveSuccess}">
<f:facet name="summary">
<h:form>
<a4j:commandLink immediate="true" action="#{emp.getInfo}"  value="# {emp.empId}:"   oncomplete="#{rich:component('edit-Emp-Details')}.show();">
</a4j:commandLink>
<h:outputText value="#{ isEdit ? messages['common.app.save.success'] : messages['employee.create.success']}"></h:outputText>
</h:form>   
</f:facet>
</rich:notify>
</a4j:outputPanel>
</div>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top