| org.netbeans.modules.visualweb.insync.faces.FacesUnit org.netbeans.modules.visualweb.insync.faces.FacesPageUnit
FacesPageUnit | public class FacesPageUnit extends FacesUnit implements PropertyChangeListener(Code) | | An extended FacesUnit that adds in the ability to have a JSF bean being designed have source in
JSPX in addition to the regular Java source.
author: cquinn |
Inner Class :public class RenderError extends Error | |
Method Summary | |
protected void | bind() | protected void | bindBeanParents() | protected void | bindEventSets(List<Statement> stmts) | protected void | bindMarkupBeans(Element e) Bind all markup beans to their element and take care of parenting. | public boolean | canCreateBean(BeanInfo bi, Bean parent) | public void | destroy() | public void | dumpFacesComp(UIComponent uic, int indent) | public Element | findCompElement(String id) Return the child element with a given id attr within the page
Parameters: id - The id attrribute string. | protected static MarkupBean | firstBeanOfType(Bean bean, String tagName) Find the first occurance of a child bean with a given tag.
Parameters: bean - the parent bean whose children will be searched. Parameters: tagName - the tag name to search for. | protected static MarkupBean | firstBeanOfType(Bean[] beans, String tagName) Find the first occurance of a bean from a list, with a given tag.
Parameters: beans - the list of beans to be searched. Parameters: tagName - the tag name to search for. | final public String | getCompBinding(String bname) Get the component binding string for a given component bean name.
Parameters: bname - The component bean name. | public String | getDefaultLanguage() | public MarkupBean | getDefaultParent() Return the form bean associated with the unit. | public String | getEncoding() Get the effective response encoding for this unit. | public ParserAnnotation[] | getErrors() | public FacesBean | getFacesAncestorBean(Element e) the faces bean for a given faces tag element or any of its ancestors. | public FacesBean | getFacesBean(Element e) Get the faces bean for a given faces tag element.
Parameters: e - the tag element. | public static FacesBean | getFacesBean(DesignBean lb) Return the FacesBean for the live bean. | public FacesContext | getFacesContext() | public DocumentFragment | getFacesRenderTree(DesignBean lbean, LiveUnit lu) Get a complete render tree as a document fragment for a given component bean.
Parameters: lbean - The bean to render in DesignBean form. Parameters: lu - The LiveUnit that hosts the given bean. | public MarkupBean | getMarkupBean(Element e) Get the markup bean for a given faces tag element.
Parameters: e - the tag element. | public static MarkupMouseRegion | getMarkupMouseRegionForElement(Element element) | public MarkupUnit | getPageUnit() | public Exception | getRenderFailure() Return the exception associated with the most recent getFacesRenderTree call.
You should call this method immediately after a
FacesPageUnit.getFacesRenderTree call;
it will be overwritten by other requests. | public DesignBean | getRenderFailureComponent() Return the failing component associated with the most recent getFacesRenderTree call.
You should call this method immediately after a
FacesPageUnit.getFacesRenderTree call;
it will be overwritten by other requests. | public org.w3c.dom.Element | getRootElement() | public Object | getRootInstance() | public State | getState() the combined state of this unit. | public UIViewRoot | getViewRoot() Get the JSF page view root for this unit. | public boolean | isPage() | public boolean | isWriteLocked() | public void | moveBean(Bean bean, Bean newparent, Position pos) | protected Bean | newBoundBean(BeanInfo bi, String name, List<String> typeNames) | protected Property | newBoundProperty(Statement stmt) | protected Bean | newCreatedBean(BeanInfo bi, Bean parent, String name, String facet, Position pos) | public void | propertyChange(PropertyChangeEvent e) Listen for JSP encoding changes from the editor so that our layer can mirror the changes. | public void | readLock() | public void | readUnlock() | protected void | renderBean(DesignBean lbean, DocFragmentJspWriter rw, LiveUnit lu) | public static DocumentFragment | renderHtml(FacesModel model, MarkupDesignBean bean) | public static DocumentFragment | renderHtml(FacesModel model, MarkupDesignBean bean, boolean markRendered) | protected void | scan() | public void | setDefaultEncoding(String encoding) Set the default (response) encoding for this unit. | public void | setDefaultLanguage(String defaultLanguage) Set the default language for this unit. | public void | setDefaultParent(MarkupBean defaultParent) Set the default parent associated with this unit. | public void | setDefaultSrcEncoding(String encoding) | public void | setEncoding(String encoding) Set the effective response encoding for this unit. | public static void | setMarkupMouseRegionForElement(Element element, MarkupMouseRegion region) | public void | setPreRendered(DesignBean bean, DocumentFragment df) Set the "pre rendered" DocumentFragment for a particular bean.
Note: Only ONE bean can be pre-rendered at a time; this is not
a per-bean assignment. | protected boolean | syncSubUnits() | public String | toString() | public void | writeLock(UndoEvent event) | public boolean | writeUnlock(UndoEvent event) |
pageUnitDataObject | protected DataObject pageUnitDataObject(Code) | | |
viewRoot | final UIViewRoot viewRoot(Code) | | |
FacesPageUnit | public FacesPageUnit(JavaUnit junit, ClassLoader cl, String pkgname, Model model, String rootPackage, FacesContainer container, MarkupUnit pgunit)(Code) | | Construct an FacesPageUnit from existing java and markup units
Parameters: junit - Parameters: cl - Parameters: pkgname - Parameters: rootPackage - Parameters: container - Parameters: pgunit - |
bind | protected void bind()(Code) | | |
bindBeanParents | protected void bindBeanParents()(Code) | | |
bindMarkupBeans | protected void bindMarkupBeans(Element e)(Code) | | Bind all markup beans to their element and take care of parenting. Creates the HtmlBean
instances for HTML and other fake beans on the fly
|
destroy | public void destroy()(Code) | | |
dumpFacesComp | public void dumpFacesComp(UIComponent uic, int indent)(Code) | | Debug method for dumping a faces tree to stderr
Parameters: uic - The parent of the tree to dump. Parameters: indent - The indent level, 0 to start. |
findCompElement | public Element findCompElement(String id)(Code) | | Return the child element with a given id attr within the page
Parameters: id - The id attrribute string. The matching component element if found. |
firstBeanOfType | protected static MarkupBean firstBeanOfType(Bean bean, String tagName)(Code) | | Find the first occurance of a child bean with a given tag.
Parameters: bean - the parent bean whose children will be searched. Parameters: tagName - the tag name to search for. the MarkupBean found, or null of none. |
firstBeanOfType | protected static MarkupBean firstBeanOfType(Bean[] beans, String tagName)(Code) | | Find the first occurance of a bean from a list, with a given tag.
Parameters: beans - the list of beans to be searched. Parameters: tagName - the tag name to search for. the MarkupBean found, or null of none. |
getCompBinding | final public String getCompBinding(String bname)(Code) | | Get the component binding string for a given component bean name.
Parameters: bname - The component bean name. The component binding string. |
getDefaultLanguage | public String getDefaultLanguage()(Code) | | Return the default language to be used in this page
The default language that should be used for this page if not otherwise specified |
getDefaultParent | public MarkupBean getDefaultParent()(Code) | | Return the form bean associated with the unit.
the form bean associated with the unit. |
getEncoding | public String getEncoding()(Code) | | Get the effective response encoding for this unit.
The current response encoding. |
getFacesAncestorBean | public FacesBean getFacesAncestorBean(Element e)(Code) | | the faces bean for a given faces tag element or any of its ancestors. Null if not afaces element. |
getFacesBean | public FacesBean getFacesBean(Element e)(Code) | | Get the faces bean for a given faces tag element.
Parameters: e - the tag element. the faces bean for the given faces tag element, null if not a faces element. |
getFacesBean | public static FacesBean getFacesBean(DesignBean lb)(Code) | | Return the FacesBean for the live bean. May be null, for non faces live beans.
Parameters: lb - The live bean to get the faces bean for. May be null. the FacesBean corresponding to the live bean, or null. |
getFacesRenderTree | public DocumentFragment getFacesRenderTree(DesignBean lbean, LiveUnit lu)(Code) | | Get a complete render tree as a document fragment for a given component bean.
Parameters: lbean - The bean to render in DesignBean form. Parameters: lu - The LiveUnit that hosts the given bean. A complete DocumentFragment that contains the bean's rendered XHTML.//!TODO: could easily extract lu from lbean here. |
getMarkupBean | public MarkupBean getMarkupBean(Element e)(Code) | | Get the markup bean for a given faces tag element.
Parameters: e - the tag element. the markup bean for the given faces tag element, null if element has no associatedbean //!CQ TODO: could hash element=>bean instead |
getRenderFailure | public Exception getRenderFailure()(Code) | | Return the exception associated with the most recent getFacesRenderTree call.
You should call this method immediately after a
FacesPageUnit.getFacesRenderTree call;
it will be overwritten by other requests. If there were no failures, returns null.
|
getRenderFailureComponent | public DesignBean getRenderFailureComponent()(Code) | | Return the failing component associated with the most recent getFacesRenderTree call.
You should call this method immediately after a
FacesPageUnit.getFacesRenderTree call;
it will be overwritten by other requests. If there were no failures, returns null.
|
getViewRoot | public UIViewRoot getViewRoot()(Code) | | Get the JSF page view root for this unit.
The view root for this JSF page. |
isPage | public boolean isPage()(Code) | | Determine if the current document is a complete page (true) or a fragment (false)
true iff the current document is a complete page |
isWriteLocked | public boolean isWriteLocked()(Code) | | |
readLock | public void readLock()(Code) | | |
readUnlock | public void readUnlock()(Code) | | |
renderBean | protected void renderBean(DesignBean lbean, DocFragmentJspWriter rw, LiveUnit lu)(Code) | | Render a component into a doc fragment writer
Parameters: lbean - The bean to render in DesignBean form. Parameters: rw - The JSP response writer to write the rendering into. Parameters: lu - The LiveUnit that hosts the given bean. |
setDefaultEncoding | public void setDefaultEncoding(String encoding)(Code) | | Set the default (response) encoding for this unit.
Parameters: encoding - The default response encoding. |
setDefaultLanguage | public void setDefaultLanguage(String defaultLanguage)(Code) | | Set the default language for this unit.
Parameters: defaultLanguage - |
setDefaultParent | public void setDefaultParent(MarkupBean defaultParent)(Code) | | Set the default parent associated with this unit.
The passed in bean must be a valid bean in this faces unit.
Avoid this method, this is primarily used by clients that
really know what they're doing and don't want any of the
default behavior - such as the Page Import feature.
|
setDefaultSrcEncoding | public void setDefaultSrcEncoding(String encoding)(Code) | | Set the default encoding for the jsp source
Parameters: encoding - |
setEncoding | public void setEncoding(String encoding)(Code) | | Set the effective response encoding for this unit.
Parameters: encoding - The response encoding, or null to use default. |
setPreRendered | public void setPreRendered(DesignBean bean, DocumentFragment df)(Code) | | Set the "pre rendered" DocumentFragment for a particular bean.
Note: Only ONE bean can be pre-rendered at a time; this is not
a per-bean assignment. When set, this will cause the given
DocumentFragment to be inserted into the output fragment
rather than calling the bean's renderer.
The bean must represent a UIComponent.
This is intended to be used for for example having the ability
to "inline edit" a particular component's value; in that case
since we're not updating the value attribute during editing,
we want to suppress the normal rendered portion from the component
and instead substitute the inline-edited document fragment
corresponding to the parsed text output of the component.
|
syncSubUnits | protected boolean syncSubUnits()(Code) | | |
|
|