|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UICommand ilog.rules.teamserver.web.components.property.IlrPropertyEditor
public class IlrPropertyEditor
IlrPropertyEditor
is the base class for property editing in
the Decision Center web client.
IlrPropertyEditor
:
public void encodeValueField(FacesContext context, UIComponent component, boolean checkPermission) throws IOException, IlrApplicationException { log.log(Level.WARNING, "Start encodeValueField"); IlrPropertyEditor editor = (IlrPropertyEditor) component; if (checkPermission && !editor.isPermissionGranted()) super.encodeValueField(context, component, checkPermission); else { ResponseWriter writer = context.getResponseWriter(); EStructuralFeature p = editor.getProperty(); // Get the correct key of the property to set String key = component.getParent().getClientId(context) + "_" + //work around a jsf bug : sometimes 2 different components get the same generated id. component.getClientId(context) + "_" + p.getName(); // Get the current string value of the property to be used in JavaScript // Be aware that editor.getValueString() returns the value ready to be shown in HTML String value = ""; if (editor.getValue() != null) value = (editor.getValue()).toString(); // Write HTML code with a JavaScript function to set the property value writer.write(...); ... } }
Field Summary |
---|
Fields inherited from class javax.faces.component.UICommand |
---|
COMPONENT_TYPE |
Method Summary | |
---|---|
IlrCommitableObject |
getCommitableObject()
|
IlxWComponent |
getComponent()
|
IlrCommitableObject |
getComposedElement()
Gets the commitable object currently being edited. |
org.eclipse.emf.ecore.EClass |
getEClass()
|
org.eclipse.emf.ecore.EStructuralFeature |
getProperty()
Returns the EMF property rendered by this editor. |
String |
getPropertyName()
Returns the name of the property. |
Object |
getValue()
Returns the value rendered by this editor. |
String |
getValueString()
Retrieves an HTML ready String for the value displayed by
this editor. |
boolean |
isAggregatedProperty()
Checks if the property of this editor is aggregated. |
boolean |
isPermissionGranted()
Checks if the current user has the rights to edit an element. |
boolean |
isValueChanged()
|
void |
setCommitableObject(IlrCommitableObject commitableObject)
|
void |
setComponent(IlxWComponent component)
|
void |
setValue(Object value)
Sets the value to be rendered by this editor. |
void |
setValueChanged(boolean valueChanged)
|
Methods inherited from class javax.faces.component.UICommand |
---|
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getFamily, isImmediate, queueEvent, removeActionListener, restoreState, saveState, setAction, setActionListener, setImmediate |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isAggregatedProperty()
false
.public org.eclipse.emf.ecore.EClass getEClass()
public IlrCommitableObject getCommitableObject()
public void setCommitableObject(IlrCommitableObject commitableObject)
public boolean isValueChanged()
public void setValueChanged(boolean valueChanged)
public IlrCommitableObject getComposedElement()
ilog.rules.teamserver.web.components.property.PropertyEditor
This method will be used only when this component is in "editor" mode, meaning that it is embedded in an IlrUIElementDetailsEditor component.
getComposedElement
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
public String getValueString() throws IlrApplicationException
String
for the value displayed by
this editor.
IlrApplicationException
- if there is a problem on the server.
String
representing the value.public boolean isPermissionGranted()
isPermissionGranted
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
true
is returned.public void setValue(Object value)
setValue
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
setValue
in class javax.faces.component.UICommand
value
- The value to render.public org.eclipse.emf.ecore.EStructuralFeature getProperty()
getProperty
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
public String getPropertyName()
getPropertyName
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
public Object getValue()
getValue
in interface ilog.rules.teamserver.web.components.property.PropertyEditor
getValue
in class javax.faces.component.UICommand
public IlxWComponent getComponent()
public void setComponent(IlxWComponent component)
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |