Skip to content

Commit

Permalink
#842 command buttons should work even if they are in a tab
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed Aug 22, 2017
1 parent 4cd183d commit b81e70e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/main/java/net/bootsfaces/component/tab/TabRepeat.java
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,11 @@ public boolean invokeOnComponent(FacesContext faces, String clientId,

@Override
public boolean visitTree(VisitContext context, VisitCallback callback) {

if (this.getVar() == null) {
return super.visitTree(context, callback);
}

// First check to see whether we are visitable. If not
// short-circuit out of this subtree, though allow the
// visit to proceed through to other subtrees.
Expand Down Expand Up @@ -842,7 +847,6 @@ private void validateIterationControlValues(int rowCount,


private boolean visitChildren(VisitContext context, VisitCallback callback) {

Integer begin = this.getBegin();
Integer end = this.getEnd();
Integer step = this.getStep();
Expand Down Expand Up @@ -884,14 +888,19 @@ private boolean visitChildren(VisitContext context, VisitCallback callback) {
}


public void processDecodes(FacesContext faces) {
if (!this.isRendered())
return;
this.setDataModel(null);
if (!this.keepSaved(faces)) this.childState = null;
this.process(faces, PhaseId.APPLY_REQUEST_VALUES, null);
this.decode(faces);
}
public void processDecodes(FacesContext faces) {
if (null == this.getVar()) {
super.processDecodes(faces);
} else {
if (!this.isRendered())
return;
this.setDataModel(null);
if (!this.keepSaved(faces))
this.childState = null;
this.process(faces, PhaseId.APPLY_REQUEST_VALUES, null);
this.decode(faces);
}
}

public void processUpdates(FacesContext faces) {
if (!this.isRendered()) return;
Expand Down

0 comments on commit b81e70e

Please sign in to comment.