JSF custom component

Hi
I have created a JSF cutom component , which has some javascript files. If i use the component within the same project my path for accessing the JS files is :- js/task.js (Its in public/html folder) .
My problem is that when I use this custom component in some other project i am not able to access the js file ( Js file are deployed with other source file in ADF Library Jar) . As I have to hard code the path of JS files in the render can any one please tell me what will be the path for accessing the JS files.
i heard ADFLibraryFilter is used for the purpose. Anyone please shed more light on it.

Thanx Frank for your help .
I am generating html from the rendererm, in the encodeBegin method i have now written <script type="text/javascript" src="adflibResources/js/task.js"></script>
But still the script isn't loading on the page
I added the following code in web.xml but Jdeveloper (Studio Edition Version 11.1.1.1.0) is complaining that "refernce oracle.adf.library.webapp.LibraryFilter and oracle.adf.library.webapp.ResourceServlet not found. I am using Fusion Web Application (ADF) as the application template.
<filter>
<filter-name>ADFLibraryFilter</filter-name>
<filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
<init-param>
<param-name>provider-lazy-inited</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ADFLibraryFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>adflibResources</servlet-name>
<servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>adflibResources</servlet-name>
<url-pattern>/adflib/*</url-pattern>
</servlet-mapping>

Similar Messages

  • Can't instantiate JSF Custom Component

    I'm hoping some of you expert (or at least seasoned) JSF custom component developers might be able to lend some insight into the "Can't instantiate class" problem. I have a custom component which extends another component (which happens to be Oracle ADF's panelGroup), and I've verified that everything is in place:
    1. Component class uses correct component type referenced by faces-config.xml and tag class
    2. Renderer type referenced in faces-config.xml matches that of the renderer type in component class
    3. There is a default constructor (no args) for the component class, which also sets the renderer type
    4. TLD with tag is correct
    All classes are definitely in the classpath, as I have another custom component in the same packages which loads and is used just fine.
    Any ideas would be appreciated.
    Thanks,
    Shawn Bertrand
    Tyco Electronics

    So, is no one else having any problems when using the new JSF components from Java Studio Creator 2 in their existing projects? I can make simple projects in Creator and run them on PointBase and Tomcat and can deploy and run from Eclipse using MyEclipse but I cannot get my existing project working and I am wondering if their is some sort of conflict between the new JSF components and legacy Struts stuff in that project or if perhaps Spring is someone interferering. Kind of at a loss right now...

  • JSF Custom component for table pagination and sorting

    hi
    i want such a custom component that render a table and table has the features of pagination and column sorting.
    any one know from where i can get such a custom component.
    (if this component is available with source then it would be more help full for me)
    thnks & regards,
    Haroon
    Message was edited by:
    HaroonAnwarPADHYAR

    I know two companies that offer JSF component for table pagination and sorting and AJAX based :
    http://www.teamdev.com/quipukit/demo/datatable/DataTable_filteringAndPaging.jsf
    http://java.samples.infragistics.com/NetAdvantage/JSF/2006.1/
    The problem? They are not open source..
    And I am too looking forward on this subject, because I want to develop my own custom component and add some features. If someone has any tips, references or samples of their own, it would be really appreciated.
    Thank you.
    Paul

  • Validation Error - JSF Custom Component

    I am trying to create a Custom Component. It is a pre-populated list of selection items. So all that the page author would have to do is use a tag like
    <jsfcust:mySelectOneComponent  value="#{requestScope.selectedItem}/>and this should display a drop-down list from which only one item can be selected. I got this working except for the final stretch.
    I created the following...
    1. tag in the .tld file
    2. CustSelectOneTag.java (set the value as a ValueBinding in setProperties() method)
    3. CustSelectComponent.java
    4. CustSelectRenderer.java (In the decode() method, called setSubmittedValue(value) on the component)
    5. updated the faces-config.xml file
    The display seems to be working fine. The problem is when I click on a Submit button and go to the next page where I want to display the selected value. It shows up as null. All that I want to do is be able to select an item from the custom drop down and display it in the next page after hitting submit.
    What is the proper way to send the value back in the response? In my case, I was merely trying to pass the value so that the next page can access it from the request scope and display it.
    I was not sure if I had to implement the getConvertedValue() method in my renderer. Can someone help?
    Thanks,
    JM

    Thanks for your reply! Your answer fixed my problems, so definitely thanks! I need to use escaped values for things like "<,&,#, etc", like the pound "amp" semicolon stuff. If I try to type out strings like these the forum unescapes them - fun part of posting forum questions about HTML escaping on HTML-based forums! :) I didn't realize an escaped querystring would still work as expected in a <a href ... />. You actually fixed both of my problems, and I... I do feel appropriately foolish now :) Had a feeling this might be a slaps forehead one. Thanks for the quick answer!,
    Jim

  • Jsf custom component issue

    I am creating a custom component and extending the renderer like the following. My custon component is similar to h:messages but inaddition to that it has hyperlink(clicking error focuses individual input box). I have extended the renderer as follows, every thing works fine but the problem is the form gets null or looses its all value when error occured, however the component works fine. I dont know why is that hapening.
    Any help would be highly appreciated.
    public class CustomErrorRenderer extends Renderer {
    @Override
    public void encodeEnd(FacesContext context,
    UIComponent component) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.startElement("div", component);
    writer.writeAttribute("id", component.getClientId(context), "id");
    writer.writeAttribute("style", "color: red", null);
    writer.startElement("ul", null);
    Iterator<String> clientIds = context.getClientIdsWithMessages();
    while (clientIds.hasNext()) {
    String clientId = clientIds.next();
    Iterator<FacesMessage> messages = context.getMessages(clientId);
    if (!messages.hasNext()) { continue; }
    String javaScript = "var field = document.getElementById('"
    +clientId+ "');" +"if(field == null) return false;"+
    "field.focus(); return false;";
    writer.startElement("li", null);
    writer.startElement("a", null);
    writer.writeAttribute("onclick", javaScript, null);
    writer.writeAttribute("href", "#", null);
    while (messages.hasNext()) {
    writer.writeText(messages.next().getSummary(), null);
    writer.endElement("a");
    writer.endElement("li");
    writer.endElement("ul");
    writer.endElement("div");
    }

    The problem is, the form values that are tied to input boxes are null once validation error occurs.
    I think when I am overriding that encodeEnd, this is causing the problem for the form values getting null.
    IF I want to see, what are the submitted values then isn't this the way, I am getting null here also:
              FacesContext context = FacesContext.getCurrentInstance();     
                  UIViewRoot viewRoot= context.getViewRoot();
                 HtmlInputText input = (HtmlInputText)viewRoot.findComponent("formId:InputboxId");
              System.out.println("input  sub value" + input.getSubmittedValue());

  • 1st jsf custom component.. getting nullpointer Ex, what's wrong?

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

  • JSF custom component: value not binding to component

    I have a custom UIInput component which is not able to bind to the value of the component from a backing bean. Here is the JSF code snippet:
    <tw:validateInputText id="locationIdStopInput" table="location" column="location" styleClass="wideSingleInput" value="#{currentStop.customer.customer}" rendered="#{loadTypeView.renderWarehouse or (currentStop.stopNumber gt 1 and loadTypeView.renderOutbound) or (currentStop.stopNumber eq 1 and loadTypeView.renderInbound)}"/>
    tw is the custom tag and validateInputText is the custom UiInput component.
    On posting the form the decode method is not able to get the value from the requestParameter map. Following is the decode() I wrote:
    public void decode(FacesContext context,
    UIComponent component) {
    // assertValidInput(context, component);
    if (context == null || component == null) {
    throw new NullPointerException();
    ValidateInputTextComponent map = (ValidateInputTextComponent) component;
    String key = map.getId();
    if (component instanceof UIInput) {
    UIInput input = (UIInput) component;
    String clientId = input
    .getClientId(context);
    Map requestMap = context
    .getExternalContext()
    .getRequestParameterMap();
    String newValue = (String) requestMap
    .get(clientId);
    if (null != newValue) {
    input.setSubmittedValue(newValue);
    Also providing the setProperties() from the custom tag class:
    protected void setProperties(UIComponent component){
    super.setProperties(component);
    if (getValue()!=null){
    if (isValueReference(getValue())){
    ValueBinding vbTarget = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getValue());
    component.setValueBinding(VB_VALUE, vbTarget);
    System.out.println(component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()));
    } else{
    ((UIInput) component).setValue(value);
    // component.getAttributes().put("value",getValue());
    if (getCompValue()!=null){
    if (isValueReference(getCompValue())){
    ValueBinding vbCompTarget = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getCompValue());
    component.setValueBinding(VB_COMPONENT_VALUE, vbCompTarget);
    } else{
    // ((UIInput) component).setValue(compValue);
    component.getAttributes().put(VB_COMPONENT_VALUE,getCompValue());
    if (getTable() != null && isValueReference(getTable())){
    ValueBinding vbTable = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getTable());
    component.setValueBinding(VB_TABLE, vbTable);
    } else{
    component.getAttributes().put(VB_TABLE, getTable());
    if (getColumn() != null && isValueReference(getColumn())){
    ValueBinding vbColumn = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getColumn());
    component.setValueBinding(VB_COLUMN, vbColumn);
    } else{
    component.getAttributes().put(VB_COLUMN,getColumn());
    if (getStyleClass() != null && isValueReference(getStyleClass())){
    ValueBinding vbClass = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getStyleClass());
    component.setValueBinding(VB_STYLE_CLASS, vbClass);
    } else{
    component.getAttributes().put(VB_STYLE_CLASS, getStyleClass());
    if(getRendered() != null && isValueReference(getRendered())){
    ValueBinding vbRendered = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getRendered());
    component.setValueBinding(VB_RENDERED, vbRendered);
    } else{
    Boolean a = new Boolean(getRendered());
    component.getAttributes().put(VB_RENDERED, new Boolean(getRendered()));
    Please let me know If I am missing something here to retrieve the value from the component.
    Thanks

    See this tutorial:
    http://www.jsftutorials.net/components/index.html

  • JSF-Custom Component with EventHandling

    Dear All,
    I wanted to write my own component with event handling.
    This is my requirement:
    In my JSP, I'll put my cusom component tag for displaying 10 records and with prev and next buttons. after clicking prev button, i should get previouse 10 records and if i click next button, i should get next 10 records.
    so, my component should render
    1. 10 records
    2. Prev button
    3. Next button.
    After clicking prev button it should render previouse 10 records and also prev and next button.
    I do not know whether it is possible with JSF or not and also i'm not finding any example which explaining above situation.
    My jsp should contain only my custom tag like
    <mine:listRecords/>
    Tag Handler of listRecords tag should render 10 records and prev and also next button. After clicking prev, i should get 10 previouse records and and both the buttons and so on.
    advanced thanks,
    ram

    It is certainly possible to write a component that embeds its own navigation and paging as you describe. On the other hand, you can also assemble this kind of functionality out of a combination of the existing simple components. The "repeater" example illustrates exactly the kind of application you are talking about (and the same techniques will work fine with the standard <h:dataTable> component as well).
    Craig

  • JSF custom component: repear child components

    I want to create something like this
    <custom:mycomp var="item" value="#{aBean.TheArrayList}">
    ___<f:facet name="child">
    ______<h:commandLink actionListener="#{item.doSomething}">
    _________<h:ouputText value="#{item.name}"/>
    ______</h:commandLink>
    ___</f:facet>
    </custom:mycomp>
    I know how to make a basic component with encodebegin and encodeend. But how can I make it repeat the facet for every object in the arraylist?

    Create a custom ActionListener, implementing javax.faces.event.ActionListener, and calling it like this:
    <h:commandButton action="doThis" value="Do This">
         <f:actionListener type="my.package.MyActionListener" />
    </h:commandButton>When the button is pressed, the processAction() method of MyActionListener is automatically executed.
    Maybe this wasn't what you were looking for?
    Edited by: bjornie on Aug 5, 2008 2:50 AM

  • Nesting JSF components in a  custom component

    I'm creating a new JSF custom component. my component needs to include an input text and a list box. my question is : how do I add these components to my JSF component ? I want to use to JSF component to render them rather then encoding the HTML myself. how can I do it ?
    I was told I need to use encodeChildren method somehow but I don't know how ?

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • JSF custom renderer executes multiple times

    I have just created a jsf custom component to render three input texts next to each other (for SSN input). My custom renderer extends javax.faces.render.Renderer, and I am writing out the elements in the encodeEnd method. The problem I encountered is - upon saving the form and the screen refreshes, the renderer gets called two times. So what I end up seeing on the screen are two sets of the three input texts component. Does anyone know why the renderer gets called more than once? Any insight is much appreciated.

    To the best of my knowledge, the standard does not specify the default renderer class for any components.
    I would take a wrapper/decorator approach. Add a field to your renderer for the default renderer. Before configuring your renderer, obtain the default renderer and set it on your renderer, then configure it.
    OTOH, there might be easier ways for you to accomplish what you want to do. You could use a PhaseListener to add components to the view whenever a commandButton is encountered in the tree.

  • Custom component not found by jsf (mojarra)

    Coming from this link http://forums.sun.com/thread.jspa?threadID=5446475&tstart=0
    I have managed to get things together but for some reason, my app is not able to find the custom component at runtime. I have the component configured in my web.xml so that is not it. I am not sure if this has something to do with the fact that I am not able to see any JSF 2.0 annotations during runtime. I actually using spring for my component scan due some issues I had earlier on with JSF. At that time I was told that because I am using maven tomcat plugin for development, I might not be able to get that working. The explanation was that maven tomcat plugin uses tomcat 6.012 that does not support something, I cannot remember that makes JSF behave properly. Some advised me to use jetty but I have had a chance to try that. Has someone faced this kind of issues before? If so please let me know I am running out of time for this project. Thanks a million in advance.
    Edited by: mota_nginya on Aug 9, 2010 6:31 AM

    mota_nginya wrote:
    Coming from this link http://forums.sun.com/thread.jspa?threadID=5446475&tstart=0
    I have managed to get things together but for some reason, my app is not able to find the custom component at runtime. I have the component configured in my web.xml so that is not it. I am not sure if this has something to do with the fact that I am not able to see any JSF 2.0 annotations during runtime. I actually using spring for my component scan due some issues I had earlier on with JSF. At that time I was told that because I am using maven tomcat plugin for development, I might not be able to get that working. The explanation was that maven tomcat plugin uses tomcat 6.012 that does not support something, I cannot remember that makes JSF behave properly. Some advised me to use jetty but I have had a chance to try that. Has someone faced this kind of issues before? If so please let me know I am running out of time for this project. Thanks a million in advance.What do you mean you have the component configured in web.xml? While I can't say what effect Spring has on things as I don't use Spring, all you need are the annotations on the component, the entries in the -taglib.xml if you're using facelets, and an "empty" (root-element only) faces-config.xml set to version 2.0 in the jar if the component is jarred (as opposed to being part of the .war).
    When you say JSF can't find your component, are you getting an error message? Does the tag just appear in the browser unprocessed?
    Testing on GlassFish would be helpful (for me) as there are no known issues there in this area.

  • Problem with inputText in my custom component

    Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
    I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
    Here is the JSP snippet.
    <cjsf:rptTable>
         <cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
              <cjsf:row>
                   <cjsf:col>
                        <h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
                   </cjsf:col>
              </cjsf:row>
         </cjsf:data>
    </cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
    <table>
         <tbody>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
         </tbody>
    </table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
    Here are the components:
    public class UIRptTable extends UIComponentBase {
         public UIRptTable() {
              setRendererType("tblmaint.rptTableRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableData extends HtmlDataTable {
         public UIRptTableData() {
              setRendererType("tblmaint.rptTableDataRenderer");
         public String getFamily() {
              return "javax.faces.Data";
    public class UIRptTableRow extends UIOutput {
         public UIRptTableRow() {
              setRendererType("tblmaint.rptTableRowRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableCol extends UIColumn {
         public UIRptTableCol() {
              setRendererType("tblmaint.rptTableColRenderer");
         public String getFamily() {
              return "javax.faces.Column";
    }Here is part of the faces-config file in case you need it.
    <!-- Components -->
    <component>
         <component-type>tblmaint.rptTable</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableData</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableRow</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableCol</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
    </component>
    <!-- Render Kits -->
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Data</component-family>
              <renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Column</component-family>
              <renderer-type>tblmaint.rptTableColRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
         </renderer>
    </render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
    Thanks,
    Ray

    Hi, Ray!
    1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
    I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
    The code below is the part of source of repeater.jsp with only change:
    <d:data_repeater> &#61664; <h:dataTable>
    And it works fine.
    <h:dataTable id="table"
    binding="#{RepeaterBean.data}"
         rows="5"
    value="#{RepeaterBean.customers}"
    var="customer">
    <f:facet name="header">
    <h:outputText value="Customer List"/>               <!� First Header row -- >
    </f:facet>
    <h:column>
    <%-- Visible checkbox for selection --%>
    <h:selectBooleanCheckbox
    id="checked"
    binding="#{RepeaterBean.checked}"/>
    <%-- Invisible checkbox for "created" flag --%>
    <h:selectBooleanCheckbox
    id="created"
    binding="#{RepeaterBean.created}"
    rendered="false"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Account Id"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="accountId"
    binding="#{RepeaterBean.accountId}"
    required="true"
    size="6"
    value="#{customer.accountId}">
    </h:inputText>
    <h:message for="accountId"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Customer Name"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="name"
    required="true"
    size="50"
    value="#{customer.name}">
    </h:inputText>
    <h:message for="name"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Symbol"/>
    </f:facet>
    <h:inputText id="symbol"
    required="true"
    size="6"
    value="#{customer.symbol}">
    <f:validateLength
    maximum="6"
    minimum="2"/>
    </h:inputText>
    <h:message for="symbol"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Total Sales"/>
    </f:facet>
    <h:outputText id="totalSales"
    value="#{customer.totalSales}">
    <f:convertNumber
    type="currency"/>
    </h:outputText>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Commands"/>
    </f:facet>
    <h:commandButton id="press"
    action="#{RepeaterBean.press}"
    immediate="true"
    value="#{RepeaterBean.pressLabel}"
    type="SUBMIT"/>
    <h:commandLink id="click"
    action="#{RepeaterBean.click}"
    immediate="true">
    <h:outputText
    value="Click"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    You may have a look at HTML source to prove that dataTable is already what you need:
    <table id="myform:table">
    <thead>
    <tr><th colspan="6" scope="colgroup">Customer List</th></tr>
    <tr>
    <th scope="col"></th>
    <th scope="col">Account Id</th>
    <th scope="col">Customer Name</th>
    <th scope="col">Symbol</th>
    <th scope="col">Total Sales</th>
    <th scope="col">Commands</th>
    </tr>
    </thead>
    <tbody>
    2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
    But when you find smth., please let me know. I�ll be very grateful.
    Regards,
    Oleksa Stelmakh

  • Problem with attributes in custom component

    Hi All,
    I am creating a simple jsf PanelGrid custom component....in that component I am adding two new attributes....
    when I use that tag in my jsf application it is rendering fine in the client side....but the parent class that is PanelGrid component's attributes are not inheriting to my custom panelgrid....
    can any one tell me how can I use the attributes of the super class PanelGrid??
    Thanks...

    Have you configured the attributes in the tag library descriptor?

  • How to construct the component tree in my custom component?Help!

    Hi, i am writing a custom component like this:
    public class HtmlCategory extends HtmlPanelGrid
         public void processRestoreState(javax.faces.context.FacesContext context,
                java.lang.Object state)
              setColumns(1);
              HtmlCommandLink link=new HtmlCommandLink();
              link.setValue("Let's Bingo");
              MyUtil.setActionListener(context,link,"#{temp.mytest}");
              UIParameter param=new UIParameter();
              param.setName("name");
              param.setValue("Robin!");
              link.getChildren().add(param);
              param.setParent(link);
              getChildren().add(link);
              link.setParent(this);
              super.processRestoreState(context,state);
    }         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
    But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
    I got a message from the console:
    Wrong columns attribute for PanelGrid id0:id4: -2147483648
    but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
    Best Regards:)
    Robin

    Well, i don't know if i have got my question clear.
    usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
    <f:form>
      <h:panelGrid ...........>                         
              <h:dataTable ................>
              </h:dataTable>
       </h:panelGrid>
    </f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
    Best Regards:)
    Robin

Maybe you are looking for

  • How to export my Mac's iPhoto library from my iPad?

    Hey ! Recently, my MacBook died, taking my iPhoto library with it. Thankfully, i had transferred all of it to my iPad Mini. I bought a new MacBook and would like to export the library i had previously imported to my iPad Mini back to my Mac. When i p

  • Purchase Order Long text

    Dear ALL my request is i want to know all kind of purchase order longtext which are stores in a STXH table. please anybody can tell me how do i recall all text which my users had added in PO while creating it. i knw the function 'read_text' but do no

  • I was wonding why when i bought an album off of itunes that it charged for it twice

    i was buying a kid cudi album and when i first tapped to download and pay it dident give me all the songs i payed for so i hit the complete alum button and he puchased the whole album agin. so i was wondeing why it did that and that i kinda want my m

  • 4 days - and still has not been activated

    I have a BT Home Hub 2.0. And my BT Total Broadband was supposed to be up on 21st Jan. I have tried everyday, but nothing. I check my settings on the gateway, and it says nothing has been activated Is this common?

  • Documentation on t-code SQ01

    Good day!! Do you have any idea where i can find documentation regarding t-code sq01? Regards,