Importing JSF Component in webdynpro

Hi,
Please let me know how to import JSF component in webdynpro in  CE 7.2 SP 01.
Thanks,
Raghu

Hi Raghavendra,
Please go through this [JSF (JavaServer Faces) Tutorial|http://www.vogella.de/articles/JavaServerFaces/article.html]
Hope this helps!!
Regards
Vijay K

Similar Messages

  • JSF component in webdynpro java

    Hi,
    In order to use JSF (1.2 or 2.0)  in webdynpro java CE 7.2 which version of java(javaEE5 or  javaEE6) need to be installed?
    Regards,
    Divya.

    Hi,
    NetWeaver 7.20 and all versions until today are based on Java EE 5 and therefore can only support JSF 1.2. As far as I know there is no support for JSF2.0 on NetWeaver.
    Regards,
    Raik

  • How to add properties to a custom JSF component?

    Hello, everybody!
    I've just developed my first custom JSF component. It's a data pager and it is working pretty well. But now I want to be able to use some of it attributes in my backing beans at runtime. I mean, I want to bind it to component in the JSF page. It already has a binding attribute in the tld file, but I want to be able to accesss two values that the renderer of my custom component calculate inside it, which would relieve me from calculating these values manually in the backing beans. So, I would like to know how to make these values external to the component.
    By now this is my custom pager class:
    import javax.faces.component.UICommand;
    public class UIPaginadorDados extends UICommand
    }You can see that it has no logic because all the logic is in the renderer class:
    import javax.faces.render.Renderer;
    public class PaginadorDadosRenderer extends Renderer
        // logic here
    }As I said I want to be able to do the following in my backing beans:
    private UIPaginadorDados pager = new UIPaginadorDados();
    // and later...
    pager.getCurrentPage();
    pager.getPageCount();In the JSF page:
    // I already can do this, because I have a binding attribute
    <urca:paginadorDados binding="#{backingBean.pager}" />I suppose that I'll have to create the properties getCurrentPage() and getPageCount() in the component class, UIPaginadorDados, but I don't know how to get the values to the properties from the renderer class. I don't even know if this is how I should do it.
    So I would appreciate a lot your help about this subject.
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    RaymondDeCampo wrote:
    I neglected to mention: do not forget to implement the methods in StateHolder to preserve the properties you added to your component.Hello, Raymond. Could you elaborate a little more on that? If you could give a short example, it would be helpful.
    MarcosNo problem. I have already found out how.
    Thank you very much, Raymond.
    Marcos

  • Tutorial on how to create an Ajax-enabled JSF component in Creator?

    Is there a tutorial on how to create (not use/import existing) an Ajax-enabled JSF component using Creator 2? I read somewhere that it was done during a presentation in 3 minutes! Now that I really want to see ;-
    thanks,
    -nikita

    As far as I remeber, Edwin Goei's examples are the
    closest thing to the info you are looking. He has an
    example component, but don't remember if they're
    AJAX enabled. Check it on
    http://wiki.java.net/bin/view/Javatools/CustomCompone
    tLibraries.
    Best regards
    Antonio.Thanks for the plug. I've been meaning to update that article. Writing an AJAX component is similar to writing other kinds of components but the developer uses AJAX techniques. The latest version of the popup calendar which is checked into the bpcatalog project of java.net uses Dojo which also has some support for AJAX. I haven't yet had time to update the article yet, unfortunately.
    -Edwin
    http://blogs.sun.com/edwingo/

  • Just extended my first jsf component. but in the right way?

    Hi all,
    After days of trial and error, i finally managed to code my own JSF component, extending existing infrastructure. Since things just suddenly fell in place during a brute force approach to make it work, i'd like to ask for opinions of seasoned JSF veterans whether this makes sense or there is a better way to do things.
    The objective was to be able to render a collection of items as a comma separated list. To this end, I took an existing data iterator UIComponent from richfaces, added a custom renderer -- again extending on richfaces, and hooked things up in 2 config files, as follows:
    CsvRenderer.java:
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import org.ajax4jsf.component.UIDataAdaptor;
    import org.richfaces.renderkit.AbstractRowsRenderer;
    import org.richfaces.renderkit.TableHolder;
    /** Renders a richfaces UIDataList component as a comma separated list */
    public class CsvRenderer extends AbstractRowsRenderer {
         @Override
         public void encodeOneRow(FacesContext context, TableHolder holder)     throws IOException {
              UIDataAdaptor table = holder.getTable();
              ResponseWriter writer = context.getResponseWriter();
              renderChildren(context, table);
              if(holder.getRowCounter() < table.getRowCount() - 1) {
                   writer.write(", ");
         @Override
         protected Class<? extends UIComponent> getComponentClass() {
              return org.richfaces.component.UIDataList.class;
    added to faces-config.xml:
    <render-kit>
         <render-kit-id>HTML_BASIC</render-kit-id>
         <renderer>
              <component-family>org.richfaces.DataList</component-family>
              <renderer-type>ahui.CsvRenderer</renderer-type>
              <renderer-class>com.b2international.auctionhouse.jsf.ahui.CsvRenderer</renderer-class>
         </renderer>
    </render-kit>
    added to ahui.taglib.xml:
    <tag>
         <tag-name>csv</tag-name>
         <component>
              <component-type>org.richfaces.DataList</component-type>
              <renderer-type>ahui.CsvRenderer</renderer-type>
         </component>
    </tag>
    cheers,
    Greg

    Hi all,
    After days of trial and error, i finally managed to code my own JSF component, extending existing infrastructure. Since things just suddenly fell in place during a brute force approach to make it work, i'd like to ask for opinions of seasoned JSF veterans whether this makes sense or there is a better way to do things.
    The objective was to be able to render a collection of items as a comma separated list. To this end, I took an existing data iterator UIComponent from richfaces, added a custom renderer -- again extending on richfaces, and hooked things up in 2 config files, as follows:
    CsvRenderer.java:
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import org.ajax4jsf.component.UIDataAdaptor;
    import org.richfaces.renderkit.AbstractRowsRenderer;
    import org.richfaces.renderkit.TableHolder;
    /** Renders a richfaces UIDataList component as a comma separated list */
    public class CsvRenderer extends AbstractRowsRenderer {
         @Override
         public void encodeOneRow(FacesContext context, TableHolder holder)     throws IOException {
              UIDataAdaptor table = holder.getTable();
              ResponseWriter writer = context.getResponseWriter();
              renderChildren(context, table);
              if(holder.getRowCounter() < table.getRowCount() - 1) {
                   writer.write(", ");
         @Override
         protected Class<? extends UIComponent> getComponentClass() {
              return org.richfaces.component.UIDataList.class;
    added to faces-config.xml:
    <render-kit>
         <render-kit-id>HTML_BASIC</render-kit-id>
         <renderer>
              <component-family>org.richfaces.DataList</component-family>
              <renderer-type>ahui.CsvRenderer</renderer-type>
              <renderer-class>com.b2international.auctionhouse.jsf.ahui.CsvRenderer</renderer-class>
         </renderer>
    </render-kit>
    added to ahui.taglib.xml:
    <tag>
         <tag-name>csv</tag-name>
         <component>
              <component-type>org.richfaces.DataList</component-type>
              <renderer-type>ahui.CsvRenderer</renderer-type>
         </component>
    </tag>
    cheers,
    Greg

  • Create a custom JSF component

    Hi,
    I want to create a custom JSF component. I've setup a new application containing 2 projects:
    - a 'components' project, containing all the custom components
    - a 'view' project, to test the created custom components.
    There is dependency between the components project and the view project. In the view project, I added the
    the Tld, in order to use my components in the project.
    From the component palette, I can drop a component onto a .jspx page but after running the page, no output
    is printed onto the screen. The HTML source code only contains my 'tag-name' (eg: <ctb:mytag/>)
    Am I doing something wrong?
    UIComponent:
    import java.io.IOException;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    public class BasicComponent extends UIComponentBase {
        public String getFamily() {
            return "BasicComponent";
        public void encodeBegin(FacesContext context) throws IOException {
            ResponseWriter out = context.getResponseWriter();
            out.write("Hello World");
    }Tag
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentTag;
    public class BasicComponentTag extends UIComponentTag {
        public String getComponentType() {
            return "BasicComponent";
        public String getRendererType() {
            return null;
    }Tld entry:
      <tag>
        <name>BasicComponent</name>
        <tag-class>BasicComponentTag</tag-class>
        <body-content>JSP</body-content>
      </tag>Thanks in advance,
    Koen Verhulst

    The body tag should be as follows
    <bodycontent>JSP</bodycontent>
    but the JSP will not work. Here is the file:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
    xmlns:cf="/WEB_INF/helloWorldLib.tld">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>List of Values</title>
    </head>
    <body><h:form>
    <cf:jsfhello hellomsg="This is it" />
    </h:form></body>
    </html>
    </f:view>
    </jsp:root>
    Edited by: bongo2 on Oct 28, 2008 2:58 PM

  • How to load a class dynamically (via reflection) in a jsf-component

    Hi all,
    I am writing my own jsf component and I would like to do it generically. Therefore I have an attribute, where the developer can pass a fully qualified classname, which I want to use to instantiate. But I have a Problem with the classloaders, everytime I get a ClassNotFound-Exception during debugging.
    Does anybody know how it is possible, to to get the most parent classloader?
    Currently I am even not able to load a class, which is in the same package like all other compontent-classes.
    Thank you very much in advance
    Thomas

    Within web applications, I believe it is recommended to use Thread.getContextClassLoader(). Keep in mind that web applications require different classloader semantics than regular Java applications. The class loader which gets resources from the WAR is favored over others, even when this violates the normal class loading conventions.

  • How can I include a javaScript files from within jsf component

    Is there any way using which I can include javascript files from my jsf component. Because otherwise I have to write all the javascript commands using writer.write which is very tedious rather than this I just want to include the javascript file which contains all the functions required. Also I want that this file should be included only once irrespective of the number of components included.
    Thanx in advance

    This doesn't depend on JSF. You need to include a script tag, like:
    <script src="/path/script.js"
    language="JavaScript" type="text/javascript"></script>
    If you want to include this only once, make a file included into every page, into which you can put other resources to be included along with this script.
    HTH,
    rs.

  • Problem in importing ESS Component.

    Hi,
        We have problem in importing ESS component from hard drive into server.
    Here is the details
    Comaponent sap.com_SAP_ESS - 600 Level 6 Update ERP05VAL.09201316
    We are importing it through CMS. its been 2 days since we initiate import. but still running.
    Please find the log details below.
    Software Component sap.com/SAP_ESS
    Version MAIN_ERP05VAL_C.20060920131656
    Label 600 Level 6 Update ERP05VAL.09201316
    System XSSTrack-Development
    Step Repository-import
    Log /local/dsk/data1/sap/trans/EPS/in/CMSsapaudev06DD0/CMS/log/XSSTrack_D@DD0/[email protected]
    The Log file does not have any info. empty.
    Please give Ur suggestions
    Cheers,
    Senthil

    Hi,
    the problem seems to be connection to the database or may be database URL is incorrect.
    The problem can be solved via the Visual Administrator or by a manual modification of the data-sources.xml file.
    Visual Administrator --> Server --> Services  -->  JDBC Connector -->Select DataSource
    Change the URL given in the Database URL field with the appropriate one & save it.
    For step by step process refer
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/2f2c4142aef623e10000000a155106/frameset.htm
    Thanks
    Swarup

  • How to make Javascript access standard JSF component

    Hello all,
    I'm in need of a proper javascript code that access standard jsf component.
    Like we do for html tags;
    if( el.tagName.toLowerCase() != 'select')
    I need to do the same thing for a jsf tag i.e; <h:selectOneMenu>. How to make javascript access <h:selectOneMenu> like it does with <select> tag ? Please let me know asap. Extremely sorry if the question is kind of stupid....cause I'm a beginner for JSF environment.
    Any sort of help, suggestion or advice would highly be appreciated.
    Thanks in advance.

    Ummmm, I may be off the beaten path, but by the time your javascript is called the h:selectOneMenu would be a select tag within the dom. You should be able to reference that tag as you normally would.

  • How can we navigate between two windows of same component in webdynpro ABAP

    Hi
    how can we navigate between two windows( not views ) of same component in webdynpro ABAP. its an urgent requirement
    Thanks in advance.
    Regards
    Laeeq

    Hi Laeeq,
    You cannot navigate between windows of one component. You can only call a dialog box showing the contents of a second window, or you can embed the contents of a window of a different component.
    Just add all the views you need to the one and only main window of the component.
    Ciao, Regina

  • JSF component inside HTML table -- not rendering properly

    I have a HTML table like the one below. In one of those columns (td) I have a JSF component. When I run the app, the JSF component (even if its a simple inputText or panelGrid or panelGroup) is not getting inside the td. Instead, it forms a seperate table after this td.
    Code I have:
    <table border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td>... ..MULTIPLE Td's here - Deleted for simplicity </td>
    <td class="topNav">
    Blog Directory
    </td>
    <td>
    <img src="./images/top_button_right.gif"/>
    </td>
    <td class="topNav">
    <f:panelGroup>
    <h:inputText value="Username"/>
    <h:inputSecret value="Password"/>
    </f:panelGroup>
    </td>
    </tr>
    </tbody>
    </table>
    What I expected:
    username, passwd field inside the top level HTML table.
    What comes: (as a result of running thsi JSF page )
    <table> -- Original table
    <td> </td> -- -TD that had the inputText - comes empty here
    </table>
    <table>
    <tbody>
    <tr>
    <td><input type="text" name="_id1:header:EasyHeader:_id4" value="Username" /><input type="password" name="_id1:header:EasyHeader:_id5" value="" /></td>
    </tr>
    <tr>
    <td><table>
    I am a newbie to JSF & due to the complexity of the layout & page, I m unable to get rid of the HTML tags totally.
    Thanks in advance.
    Ganesh

    Found the solution to the problem.
    wrapped the entire HTML page till the JSF component ( panelGrid) under <f:verbatim>.
    something like this
    <f:verbatim>
    <table>
    <tr> <td>...</td>
    <td>
    </f:verbatim>
    <h:panelGrid> ... </h:panelGrid>
    <f:verbatim>
    </td>
    </table>
    </f:verbatim>

  • Can i use one JSF component's value for other component in the same page.

    Can i use one JSF component's value for other component in the same page.
    For example
    I have a <h:selectBooleanCheckbox id="myChk"> in my jsf page, i want to access its value for another component like:
    <h:commandButton disabled="#{myChk.checked}" action="myAction" value="myValue" />
    ** "myChk.checked" >> I am just asuming "checked" property is available...

    Bind the checkbox to a UIInput myChk property. Then you can reference this property from the page, e.g.
    <h:selectBooleanCheckbox binding="#{myBean.myChk}" onchange="submit();" />
    <h:commandButton disabled="#{myBean.myChk.value}" action="myAction" value="myValue" />

  • Can't import JSF taglibs?

    can't import JSF taglibs?
    I'm newbie in JSF
    tryig to write simple example from
    as result server error
    org.apache.jasper.JasperException: An exception occurred processing JSP page /main.jsp at line 4
    1: <?xml version="1.0" encoding="UTF-8"?>
    2: <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    3: <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    4: <f:view>
    5: <html>
    6:     <head>
    7:         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> put into WEB-INF/lib:
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    standard.jar
    I use:
    Tomcat 6.0.2 Tomcat 5.5.9
    JDK 1.5 0 07

    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
            </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <session-config><session-timeout>
                30
            </session-timeout></session-config><welcome-file-list><welcome-file>
                index.jsp
            </welcome-file></welcome-file-list></web-app>

  • Unable to import software component version in IR

    Why i can't import software component version in IR by Tools->Transfer from SLD->import software component version?
    error message is "Unable to determine dependencies of software component version"
    i just create it in SLD before, anything else need to do?
    please give me some information, Thanks!

    Hi Robert,
    Please cross check with this blog on how to create a SWCV and import in IR.
    /people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i
    Regards,
    Sachin

Maybe you are looking for