Custom component/renderer deploy "location"

What is the best place to deploy custom components/renderers sources inside the war archive? Under WEB-INF ?

I would group them in a JAR file and place it in /WEB-INF/lib.

Similar Messages

  • How to get jsp PageContext in custom component renderer

    Hi,
    How to find PageContext(javax.servlet.jsp.PageContext) form within the custom component renderer class?
    Please help?
    Thanx & Regards
    Milind

    Strictly you're looking which URL has invoked the new request? With other words, you want the referrer?
    If so, doString referrer = request.getHeader("referer"); // Yes, with the legendaric misspelling.Be careful with this, the client has full control over what he/she sends with the headers, so also the referrer. It might be null or changed while you didn't expect that. If you want to be safe, you may consider to send the current URL as a hidden parameter along with the request.

  • Controlling custom component rendering

    As I'm writing my own custom components, I've come across some behaviorisms of JSF that don't quite make sense to me. I thought I'd ask the group, and see if someone can clarify it.
    Let's say I've got a JSP with the following components on it:
    <myfaces:comp1>
    <myfaces:comp2>
    <myfaces:comp3/>
    </myfaces:comp2>
    </myfaces:comp1>
    Let's assume that the UIComponent representing comp2 contains the following snippets:
    public boolean getRenderChildren() {
    return true;
    public void encodeBegin(FacesContext context) throws IOException {
    // render something here....
    public void encodeChildren(FacesContext context) throws IOException {
    Iterator iter = this.getChildren();
    while (iter.hasNext()) {
    UIComponent child = (UIComponent)iter.next();
    child.encodeBegin(context);
    if (child.getRenderChildren()) {
    child.encodeChildren(context);
    child.encodeEnd(context);
    public void encodeEnd(FacesContext context) throws IOException {
    // render something here....
    All the other components return false for getRenderChildren();
    During the Rendering Phase, I find that comp3
    is actually rendered twice.
    This is an oversimplification of the code I was experimenting with, but what puzzled me was the fact that whatever class is traversing the various components during Rendering Phase does not seem to check whether a component is going to render its children itself, and as it comes to that child component (in this case, comp3), it renders it anyhow. Then when comp2's encodeChildren() method is called, it too renders comp3.
    I suspect I may misunderstand how these methods are used..
    Rob

    During the Rendering Phase, I find that comp3
    is actually rendered twice.
    This is an oversimplification of the code I was
    experimenting with, but what puzzled me was the fact
    that whatever class is traversing the various
    components during Rendering Phase does not seem to
    check whether a component is going to render its
    children itself, and as it comes to that child
    component (in this case, comp3), it renders it anyhow.
    Then when comp2's encodeChildren() method is called,
    it too renders comp3.Yes, Suns reference implementation does not seem to check whether a component's parent has set the "encodeChildren" attribute to true.
    Well, the open source implementation "MyFaces" (http://sourceforge.net/projects/myfaces/) does this.
    What's not so clear is the following question:
    When a component is rendered by it's parent and itself has the "encodeChildren" attribute set to false, should children of this component automatically be rendered, or not? In other words: Whenever a component has the "encodeChildren" attribute set to true, is it responsible for rendering all children and grandchildren (and grand-grandchildren...)?
    The final Specification should state this clearly, I think.
    Manfred

  • Excpeption creating custom component

    Hi all,
    I'm using Sun's RI 1.2 to create a custom component that consist of
    standard components. My problem is that this custom component renders
    ok but when I submit the form that contains it I get an
    IndexOutOfBoundsException.
    Can anyone please tell me what's causing this or what's the problem?
    Here's the exception:
    java.lang.ArrayIndexOutOfBoundsException: 1
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1160)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1164)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1164)
         at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:310)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:300)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:174)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:132)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         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.content(HttpConnection.java:844)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
         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)
    And here's the custom component code:
    public UIBooleanFieldset() {
    setConverter(new BooleanConverter());
    setRendererType(null);
    Application application = FacesContext.getCurrentInstance().getApplication();
    HtmlSelectOneRadio htmlSelectOneRadio = (HtmlSelectOneRadio)
    application.createComponent(HtmlSelectOneRadio.COMPONENT_TYPE);
    htmlSelectOneRadio.setId(getId() + "_radios");
    ValueBinding radioBinding =
    application.createValueBinding("#{persoonBean.sex}");
    htmlSelectOneRadio.setValueBinding("value", radioBinding);
    htmlSelectOneRadio.setLayout("pageDirection");
    UISelectItems selectItems = (UISelectItems)
    application.createComponent(UISelectItems.COMPONENT_TYPE);
    ValueBinding selectBinding =
    application.createValueBinding("#{persoonBean.sexItems}");
    selectItems.setValueBinding("value", selectBinding);
    htmlSelectOneRadio.getChildren().add(selectItems);
    getChildren().add(htmlSelectOneRadio);
    Thanks for any help!
    regards,
    Jeroen

    Hi,
    I had a little trouble find a maven repository serving the RI jars but eventually I found one:
           <dependency>
             <groupId>javax.faces</groupId>
             <artifactId>jsf-impl</artifactId>
             <version>1.2-b19</version>
           </dependency>
           <dependency>
             <groupId>javax.faces</groupId>
             <artifactId>jsf-api</artifactId>
             <version>1.2_02</version>
           </dependency>By the way, I had this problem with the myfaces 1.2 implementation too.
    Thanks for your help,
    Jeroen

  • Range component in custom item renderer

    Hi,
    I am trying to put a spark Range component into the labelItemRenderer for flex mobile. Everytime I add it I get the error: "Skin for (long directory name for my range component) cannot be found". The custom item renderer is an actionscipt class because I read this is the best way to make them for mobile. I'll put the error in the bottom of the post.
    If anyone has any idea why this could be happening or if anyone knows a possible way around this it would be extremely helpful. I basicaly just need a list where each item has a label on side and then a progress bar on the other side.
    Thanks.
    Here is the full error, ill put a star on the line where the addChild method gets called in my item renderer for the range component.
    Error: Skin for HoosFit0.TabbedViewNavigatorApplicationSkin5.tabbedNavigator.TabbedViewNavigatorSkin7.con tentGroup.ViewNavigator1.ViewNavigatorSkin12.contentGroup.
    FCfacilities139.SkinnableContainerSkin141.contentGroup.Group143.facilityList.ListSkin145.S croller147.ScrollerSkin148.DataGroup146.FCfacilitiesInnerClass0_157.Range154 cannot be found.
              at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.y\frameworks\pr ojects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
              at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.y\frame works\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
              at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.y\framework s\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
              at mx.core::UIComponent/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UICo mponent.as:7176]
    *** at views::itemRenderer2/set data()[/Users/evan/Documents/Adobe Flash Builder 4.6/HoosFit/src/views/itemRenderer2.as:73]
              at spark.components::SkinnableDataContainer/updateRenderer()[E:\dev\4.y\frameworks\projects\ spark\src\spark\components\SkinnableDataContainer.as:606]
              at spark.components.supportClasses::ListBase/updateRenderer()[E:\dev\4.y\frameworks\projects \spark\src\spark\components\supportClasses\ListBase.as:1106]
              at spark.components::DataGroup/setUpItemRenderer()[E:\dev\4.y\frameworks\projects\spark\src\ spark\components\DataGroup.as:1157]
              at spark.components::DataGroup/initializeTypicalItem()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\DataGroup.as:327]
              at spark.components::DataGroup/ensureTypicalLayoutElement()[E:\dev\4.y\frameworks\projects\s park\src\spark\components\DataGroup.as:384]
              at spark.components::DataGroup/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\comp onents\DataGroup.as:1467]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
              at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:8430]
              at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx \managers\LayoutManager.as:665]
              at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:816]
              at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]

    Hi,
    I am trying to put a spark Range component into the labelItemRenderer for flex mobile. Everytime I add it I get the error: "Skin for (long directory name for my range component) cannot be found". The custom item renderer is an actionscipt class because I read this is the best way to make them for mobile. I'll put the error in the bottom of the post.
    If anyone has any idea why this could be happening or if anyone knows a possible way around this it would be extremely helpful. I basicaly just need a list where each item has a label on side and then a progress bar on the other side.
    Thanks.
    Here is the full error, ill put a star on the line where the addChild method gets called in my item renderer for the range component.
    Error: Skin for HoosFit0.TabbedViewNavigatorApplicationSkin5.tabbedNavigator.TabbedViewNavigatorSkin7.con tentGroup.ViewNavigator1.ViewNavigatorSkin12.contentGroup.
    FCfacilities139.SkinnableContainerSkin141.contentGroup.Group143.facilityList.ListSkin145.S croller147.ScrollerSkin148.DataGroup146.FCfacilitiesInnerClass0_157.Range154 cannot be found.
              at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.y\frameworks\pr ojects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
              at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.y\frame works\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
              at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.y\framework s\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
              at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
              at mx.core::UIComponent/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UICo mponent.as:7176]
    *** at views::itemRenderer2/set data()[/Users/evan/Documents/Adobe Flash Builder 4.6/HoosFit/src/views/itemRenderer2.as:73]
              at spark.components::SkinnableDataContainer/updateRenderer()[E:\dev\4.y\frameworks\projects\ spark\src\spark\components\SkinnableDataContainer.as:606]
              at spark.components.supportClasses::ListBase/updateRenderer()[E:\dev\4.y\frameworks\projects \spark\src\spark\components\supportClasses\ListBase.as:1106]
              at spark.components::DataGroup/setUpItemRenderer()[E:\dev\4.y\frameworks\projects\spark\src\ spark\components\DataGroup.as:1157]
              at spark.components::DataGroup/initializeTypicalItem()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\DataGroup.as:327]
              at spark.components::DataGroup/ensureTypicalLayoutElement()[E:\dev\4.y\frameworks\projects\s park\src\spark\components\DataGroup.as:384]
              at spark.components::DataGroup/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\comp onents\DataGroup.as:1467]
              at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
              at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:8430]
              at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx \managers\LayoutManager.as:665]
              at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:816]
              at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]

  • Customizing ADF component rendering

    Hi,
    I'm trying to override some ADF component rendering in order to provide some clients with a simple application appearance. To do so, in faces-config.xml:
    <pre>
    <render-kit>
    <render-kit-id>oracle.adf.core</render-kit-id>
    <renderer>
    <component-family>oracle.adf.Panel</component-family>
    <renderer-type>oracle.adf.Page</renderer-type>
    <renderer-class>com.mycompany.web.faces.renderer.MyPanelPage</renderer-class>
    </renderer>
    </render-kit>
    </pre>
    I define MyPanelPage class that extends javax.faces.render.Renderer class. I override encodeBegin, encodeEnd, encodeChildren and getRendersChildren methods and it works fine. However, I run into a problem when I want to make the renderer work "in default mode" (the way it ussually works) under certain condition. I suppose that there might be a special render class used by "oracle.adf.core" render kit to render panelPage component, which determines the location of every facet. Anybody know which is this class.
    Thanks in advance.
    Luis Serrano.

    Hi,
    check PageLayoutRenderer
    Frank

  • How do you reference a valueObject located in main to a custom component created in Catalyst?

    Hello,
    I have been working with the Catalyst Beta 2 / Flash Builder beta trying to create a photogallery and have hit a little bit of a snag, try as I might I can't seem to find the answer anywhere. I am still new to Flex so please excuse me if this is a basic question, I have been trying to understand more about Flex to make my designs in Catalyst better.
    I found this video on Adobe TV: http://tv.adobe.com/watch/rich-internet-applications-101/ria-stepbystep-16-binding-a-data- service-to-flash-builder-components/
    It's wonderful and I have the datalist I created in Catalyst working with the XML file I generated but I designed my little photogallery a bit diffrent, I created a Custom Component in Catalyst so that when you click an item on the DataList it pop's up a little screen with a larger photo in on it, rather then having an image in the main application. Now my problem seems to be that I can't refrence the valueObject I created with the wizard as it's in my Main.mxml file, is there a way to refrence it from my Custom Component so the larger image will display? Is there a way to let the component know which item on the dataList in the main application is selected and display the correct image?
    I should also say I really enjoy working with the Beta for both Flash Builder / Catalyst, thanks for the hard work!
    Thanks for the help,
    Chris

    I am afraid you cannot bind to static properties in Windows Store Apps. It is simply not supported.
    You could create a proxy class that exposes the static command property and bind to this property of an instance of the proxy object:
    http://stackoverflow.com/questions/14186175/bind-to-a-static-field-in-windows-8-xaml
    http://stackoverflow.com/questions/4708711/how-can-i-use-the-xstatic-extension-for-phone7-silverlight-apps
    You will of course have to create an instance of the proxy object. There is no way around this.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • After deploying Custom Component BO Analysis Adaptive Server would not Start

    Hello all,
    I just developed my custom component in Design Studio with SDK and uploaded this component to BI Enterprise 4.1 SP2 Patch 3 server . After that, I tried to restart the Adaptive Processing Server which includes Analysis Service. However, the server would not start and it fails. If I uninstall the component and restart the server, it starts and works smoothly.
    I have installed the same components to other BI servers without having any problems.
    Do you guys have any idea what could be causing this?
    Thanks in advanced.

    Zahid,
    Check if this line is added to the command line of the server holding the DS Server.
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    I had a similar problem, openned a support ticket and that solved it.
    Best
    Leandro

  • Custom Resource Renderer not coming on Implementing Flexible UI Components

    HI,
    I am using the Sneak Preview NW2004s SP9 with TREX .
    I have to modify the search result list as returned by the TREX using the default search, basically have to include a custom Link based on the resource name.
    I am trying to run the examples from the Knowledge Management and Collaboration Developer's Guide - "How to Implement Flexible UI Components".
    I deployed the par file for the sample application "Using Flexible UI Ready-Mades"
    and followed the steps as outlined below:
    System Administration>System Configuration>Knowledge Management -->Content Management
    1) Under
    User Interface->Mapping>Resource Renderer
    Created a new mapping for the java class com.sap.km.ui.renderer.SimpleResourceRenderer
    2) Then under
    User Interface->Settings>Resource Renderer Settings
    Created a duplicate of  SearchResourceRenderer
    and in the copy changed the Resource Renderer to the custom one(as the one mapped in previous step).
    In the Search Result layout Set, i changed the Resource Renderer Name to the custom one.
    Now i restarted the server.(i tried restarting after almost all the steps )
    But my resource renderer is not coming after i execute the TREX Search.The list returned seems to use the default Resource Renderer.
    I even tried by making an advanced copy of the Search Layout Set, changed the Resource Renderer name, updated the OTH file(search.oth), Switched on the degugging for the WdfProxy and reloaded the OTH.
    Now the new layout Set is being used but still i cannot see the result as per the custom resource renderer.
    Morover, if i try to print some message from the resource renderer code(Component render method), it is not printed in the default Trace file.
    Please help me in identifying and resolving the problem.
    Thanks,
    Siddhartha

    Hi Detlev,
    Sorry for the delay.
    We don't want to exlude the folders, we would like keep it, the problem is, instead of appearing the folder name, is displayed the error message and below the actions (details, delete, …).
    At first, we thought that could have been an error in the configuration of LayoutSet, but then, we tried on other two environments, with the default LayoutSet configuration and we still get, on the three environments, the same error message.
    Any idea?
    Thanks and Regards,
    John

  • Custom component problem

    I wrote a custom component:
    Here is the code for the UIComponent:
    package customcomponents;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import java.util.Vector;
    import jsf.*;
    public class UIEventsTable extends UIComponentBase {
         public String getFamily() {
              return "EventsTable";
         public void encodeEnd( FacesContext context ) throws java.io.IOException {
              Vector<Event> events = (Vector<Event>) this.getAttributes().get("events");
              ResponseWriter writer = context.getResponseWriter();
              writer.startElement("table" , this );
              for( int i = 0 ; i < events.size() ; ++i ) {
                   writer.startElement("tr",this);
                        writer.startElement("td",this);
                             writer.write( events.elementAt(i).getEvent_description() );
                        writer.endElement("td");
                   writer.endElement("tr");
              writer.endElement("table");
    }This is the tag class
    package customcomponents;
    import javax.faces.webapp.*;
    import javax.faces.component.*;
    import java.util.*;
    import jsf.*;
    public class EventsTableTag extends UIComponentTag {
         Vector<Event> events = null;
         public String getRendererType() {
              return null;
         public String getComponentType() {
              return "EventsTable";
         public void release() {
              super.release();
              events = null;
         protected void setProperties( UIComponent component ){
              super.setProperties( component );
              if( events != null )
                   component.getAttributes().put( "events" , events );
         public Vector<Event> getEvents() {
              return events;
         public void setEvents(Vector<Event> events) {
              this.events = events;
    }Taglib descriptor:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlib-version>1.0</tlib-version>
        <jsp-version>1.2</jsp-version>
        <short-name>d</short-name>
         <uri>http://eventsTable.com/</uri>
        <tag>
             <name>EventsTable</name>
               <tag-class>customcomponents.EventsTableTag</tag-class>
               <body-content>JSP</body-content>
             <attribute>
                  <name>events</name>
             </attribute>
             <attribute>
                  <name>id</name>
             </attribute>
             <attribute>
                   <name>rendered</name>
              </attribute>
              <attribute>
                   <name>binding</name>
              </attribute>
        </tag>
    </taglib>And finally how I invoke the tag
    <d:EventsTable events="#{location.events}" />
    ...Now location.events is a java.util.Vector with the events. But when I use this tag I get following error message:
    Servlet.service() for servlet Faces Servlet threw exception
    org.apache.jasper.JasperException: Unable to convert string "#{location.events}" to class "java.util.Vector" for attribute "events": Property Editor not registered with the PropertyEditorManagerI do not understand why this doesn't work. Because in a "h:dataTable" I can tell the component to use an array as an input. Even more I don't know what a PropertyEditorManager is.
    So how can I pass the vector object to this custom component?

    I have tried with tomcat-6.0.14 and RI 1.2_06-b02-FCS
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
       http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
       version="2.1">
       <tlib-version>1.1</tlib-version>
        <short-name>d</short-name>
         <uri>http://eventsTable.com/</uri>
        <tag>
             <name>EventsTable</name>
               <tag-class>customcomponents.EventsTableTag</tag-class>
           <attribute>
               <name>events</name>
             <deferred-value>
                <type>java.util.Vector</type>
             </deferred-value>        
          </attribute>
        </tag>
    </taglib>
    package customcomponents;
    import javax.el.ValueExpression;
    import javax.faces.webapp.*;
    import javax.faces.component.*;
    public class EventsTableTag extends UIComponentELTag {
         private ValueExpression events = null;
         public String getRendererType() {
              return null;
         public String getComponentType() {
              return "EventsTable";
         public void release() {
              super.release();
              events = null;
         protected void setProperties( UIComponent component ){
              super.setProperties( component );
              component.setValueExpression("events", events);
         public void setEvents(ValueExpression events){
              this.events = events;
    }

  • Custom Property Renderer - class not found error?

    Hi,
    I am trying to create a custom property renderer in KM - just a basic Hello World for now, as in some of the other threads on SDN.
    When I use the renderer for a property in my layout set, nothing is displayed.
    My code is as follows:
    public class SBPCPropertyRenderer extends AbstractPropertyRenderer
         public Component renderProperty(IProperty property, IResource res, int maxLength)
              throws WcmException
              TextView t = new TextView();
              t.setText("Hello World");
              return t;// renders a property
    public interface IRFServiceWrapper extends IService
        public static final String KEY = "com.company.project.km.SBPCPropertyRenderer";
    public class RFServiceWrapper implements IRFServiceWrapper
         private IServiceContext mm_serviceContext;
          * Generic init method of the service. Will be called by the portal runtime.
          * @param serviceContext
         public void init(IServiceContext serviceContext)
              mm_serviceContext = serviceContext;
                CrtClassLoaderRegistry.addClassLoader(this.getKey(), this.getClass().getClassLoader());
          * This method is called after all services in the portal runtime have already been initialized.
         public void afterInit()
          * configure the service : @param configuration
         public void configure(IServiceConfiguration configuration)
          * This method is called by the portal runtime when the service is destroyed.
         public void destroy()
          * This method is called by the portal runtime when the service is released.
         public void release()
         * @return the context of the service, which was previously set by the portal runtime
         public IServiceContext getContext()
                return mm_serviceContext;
          * This method should return a string that is unique to this service amongst all
          * other services deployed in the portal runtime.
          * @return a unique key of the service
         public String getKey()
                return KEY;
    However, when I try to render using this bespoke renderer, I get the following error in the Default Trace:
    #1.5#000BCDEE0DD8005600000082000006C00004497AFED42BF7
    #1206692517085
    #com.sapportals.wcm.rendering.property.PropertyRendererUtil
    #sap.com/irj
    #com.sapportals.wcm.rendering.property.PropertyRendererUtil
    #username
    #6737
    #ITNSAPNT06_J2E_4316950
    #username
    #9cf6bb00fc9e11dcbc54000bcdee0dd8
    #SAPEngine_Application_Thread[impl:3]_34
    #0
    #0
    #Error
    #Plain
    #Either the class com.company.project.km.SBPCPropertyRenderer could not be found oder the following error occurs while rendering: java.lang.ClassNotFoundException: com.company.project.km.SBPCPropertyRenderer
         at com.sapportals.wcm.crt.CrtClassLoaderRegistry.findClass(CrtClassLoaderRegistry.java:176)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.wcm.rendering.property.PropertyRendererUtil.renderProperty(PropertyRendererUtil.java:122)
         at
    My PortalApp.xml is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal"/>
      </application-config>
      <components/>
      <services>
        <service name="default">
          <service-config>
            <property name="className" value="com.company.project.km.SBPCPropertyRenderer"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.company.project.km.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    Can anyone spot what I am doing wrong?
    Thanks,
      Tom

    Hi Tom,
    I've implemented similar behaviour but with the state of resource. The code is following:
    private static final class URLs {
              private static final String BEFORE_APPROVAL = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/public/mimes/images/s_s_ledr.gif";
              private static final String APPROVAL = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/public/mimes/images/s_s_ledy.gif";
              private static final String PUBLISHED = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/public/mimes/images/s_s_ledg.gif";
              private static final String     ARCHIVED = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/public/mimes/images/s_s_ledi.gif";
         public Component renderProperty(IProperty property, IResource res, int maxLength){
              Image image = null;
              try {
                   IRepositoryServiceFactory factory = ResourceFactory.getInstance().getServiceFactory();
                   IURLGeneratorService ug = (IURLGeneratorService)factory.getService(IServiceTypesConst.URLGENERATOR_SERVICE);
                   IStatemanagementManager stateManager = (IStatemanagementManager) factory.getRepositoryService(res,IWcmConst.STATEMANAGEMENT_SERVICE);
                   IStatemanagementUtilsResource sResource = stateManager.getStatemangementResource(res).getUtils();
                   Locale locale = res.getContext().getLocale();
                   IState state = sResource.readState();
                   if (state.getID().equalsIgnoreCase(States.BEFORE_APPROVAL))
                        image = new Image(ug.createAbsoluteUri(new UriReference(URLs.BEFORE_APPROVAL,null,null)).getPath(), state.getDescription(locale));
                   if (state.getID().equalsIgnoreCase(States.ARCHIVED))
                        image = new Image(ug.createAbsoluteUri(new UriReference(URLs.ARCHIVED,null,null)).getPath(), state.getDescription(locale));
                   if (state.getID().equalsIgnoreCase(States.APPROVAL))
                        image = new Image(ug.createAbsoluteUri(new UriReference(URLs.APPROVAL,null,null)).getPath(), state.getDescription(locale));
                   if (state.getID().equalsIgnoreCase(States.PUBLISHED))
                        image = new Image(ug.createAbsoluteUri(new UriReference(URLs.PUBLISHED,null,null)).getPath(), state.getDescription(locale));
                   return image;
              } catch (Exception e) {
                   StatePropertyRenderer.log.fatalT(e.getMessage());
                   return image;
    But you can simply take one of the properties of your resource with the method res.getProperty(<IPropertyName>) instead of state and check the value of this IProperty. I took images from KM but you can also add necessary images to your project and use them.
    Regards
    Pavel

  • 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...

  • 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

  • Custom Component UI not displaying in 11G

    Hi All,
       We have a custom component in 10G where we have added new link in the UCM Home Page, it will be displayed beside Administration tab with name Edit Tables, under this we have sub links Alldistr_RVS, Distprod, Distuser, Prdstate, Products_RVS, State_RVS, Stateusr. When we deployed this code in 11G it is not working. Could any one please provide me code to make it work in 11G instace. Appreciate your help on this.
    Below is the code used in 10G in resource file
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    ampfRVSEditTables htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamichtml custom_finish_layout_init@>
    <$include super.custom_finish_layout_init$>
      <$include how_to_components_menu$>
      <$include vbis_edit_tables_link$>
    <@end@>
      <@dynamichtml how_to_components_menu@>
      <$if not how_to_components_menu_included$>
      //add a drop-down menu, or a tray to the UI
      navBuilder.addChildNodeTo('NAVTREE', 'collection', 'id==EDIT_Tables', 'label==Edit Tables');
      if (navBuilder.menuB)
      navBuilder.menuB.addTopLevelNode("EDIT_Tables");
      else if (navBuilder.trayA)
      navBuilder.trayA.addTopLevelNode("EDIT_Tables");
      <$EDIT_Tables_menu_included=1$>
      <$endif$>
      <@end@>
    <@dynamichtml vbis_edit_tables_link@>
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==ALLDISTR_RVS',
    'label==Alldistr_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_ALLDISTR_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTPROD',
    'label==Distprod', 'url==<$HttpCgiPath$>?IdcService=GET_DISTPROD_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTUSER',
    'label==Distuser', 'url==<$HttpCgiPath$>?IdcService=GET_DISTUSER_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRDSTATE',
    'label==Prdstate', 'url==<$HttpCgiPath$>?IdcService=GET_PRDSTATE_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRODUCTS_RVS',
    'label==Products_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_PRODUCTS_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATE_RVS',
    'label==State_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_STATE_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATEUSR',
    'label==Stateusr', 'url==<$HttpCgiPath$>?IdcService=GET_STATEUSR_PAGE');
    <@end@>
    </body>
      </html>
    Thanks.
    Ashok

    Hi Jiri,
       I from the sample example I tried to develop component to display HOW_TO_COMPONENTS as Menu item under which there is sub item Annuity_Dispname_Mapping, but it is not displaying. I am afraid where it went wrong. Below is the code i used, please help me to fix this. Thank you
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    MenuExample htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamicdata CoreMenuItems@>
    id,           label,       linkType, linkData
    HOW_TO_COMPONENTS, How To Components, YuiDev,
    ANNUITY_DISPNAME_MAPPING, Annuity_Dispname_Mapping, YuiDev, <$HttpCgiPath$>?IdcService=GET_DATA_ACCESS_PAGE
    <@end@>
    <@dynamicdata CoreMenuItemRelationships@>
    <?commatable mergeKey="primaryKey"?>
    parentId,    id,           loadOrder
    MENU_A,      HOW_TO_COMPONENTS,  1000
    HOW_TO_COMPONENTS, ANNUITY_DISPNAME_MAPPING, 10
    <@end@>
    <@dynamicdata CoreMenuItemsFlags@>
    id,           flags
    HOW_TO_COMPONENTS, isLoggedIn
    ANNUITY_DISPNAME_MAPPING, isLoggedIn
    <@end@>
    <@dynamicdata CoreMenuItemsImages@>
    id,           image,                imageOpen
    HOW_TO_COMPONENTS,     ScsPageItem.gif,
    ANNUITY_DISPNAME_MAPPING,     ScsPageItem.gif,
    <@end@>
    <@dynamicdata ampcustom_menu_items_template_data@>
    <?commatable indexedColumns="id"?>
    id,                  parentId,    linkType,        flags
    HOW_TO_COMPONENTS_LINK_TEMPLATE, HOW_TO_COMPONENTS, external,
    <@end@>
    <@dynamichtml custom_navigation_menu_items@>
    <$include super.custom_navigation_menu_items$>
      <$urlCount = 0$>
      <$if utLoadResultSet("pne_portal", "PersonalURLS")$>
      <$if rsFirst("PersonalURLS")$>
      <$loop PersonalURLS$>
      <$ddAppendIndexedColumnResultSet("ampcustom_menu_items_template_data", "NavigationMenuItems", "id", "HOW_TO_COMPONENTS_LINK_TEMPLATE")$>
      <$rsLast("NavigationMenuItems")$>
      <$NavigationMenuItems.id = "HOW_TO_COMPONENTS_" & urlCount$>
      <$NavigationMenuItems.label = js(title)$>
      <$NavigationMenuItems.linkData = js(website)$>
      <$NavigationMenuItems.loadOrder = urlCount$>
      <$urlCount = urlCount + 1$>
      <$endloop$>
      <$endif$>
    <$endif$>
    <@end@>
    </body>
    </html>
    Thanks

  • Decode-method for custom component isn't called

    Hi,
    i have writen a custom component which gets some information by command-link. To make the data from the link accessible, i wrote a decode method in my renderer and in me component. But both method are not called from the faces framework.
    Dows anybody knows what i made wrong???
    Thanks, Sebastian

    Hi,
    thank you for your reply.
    Unfortunately the processDecodes(...) of my component is also not called from the framework. Does anybody knows what i'm making wrong???
    Thanks!

Maybe you are looking for

  • Building Tree hierarchy Using nested loops and class cl_gui_column_tree

    Hello gurus, I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are

  • Flash with background sound (I got error #2037)

    Hallo. I am a beginner at AS3 programming. I like to make a flash with background sound (*.mp3 files from *.xml list). Everything works fine, but when I press "onClick" button I got output error. Error: Error #2037: Functions called in incorrect sequ

  • Table for Product Price & Sales Organisation

    Hi All, We have a scenario wherein products are maintained in ECC & downloaded to CRM. I have checked thru comm_product if products have been successfully downloaded to CRM. I can get GUIID from this table. Now, I want to check if these products have

  • Aperture 3 slideshow: How to stop and then restart  at the same point?

    I am about to give a slideshow in Aperture 3 (or could use iPhoto). I need to run the show for a while, stop it and then use a different app and then come back to Aperture and restart the slideshow from where I stopped it. Simply pausing and restarti

  • OS X Panther and TechTool Pro

    Can an earlier version of TechTool Pro be used to diagnose and fix issues with a drive with Panther 10.3.9 installed? I have tried to install TechTool pro version 4.1.1 for Panther on my beige G3 and it will not launch. It "unexpectedly quits". Also,