| Chunk |
|---|
| Conflicting content |
|---|
public Integer getBegin(){
return 0;
}
<<<<<<< HEAD
// default 1
public Integer getStep() {
return null;
}
// ZK-2552: for internal use only
// the old index is used to distinguish with other expression.
public int getCurrentIndex(Component comp, int oldIndex) {
int result = -1;
if (comp instanceof Listitem) {
result = ((Listitem) comp).getIndex();
} else if (comp instanceof Row) {
result = ((Row) comp).getIndex();
} else if (comp instanceof Treeitem) {
result = ((Treeitem) comp).getIndex();
} else
result = comp.getParent().getChildren().indexOf(comp);
return result;
}
public boolean isFirst() {
return getCount() == 1;
}
public boolean isLast() {
return (getIndex() + 1) == getEnd();
}
public Object getEach() {
return getCurrent();
}
public int getCount() {
return getIndex() + 1;
}
=======
>>>>>>> 6fa166a579c3a0983097f8a795b253c47a99a417
} |
| Solution content |
|---|
public Integer getBegin(){
return 0;
}
// default 1
public Integer getStep() {
return null;
}
// ZK-2552: for internal use only
// the old index is used to distinguish with other expression.
public int getCurrentIndex(Component comp, int oldIndex) {
int result = -1;
if (comp instanceof Listitem) {
result = ((Listitem) comp).getIndex();
} else if (comp instanceof Row) {
result = ((Row) comp).getIndex();
} else if (comp instanceof Treeitem) {
result = ((Treeitem) comp).getIndex();
} else
result = comp.getParent().getChildren().indexOf(comp);
return result;
}
public boolean isFirst() {
return getCount() == 1;
}
public boolean isLast() {
return (getIndex() + 1) == getEnd();
}
public Object getEach() {
return getCurrent();
}
public int getCount() {
return getIndex() + 1;
}
} |
| File |
|---|
| AbstractForEachStatus.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
} else {
final Binder binder = BinderUtil.getBinder(comp, true);
if (binder == null) return; //no binder
<<<<<<< HEAD
// ZK-2552: use an expression instead of solid number to represent index
final String expression;
if (comp.getAttribute(IS_TEMPLATE_MODEL_ENABLED_ATTR) != null) {
expression = BindELContext.getModelName(modelOwner)
+ "[self.getAttribute('" + CURRENT_INDEX_RESOLVER_ATTR + "').getCurrentIndex(self, "+ index+")]";
} else {
expression = BindELContext.getModelName(modelOwner)+"["+index+"]";
}
=======
final String expression = BindELContext.getModelName(modelOwner)+"["+index+"]";
>>>>>>> 6fa166a579c3a0983097f8a795b253c47a99a417
//should not use binder.addReferenceBinding(comp, varnm, expression, null); here, it will mark comp bound.
//it is safe that we set to comp attr here since the component is created by renderer/binder.
comp.setAttribute(varnm, new ReferenceBindingImpl(binder, comp, varnm, expression)); //reference |
| Solution content |
|---|
} else {
final Binder binder = BinderUtil.getBinder(comp, true);
if (binder == null) return; //no binder
// ZK-2552: use an expression instead of solid number to represent index
final String expression;
if (comp.getAttribute(IS_TEMPLATE_MODEL_ENABLED_ATTR) != null) {
expression = BindELContext.getModelName(modelOwner)
+ "[self.getAttribute('" + CURRENT_INDEX_RESOLVER_ATTR + "').getCurrentIndex(self, "+ index+")]";
} else {
expression = BindELContext.getModelName(modelOwner)+"["+index+"]";
}
//should not use binder.addReferenceBinding(comp, varnm, expression, null); here, it will mark comp bound.
//it is safe that we set to comp attr here since the component is created by renderer/binder.
comp.setAttribute(varnm, new ReferenceBindingImpl(binder, comp, varnm, expression)); //reference |
| File |
|---|
| AbstractRenderer.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Object oldIter = owner.getAttribute(itervarnm); owner.setAttribute(varnm, data); owner.setAttribute(itervarnm, iterStatus); <<<<<<< HEAD // For bug ZK-2552 Component insertBefore = null; List |
| Solution content |
|---|
Object oldIter = owner.getAttribute(itervarnm); owner.setAttribute(varnm, data); owner.setAttribute(itervarnm, iterStatus); // For bug ZK-2552 Component insertBefore = null; List |
| File |
|---|
| BindChildRenderer.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| Comment |
| If statement |
| Method invocation |
| Variable |