Exemplo n.º 1
0
 @Override
 public void setValueExpression(String name, ValueExpression binding) {
   // var - not allowed name. must be literal.
   if ("var".equals(name)) {
     throw new FacesException(
         Messages.getMessage(Messages.VAR_MUST_BE_LITERAL, getClientId(getFacesContext())));
   }
   if ("event".equals(name)) {
     throw new FacesException(
         Messages.getMessage(Messages.EVENT_MUST_BE_LITERAL, getClientId(getFacesContext())));
   }
   super.setValueExpression(name, binding);
 }
Exemplo n.º 2
0
 /**
  * After nornal setting <code>parent</code> property in case of created component set Ajax
  * properties for parent.
  *
  * @see javax.faces.component.UIComponentBase#setParent(javax.faces.component.UIComponent)
  */
 public void setParent(UIComponent parent) {
   super.setParent(parent);
   if (null != parent && parent.getFamily() != null) {
     if (log.isDebugEnabled()) {
       log.debug(Messages.getMessage(Messages.CALLED_SET_PARENT, parent.getClass().getName()));
     }
     // TODO If this comopnent configured, set properties for parent
     // component.
     // NEW created component have parent, restored view - null in My
     // faces.
     // and SUN RI not call at restore saved view.
     // In other case - set in restoreState method.
     // if (parent.getParent() != null)
     {
       if (log.isDebugEnabled()) {
         log.debug(Messages.getMessage(Messages.DETECT_NEW_COMPONENT));
       }
       setParentProperties(parent);
     }
   }
 }
Exemplo n.º 3
0
 /*
  * (non-Javadoc)
  *
  * @see javax.faces.component.UIComponentBase#decode(javax.faces.context.FacesContext)
  */
 public void decode(FacesContext context) {
   // Due to JSF RI 1.1 bug, clear cached clientId
   setId(getId());
   super.decode(context);
 }