ADF :UI : PROGRESSINDICATOR
Static maxValue and dynamic value
pass from bean..
Jsff change
<af:progressIndicator id="pi1"
rendered="true"
value="#{viewScope.ProgressIndicatorBean.simpleBoundedRangeModel}"/>
Bean change
SimpleBoundedRangeModel
_simpleBoundedRangeModel;
public SimpleBoundedRangeModel getSimpleBoundedRangeModel() {
if (_simpleBoundedRangeModel == null){
_simpleBoundedRangeModel = new SimpleBoundedRangeModel();
_simpleBoundedRangeModel.setValue(90);
}
return _simpleBoundedRangeModel;
}
SimpleBoundedRangeModel
public class SimpleBoundedRangeModel
extends DefaultBoundedRangeModel {
public SimpleBoundedRangeModel() {
super(0, 300);
}
public void start(ActionEvent event) {
setValue(1);
}
public void cancelProcess(ActionEvent event) {
setValue(0);
setMaximum(100);
}
}
Dynamic value and maxValue pass
from bean..
Jsff change
<af:progressIndicator
id="pi1" rendered="true"
value="#{viewScope.ProgressIndicatorBean.simpleBoundedRangeModel}"/>
Bean change
SimpleBoundedRangeModel
_simpleBoundedRangeModel;
public SimpleBoundedRangeModel
getSimpleBoundedRangeModel() {
if (_simpleBoundedRangeModel == null){
_simpleBoundedRangeModel = new
SimpleBoundedRangeModel(500L,200L);
}
return _simpleBoundedRangeModel;
}
SimpleBoundedRangeModel
public class
SimpleBoundedRangeModel extends DefaultBoundedRangeModel {
private static long max ;
private static long value;
public SimpleBoundedRangeModel(){
super();
}
public SimpleBoundedRangeModel(Long max
, Long value){
this.max = max;
this.value = value;
}
public void start(ActionEvent event) {
setValue(1);
}
public void cancelProcess(ActionEvent
event) {
setValue(0);
setMaximum(100);
}
@Override
public long getMaximum(){
return this.max;
}
@Override
public long getValue(){
return this.value;
}
}
public class
SimpleBoundedRangeModel extends DefaultBoundedRangeModel {
private static long max ;
private static long value;
public SimpleBoundedRangeModel(){
super();
}
public SimpleBoundedRangeModel(Long max
, Long value){
this.max = max;
this.value = value;
}
public void start(ActionEvent event) {
setValue(1);
}
public void cancelProcess(ActionEvent
event) {
setValue(0);
setMaximum(100);
}
@Override
public long getMaximum(){
return this.max;
}
@Override
public long getValue(){
return this.value;
}
}
No comments:
Post a Comment