Hi i am still trying to develope my own java controls for XPages. I wanted to knwo how i can use an existing control and use it in my new control.
Lets say i want to develope something like a login popup control. I Extended the UIDialog from com.ibm.xsp.extlib.component.dialog
but how can i add a xp:inputText
on it?
Ok, in this example i could add a xp:callback
facet to the markup section in the control.xsp-config
so i just need to drag some input fields on it like a standard control but what if i want it to be just one control wich i can deploy with the update site.
Update:
ok tried it out your solution keithstric. I guess you work direkt on your component. I use e renderer for my component. So is there a difference in the Component tree if i add the component with a renderer or direct in my component:
Renderer:
public class MyRenderer extends Renderer {
public void encodeBegin(FacesContext context, UIComponent component)throws IOException {
ResponseWriter w = context.getResponseWriter();
NewComponentXY comp = new ComponentXY();
component.getChildren().add(comp);
}
or direct:
public class MyComponent extends UIComponentBase {
public void encodeBegin(FacesContext context, UIComponent component)throws IOException {
ResponseWriter w = context.getResponseWriter();
NewComponentXY comp = new ComponentXY();
this.getChildren().add(comp);
}
Is there a difference in the jsf lifecycle?