0
有人會在我的代碼下面發現任何問題嗎?操作deleteInfectionLink被調用,但首先應該設置屬性infectionLinkToDelete。然而,這從來沒有被稱爲。a4j:actionparam assignTo未解僱
<rich:contextMenu attachTo="#{barmodel.id}" event="oncontextmenu" submitMode="ajax" style="z-index:9999;">
<rich:menuGroup value="#{messages['iov.delete_link_with']}">
<rich:menuItem submitMode="server">
<a4j:repeat value="#{barmodel.infection.infectionsSinglemedicationhistories.toArray()}" var="infLink">
<a4j:commandLink ajaxSingle="true" immediate="true" action="#{historyLinkController.deleteInfectionLink()}">
<a4j:actionparam assignTo="#{historyLinkController.infectionLinkToDelete}" name="linkToDelete" value="#{infLink.id}" />
<h:outputText value="#{infLink.singlemedicationhistory.startDate}" >
<f:convertDateTime pattern="MM/dd "/>
</h:outputText>
<h:outputText value="#{infLink.singlemedicationhistory.name}" />
</a4j:commandLink><br />
</a4j:repeat>
</rich:menuItem>
</rich:menuGroup>
</<rich:contextMenu>
酒店infLink.id是下面的類
@Embeddable
public class InfectionsSinglemedicationhistoryId
implements
java.io.Serializable {
private long infectionid;
private long therapyid;
//getters and setters
}
謝謝邁克!它實際上是這樣工作的! – gadeynebram 2012-03-01 13:47:26