Ejemplo n.º 1
0
 private String getOtherSelectedCaseEffectiveId(XFormsSwitchControl switchControl1) {
   if (switchControl1 != null && switchControl1.isRelevant()) {
     final String selectedCaseId =
         ((XFormsSwitchControlLocal) switchControl1.getInitialLocal()).selectedCaseControlId;
     return XFormsUtils.getRelatedEffectiveId(switchControl1.getEffectiveId(), selectedCaseId);
   } else {
     return null;
   }
 }
Ejemplo n.º 2
0
 /**
  * Get the effective id of the currently selected case.
  *
  * @return effective id
  */
 public String getSelectedCaseEffectiveId() {
   if (isRelevant()) {
     final XFormsSwitchControlLocal local = (XFormsSwitchControlLocal) getCurrentLocal();
     if (local.selectedCaseControlId != null) {
       return XFormsUtils.getRelatedEffectiveId(getEffectiveId(), local.selectedCaseControlId);
     } else {
       throw new OXFException("Selected case was not set for xf:switch: " + getEffectiveId());
     }
   } else {
     return null;
   }
 }