Showing posts with label AttributeComponentChange. Show all posts
Showing posts with label AttributeComponentChange. Show all posts
Wednesday, July 10, 2013
ADF disclosed property problems in showDetailItem after enabling MDS
After MDS is enabled in ADF, If you have logic to show or hide showDetailItem using tab.setDisclosed(), it might not work.
To solve this issue.
import org.apache.myfaces.trinidad.change.AttributeComponentChange;
import org.apache.myfaces.trinidad.change.ChangeManager;
import org.apache.myfaces.trinidad.change.ComponentChange;
import org.apache.myfaces.trinidad.context.RequestContext;
…
…
ChangeManager changeManager = RequestContext.getCurrentInstance().getChangeManager(); ComponentChange disclosed = new AttributeComponentChange("disclosed",Boolean.TRUE); ComponentChange undisclosed = new AttributeComponentChange("disclosed",Boolean.FALSE); changeManager.addComponentChange(FacesContext.getCurrentInstance(), tabA,disclosed); changeManager.addComponentChange(FacesContext.getCurrentInstance(), tabB,undisclosed); AdfFacesContext.getCurrentInstance().addPartialTarget(tabA); AdfFacesContext.getCurrentInstance().addPartialTarget(tabB);
Subscribe to:
Posts (Atom)