Html components to JSF

hi
i have a html page ie written purely using html tags. and im now trying to use the JSF components instead of html tags.
is there any way to do this.
i have to open the html file in JDev 11.and change the html tags to JSF.
How to do this????

im sorry to confuse u.
im writing it again.
i have a html page ie check_html.html
i copied tht file along with the css and the images used in the file into the public_html directory of an exsisting project.
and it runs fine.
now i wanted to use jsf components in this html file.but in the component palatte there is only html componenets.so i could not replace the html components with JSF.
so i saved this file as check_html.jsp file in the same location.
now when i opened this file all tag lib are displayed in the component palatte.
so i used the jsf components also in the new check_html.jsp file.and i could see it fine in the
design view.
By WEB-INF directory contains all xmls.
but once i run this check_html.jsp page i am getting the error
500 Internal Server Error
javax.servlet.jsp.JspException: Cannot find FacesContext     at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:427)     at com.sun.faces.taglib.html_basic.FormTag.doStartTag(FormTag.java:345)     at check_html._jspService(_check__html.java:50)     [check_html.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)

Similar Messages

  • Set html components JSF

    Hi there,
    I m using JSF but in some places there are simple html components like <select> menu.
    I want to set HTML components when loading page dynamically on the basis of student record.
    Can someone give me a hint how I can set html components using jsf while page is loading?
    Any work-arounds would also be highly appreciated.
    Regards,
    Arsalan

    well this has given me some hint, thanks.
    However my main problem is that I have a code in html page page1 like
    <input id="rdCamp_0" type="radio" name="rdCampus" value="A" />
    <input id="rdCamp_1" type="radio" name="rdCampus" value="C" />
    <input id="rdCamp_2" type="radio" name="rdCampus" value="B" />Now at run time, from backing bean I want to set one of these radio html components like when I am calling page1. I want to set the value of html radio button according to my database record.
    Regards,
    Arsalan

  • JSF Components in HTML Components

    Hi,
    I'm trying to use JSF components as children of HTML components but the UI isn't being rendered properly.
    Basically, here's my scenario:
    <ul>
         <li>
              <h:commandLink id="newQuoteLink" styleClass="topNav" action="#{pc_HeaderFragment.newQuote}">
                   <h:outputText value="Add New Quote"/>                              
              </h:commandLink>               
         </li>
    </ul>All I want rendered is a text link ("Add New Quote") that will execute a backing bean method
    When I run the server, the <a> tag is generated before my original <ul> list.
    How come it can't simply return to the outputtext to the location that I called it?
    Am I missing something here?
    Thanks in advance!
    Matt

    Looks like you're using JSF 1.1. At this version of the spec, there were issues with content interweaving that necessitated the need
    of f:verbatim tags to wrap template text (i.e. non jsf-markup).
    This isn't necessary for 1.2, but if you must stick with 1.1, your markup should look something like:
    <f:verbatim>
    <ul>
        <li>
    </f:verbatim>
    <h:commandLink id="newQuoteLink" styleClass="topNav" action="#{pc_HeaderFragment.newQuote}">
        <h:outputText value="Add New Quote"/>                              
    </h:commandLink>            
    <f:verbatim>
         </li>
    </ul>
    </f:verbatim>Given the ugliness if this, if you have to use JSP for your views, migrate to JSF 1.2.
    If you must stay with 1.1, look into Facelets [1], Clay [2], or JSFTemplating [3]
    as a substitute for JSP as you won't have these issues.
    [1] https://facelets.dev.java.net
    [2] http://shale.apache.org
    [3] https://jsftemplating.dev.java.net

  • Strategy for converting HTML mockups to JSF

    This is a summary of our front-end development process:
    - designers create PNG mockups
    - UXers create HTML mockups
    - developers create final JSF
    Now, these HTML mockups are pretty complete. They use all our in-house JavaScript widgets, production CSS files, responsive design, accesibility requirements, SEO-friendly code, proper semantics etc. So basically the final HTML we need from the JSFs has to nail these mockups, otherwise widgets might not work, styles might not appear correctly, accesibility errors might crop in and SEO might suffer. The developers tend to have limited experience in HTML/JavaScript/CSS/accesibility, especially compared to the UXers, so the less they can do to screw up the HTML the better.
    With this in mind we tell our developers to just convert the very minimum to JSF. So that basically means forms & form elements and the occasional loop. For example we tell them to avoid h:dataTable and just use the given HTML table and a loop - for some reason (probably lack of experience) we found it very difficult to nail the right HTML in terms of thead, tbody, th and td (or to get a rowspanned "There are no results" output for empty lists). We even tell them to use straight EL instead of h:outputText (unless they really need it) for i18n literals or form outputs. Then there is the added complication in that we use HTML5 (currently using a RenderKit for that). I also prefer to avoid tying my HTML to a given technology: I don't want my JavaScript/CSS to depend on JSF (or PrimeFaces or whatever) output, I want it to depend on what we consider the "correct" HTML in terms of semantics (ie, unobtrusive frameworks).
    Would you say this is a correct strategy? I find it helps reduce developer workload (less to convert), reduces front-end errors (less to screw up), and might it also reduce memory footprint on the server (less component tree)? Or am I missing something?

    Hi!
    You can import your html page into project.
    1) Click 'File->Add Existing Item->Web Page'.
    2) In field 'File or URL' enter path to your html.
    3) Check that 'Convert HTML tags to JSF Components' checkbox is checked.
    4) Click OK.
    Your HTML page will be transformed to JSP page.
    Thanks,
    Roman.

  • Style Message in design view with Apache Trinidad HTML components

    Hi !!!
    I'm using Apache Trinidad HTML components. In that components after using Table Layout I'm trying to use Row layout after dragging the row layout to the design view the following message is appearing in the design view, the same is happening in the browser window also.
    style="position:absolute;width:auto;height:auto;top:0px;left:0px;bottom:0px;right:0px"
    Thanks in Advance
    Anil Kumar Golla

    Ric,
    First I created an application by selecting New Application from the Application Navigator. In that application window I submitted relevant names for creating the new application, after that it displayed the project window in that I given the project name then in Jdeveloper's Application window the project name is displayed from there I selected new by right clicking, in that New gallery window, I selected Web Tier > Page Template > Ok. In the Create Jsf Page template window I created a File Name and Facet Definitions namely North, West, East, South and Center. After that Jdeveloper created the new JSPX page. In that page first I dragged panel stretch layout from Adf Faces to the Jdeveloper's design view and given facet references (North, West, East, South and Center). In the North Portion I dragged the Apache Trinidad HTML's Table Layout component, after that Row layout, then in the design window I'm getting the "style="position:absolute;width:auto;height:auto;top:0px;left:0px;bottom:0px;right:0px". The same is displaying in the browser window also.
    Thanks in Advance
    Anil Golla

  • Converter for converting all HTML tags to JSF tags

    hai all,
    i am new to JSF. i need a suggestions to convert all my HTML pages to JSF pages bcoz i was already created more pages in HTML and now i want to convert all the pages to JSF. can u give any suggestion plz post it here or send me a mail to [email protected]
    thanks in advance,
    regards,
    V.Sabarish

    hi roman,
    thanks for ur reply. it converts the file but the links r not converting....so can u suggest me another way for converting a HTML tags to JSF tags.

  • Embedding html code in JSF

    I need to embed html code in JSF. This is how I am trying to do that.
    <jsp:directive.page import="com.hp.ilm.db.webconsole.datamodel.deployment.RepoDeployModel"/>
    .           <f:subview id="sub">
                <ui:fragment rendered="#{redeployModel.CHECKSTRING}">
                    <p>We must verify that you have the required access<br></br></p>
                    <f:verbatim>
                     <p>Please create the file <code>"${RepoDeployModel.getVerificationFile().getAbsolutePath()}"</code></p>
                    </f:verbatim>
                </ui:fragment>
                </f:subview>When I try to run this, I get the following error:
    javax.servlet.ServletException: Error Parsing: ${RepoDeployModel.getVerificationFile().getAbsolutePath()}
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    Please help me find the problem with the code.
    Thanks,
    Navdeep

    This is just invalid EL. According to EL specs the proper format would be${repoDeployModel.verificationFile.absolutePath}Knowing that, the JSP directive with page import is completely superfluous. Just let jsf/bean/servlet/whatever create the class and put it in the desired scope.

  • Resizing html components based on monitor resolution

    I have an AIR app that runs in full screen mode continuously as a kiosk.  However when it is installed on computers with low resolution monitors, some of the components get chopped off and even worse, the borders sometimes only display on three sides due to these clipping issues.  How can I avoid this.  The components in question are html components and the app essentially flips through a series of web pages, reloading them after each iteration. 
    Here's a sample of a component:
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" clipContent="true" backgroundAlpha="0"
    horizontalScrollPolicy="off" verticalScrollPolicy="off" hideEffect="Fade" showEffect="Fade"
    horizontalAlign="center" verticalAlign="middle" id="pan1" >
    <mx:HTML styleName="effectBox"  verticalScrollPolicy="off" id="html1" location="http://mydomain.com/index.html"/>
    </mx:VBox>
    // style:
    .effectBox {
    borderColor: #000000;
    borderThickness: 10;
    borderStyle: solid;
    cornerRadius: 5;

    domWindow is a reference to the HTML page's window object. You use it to access the JavaScript execution context from your ActionScript code.
    Out of curiosity, I put together a demo:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
         <mx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   private var elem;
                   protected function button1_clickHandler(event:MouseEvent):void
                        elem.style.zoom = parseInt(elem.style.zoom)10'%';
                        trace("Zoom: " + elem.style.zoom);
                   protected function button2_clickHandler(event:MouseEvent):void
                        elem.style.zoom = parseInt(elem.style.zoom)-10+'%';
                        trace("Zoom: " + elem.style.zoom);
                   protected function html_completeHandler(event:Event):void
                        elem = html.domWindow.document.body;
                        elem.style.setProperty( "zoom", "100%", "0" );
              ]]>
         </mx:Script>
         <mx:Button click="button1_clickHandler(event)" label="Zoom In"/>
         <mx:Button click="button2_clickHandler(event)" label="Zoom Out"/>
         <mx:HTML id="html" location="http://www.adobe.com" complete="html_completeHandler(event)"/>
    </mx:WindowedApplication>
    I don't know if this will work for your issue or not. There is certainly some funkiness in how the page layout reacts to zooming. Images on the page are still scaled, of course, though text looks better with this technique.

  • How to add raw HTML tags inside JSF tags...

    Hi
    I would like to use <input type = text > inside my project in some area..The following code hides the input = type html tag and forwards the click event to jsf command button...After selecting the file,it should forward the value to jsf textfield....
    My code seems as below.
    <h:form id="detailForm" onsubmit="printElements(detailForm,this)">
    <f:verbatim>
    <input id="uploadFile" type="file" style ="dispaly:none"size="100" />
    </f:verbatim>
    <h:inputText id="docName" style="width:650px;" maxlength="100"/>
    <h:commandButton id="visibleBrowseButton" value="Select File..." onclick="'detailForm:uploadFile'.click();callClick();">
    </h:commandButton>
    </h:form>
    <script type="text/Javascript">
    function callClick()
    var val = document.detailForm.uploadFile.value;
    document.getElementById('detailForm:docName').value = val;
    </script>
    While running this page it works fine in IE but in Mozilla firefox it troubles me during detailForm:uploadFile'.click().
    I suspect the jsf page cannot able to detect the raw html tag inside jsf tags...Eventhough i tried using inside<f:verbatim> it wont works..
    I would like to know
    1.Whether the code is right,,if the code goes wrong why it got runned in IE not in firefox....
    2.How can raw html tags can be integrated inside JSF tags....

    First of all, why are you ignoring valuable answers about a JSF fileupload component in your previous topic?
    Second, you can just nest raw HTML anywhere in your JSF page. Your problem is rather related to JavaScript. It has completely nothing to do with Java nor JSF. Learn JavaScript -there is a nice tut at w3schools.com- and look for a JavaScript forum if you still stucks. There are ones at webdeveloper.com and dynamicdrive.com.
    The f:verbatim is only required if you was using JSF 1.1 or older, which is not the case. You would have occurred completely different problems.

  • Building custom components in jsf 1.2

    HI all
    i am having custom component which has one text field and button together which is extended from a panelgroup component and adding text field and button and child component to this.
    in jsf1.1 i am not getting any error, but jsf 1.2 i am getting arrayoutofbounds exception in processrestorestate.
    when printing the log in jsf1.2 uicomponentbase we can see that after text and button fields are rendered again textfield is rendered.and kid of panel is 4. can you suggest how building the above custom component.
    kid.........4 facet count.0 family javax.faces.Panel
    stateStruct.........[Ljava.lang.Object;@c0f87elength.......2
    childstate.....[Ljava.lang.Object;@fa302clength...2
    Child Count4
    kids....4
    kid.........0 facet count.0 family javax.faces.Input
    stateStruct.........[Ljava.lang.Object;@170d9d4length.......2
    kid.........0 facet count.0 family javax.faces.Command
    stateStruct.........[Ljava.lang.Object;@1ed1c32length.......2
    kid.........0 facet count.0 family javax.faces.Input
    Aug 13, 2008 6:32:49 PM com.sun.faces.lifecycle.Phase doPhase
    SEVERE: JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1d63e96]
    Aug 13, 2008 6:32:49 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.ArrayIndexOutOfBoundsException: 2
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1185)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1189)
         at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:235)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:316)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:337)
         at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
         at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:131)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:176)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at mgeretail.gateway.SecurityFilter.doFilter(SecurityFilter.java:205)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)

    hi
    is there a problem in rendering code in have given for the component. please tell me what is wrong in the code.
    my component code is
    package components;
    import javax.faces.component.html.HtmlInputText;
    import javax.faces.component.html.HtmlCommandButton;
    import javax.faces.component.html.HtmlPanelGroup;
    public class CGLookup extends HtmlPanelGroup
        private HtmlInputText text1;
        private HtmlCommandButton btn1;
        private String key,valueText,id;
        private String width,valueChangeListener;
        private int maxLength;
        private boolean required;
        private static Class valueChangeListenerArgs[]= (new Class[] {javax.faces.event.ValueChangeEvent.class});
        public CGLookup()
            super();
            //this.setSeparator("");
            this.setStyle("width:198px;");
            text1= new HtmlInputText();
            text1.setStyle("width: 150px;");
            btn1 = new HtmlCommandButton();
           // btn1.setMini(true);
           // btn1.setStyle("width: 7px; height: 20px");
            btn1.setLabel("?");
            this.getChildren().add(text1);
            this.getChildren().add(btn1);
        public void setId(String id)
            super.setId(id);
            text1.setId(id+"_txt");
            btn1.setId(id+"_btn");
        public String getText()
            if(text1.getValue() !=null)
                return text1.getValue().toString().toUpperCase();
            return null;
        public void setText(String value)
            if(value!=null)
                text1.setValue(value.toUpperCase());
            else
                text1.setValue(null);
        public int getMaxLength()
            return text1.getMaxlength();
        public void setMaxLength(int value)
            text1.setMaxlength(value);
        public void setRequired(boolean value)
            text1.setRequired(value);
        public void setDisabled(boolean value)
                text1.setDisabled(value);
                btn1.setDisabled(value);
        public String getValueText()
            return valueText;
        public void setValueText(String value)
            valueText = value;
        public String getKey()
            return key;
        public void setKey(String value)
            key = value;
        public String getWidth()
            return width;
        public void setWidth(String value)
            width = value;  
            if (width != null)
                resize();
        public void resize()
            this.setStyle("width:"+width);
            int index = width.indexOf("px");
            String temp = width.substring(0, index);
            int _width = Integer.parseInt(temp);
            _width = _width -48;
            HtmlInputText t1 = (HtmlInputText) this.getChildren().get(0);
            t1.setStyle("width:"+ String.valueOf(_width)+"px");   
    }my tag code is
    package taglib;
    import javax.faces.component.html.HtmlInputText;
    import javax.faces.component.html.HtmlCommandButton;
    import com.sun.rave.web.ui.el.ConstantMethodBinding;
    import java.util.Map;
    import javax.faces.application.Application;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.webapp.UIComponentTag;
    public class CGLookupTag extends UIComponentTag
        /** Creates a new instance of CGLookupTag */
        public CGLookupTag() {
            block = null;
            separator = null;
            style = null;
            styleClass = null;
            visible = null;
            public String getComponentType()
            return "CGLookuptype";
        public String getRendererType()
            return "javax.faces.component.html.HtmlPanelGroup";
        public void release()
            super.release();
            block = null;
            separator = null;
            style = null;
            styleClass = null;
            visible = null;
        public void setRequired(String value)
        {        this.required = value;    }
          public String getText()
        {   return text;   }
        public void setText(String value)
        {        text = value;    }
        public String getValueText()
        {   return valueText;   }
        public void setValueText(String value)
        {        valueText = value;    }
        public String getKey()
        {   return key;   }
        public void setKey(String value)
        {        key = value;    }
          public String getAction()
        {   return action;   }
        public void setAction(String value)
        {        action = value;    }
          public String getvalueChangeListener()
        {   return valueChangeListener;   }
        public void setvalueChangeListener(String value)
        {        valueChangeListener = value;    }
         public String getWidth()
        {   return width;   }
        public void setWidth(String value)
        {        width = value;    }
         public void setMaxLength(String maxLength)
            this.maxLength = maxLength;
        protected void setProperties(UIComponent _component)
            super.setProperties(_component);
            if(block != null)
                if(isValueReference(block))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(block);
                    _component.setValueBinding("block", _vb);
                } else
                    _component.getAttributes().put("block", Boolean.valueOf(block));
            if(separator != null)
                if(isValueReference(separator))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(separator);
                    _component.setValueBinding("separator", _vb);
                } else
                    _component.getAttributes().put("separator", separator);
            if(style != null)
                if(isValueReference(style))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(style);
                    _component.setValueBinding("style", _vb);
                } else
                    _component.getAttributes().put("style", style);
            if(styleClass != null)
                if(isValueReference(styleClass))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(styleClass);
                    _component.setValueBinding("styleClass", _vb);
                } else
                    _component.getAttributes().put("styleClass", styleClass);
            if(visible != null)
                if(isValueReference(visible))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(visible);
                    _component.setValueBinding("visible", _vb);
                } else
                    _component.getAttributes().put("visible", Boolean.valueOf(visible));
              if(action != null)
                if(isValueReference(action))
                    javax.faces.el.MethodBinding _mb = getFacesContext().getApplication().createMethodBinding(action, actionArgs);
                   HtmlCommandButton btn = (HtmlCommandButton) _component.getChildren().get(1) ;
                    btn.getAttributes().put("action", _mb);
                } else
                    javax.faces.el.MethodBinding _mb = new ConstantMethodBinding(action);
                     HtmlCommandButton btn = (HtmlCommandButton) _component.getChildren().get(1) ;
                     btn.getAttributes().put("action", _mb);
                if(required != null)
                if(isValueReference(required))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(required);
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.setValueBinding("required", _vb);
                } else
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.getAttributes().put("required", Boolean.valueOf(required));
              if(text != null)
                if(isValueReference(text))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(text);
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.setValueBinding("text", _vb);
                } else
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.getAttributes().put("text", text);
              if(key != null)
                if(isValueReference(key))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(key);
                    _component.setValueBinding("key", _vb);
                } else
                    _component.getAttributes().put("key", key);
              if(valueText != null)
                if(isValueReference(valueText))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(valueText);
                    _component.setValueBinding("valueText", _vb);
                } else
                    _component.getAttributes().put("valueText", valueText);
              if(valueChangeListener != null)
                if(isValueReference(valueChangeListener))
                    javax.faces.el.MethodBinding _mb = getFacesContext().getApplication().createMethodBinding(valueChangeListener, valueChangeListenerArgs);
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.getAttributes().put("valueChangeListener", _mb);
                } else
                    throw new IllegalArgumentException(valueChangeListener);
              if(width != null)
                if(isValueReference(width))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(width);
                    _component.setValueBinding("width", _vb);
                } else
                    _component.getAttributes().put("width", width);
                if(maxLength != null)
                if(isValueReference(maxLength))
                    javax.faces.el.ValueBinding _vb = getFacesContext().getApplication().createValueBinding(maxLength);
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.setValueBinding("maxLength", _vb);
                } else
                    HtmlInputText txt = (HtmlInputText) _component.getChildren().get(0) ;
                    txt.getAttributes().put("maxLength", Integer.valueOf(maxLength));
        public void setBlock(String block)
            this.block = block;
        public void setSeparator(String separator)
            this.separator = separator;
        public void setStyle(String style)
            this.style = style;
        public void setStyleClass(String styleClass)
            this.styleClass = styleClass;
        public void setVisible(String visible)
            this.visible = visible;
        static Class _mthclass$(String x0)
            try
            {return Class.forName(x0);}
            catch (ClassNotFoundException x1)
            {throw new NoClassDefFoundError(x1.getMessage());}
        private String block;
        private String separator;
        private String style;
        private String styleClass;
        private String visible;
        private static Class actionArgs[] = new Class[0];
        private static Class actionListenerArgs[];
        private static Class validatorArgs[];
        private static Class valueChangeListenerArgs[];
        private String text,valueText,key,required;
        private String action,valueChangeListener;
        private String width,maxLength;
        static
            actionListenerArgs = (new Class[] {
                javax.faces.event.ActionEvent.class
            validatorArgs = (new Class[] {
                javax.faces.context.FacesContext.class, javax.faces.component.UIComponent.class, java.lang.Object.class
            valueChangeListenerArgs = (new Class[] {
                javax.faces.event.ValueChangeEvent.class
    }the component type CGLookuptype refers to first code. in jsf 1.2 UIComponentTag says it is deprecated. what should i use instead of it.

  • How to access/identify components in JSF Declarative Components?

    Hi,
    I am beginner on ADF. Trying to build first Declarative Components.
    Use Case is as follows -
    I have put 2 InputTexts in Declarative Component.
    Want to set some value in second InputText (txtAddressLine2) in Validator/ValueChangeListner method of first InputText(txtAddressLine2).
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <af:componentDef var="attrs" componentVar="component">
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>Test</display-name>
    <attribute>
    <attribute-name>
    AddressLine2
    </attribute-name>
    <attribute-class>
    java.lang.String
    </attribute-class>
    </attribute>
    <component-extension>
    <component-tag-namespace>Address3</component-tag-namespace>
    <component-taglib-uri>/Address3</component-taglib-uri>
    </component-extension>
    </component>
    </af:xmlContent>
    <af:inputText label="Address Line 1"
    binding="#{backing_Address3.txtAddressLine1}"
    id="txtAddressLine1"
    validator="#{backing_Address3.txtAddressLine1_validator}"
    autoSubmit="true" immediate="true" rendered="true"
    valueChangeListener="#{backing_Address3.txtAddressLine1_valueChangeListener}"/>
    <af:inputText label="Address Line 2" binding="#{backing_Address3.txtAddressLine2}"
    id="txtAddressLine2"
    validator="#{backing_Address3.txtAddressLine2_validator}"
    autoSubmit="true" immediate="true"/>
    </af:componentDef>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Address3-->
    </jsp:root>
    This is sample I am working on.
    I am trying following approaches in bean of Component itself.
    Approach I: This does not give any error, value is not set in txtAddressLine2
    this.getTxtAddressLine2().setValue("Some Value");
    Approach II: Not able to access txtAddressLine2 using findComponent() method
    UIViewRoot uiViewRoot = facesContext.getViewRoot();
    RichInputText inputText;
    inputText = null;
    if (uiViewRoot.findComponent("txtAddressLine2") != null) {
    System.out.println("Found ");
    inputText = (RichInputText)uiViewRoot.findComponent("txtAddressLine2");
    inputText.setValue("my value");
    } else {
    System.out.println("Not Found "); //Always not found
    Can anybody tell me correct way to access components and set their values inside Declarative Components itself?

    Thanks buddies....its resolved!
    This is how I have done it -
    Components have these 2 Input Texts :
    <af:inputText label="Label 1" id="txt1" autoSubmit="true" immediate="true"
    binding="#{DC2.txt1}" validator="#{DC2.txt1_validator}"/>
    <af:inputText label="Label 2" binding="#{DC2.txt2}" id="txt2"
    immediate="true" autoSubmit="true" partialTriggers="txt1"/>
    Code in Component Bean setting value is as follows:
    RichInputText txt22;
    txt22 = getTxt2();
    txt22.setSubmittedValue("Some Value");

  • HTML markup for JSF page

    I have a JSF page containing both standard JSF components and custom components. In the page am able to trigger AJAX requests,capture the requests in phaselistener. Now what I want is to generate output for a particular div inside the whole page. This div in turn contains a JSF page. The HTML markup corresponding to the page has to be sent to the browser.
    (i.e) I need a mechanism wherein I can specify the name of JSF page,get the HTML markup for the same and send it across to the browser as response. Please guide me as how to go about it.

    Its been a week since I posted this query.Still no replies. Let me make myself clear.
    Suppose am having
    <h:panelGroup id="outerDiv">
                     <h:panelGroup id="innerDiv1">
                                    <jsp:include > //Includes firstpage-JSF page
                      </h:panelGroup>
                      <h:panelGroup id="innerDiv2">
                                    <jsp:include > //Includes second page-JSF page
                       </h:panelGroup>
    </h:panelGroup>I want to send an AJAX request,fetch corresponding HTML markup for the JSF page I have included and use it in javascript to write to the <div>. So is there any mechanism wherein I can give the name of the JSF page, get the corresponding HTML markup? If not, is there any workaround? I dont want to use any third-party components.

  • JSF components within jsf components programatic

    I am using the java sun pane_tabbed component on a jsf page and I want another jsf page to be the tab body. I tried to include another jsp page but that doesn't work. The include in the example something like
    <h:panelGroup>
    <h:outputText value="here is some info to display on tab "/>
    </h:panelGroup>
    It seems I just can't say
    <h:panelGroup>
    here is some info to display on tab
    </h:panelGroup>
    This remind me of servlet days where everything was out.println and why we came up with jsp in the first place and I figure there's got to be a better way.
    So what's the way? I understand I could make the inner html another jsf tag but thats overkill for what I am trying to do. Also I need the inner html to be treated itself like an entirely different page (like a component) so just to put outputText around everything just wouldn't work.
    So what's the way

    In addition.... I understand that part of the JSF concept is that the client can be many different devices and depending on which client different widgets get displayed. A way that that could still be true is that I register a components in faces-config.xml by specifying that it is a jsp page (with jsf components). Then a jsf tree is built with the widgets I have included on the jsp page. Then I specify that the renderer is a jsp page renderer which would mean for my application it would display the jsf page like I wanted with the components where I wanted them. Then if I want to render on for instance a swing application I then need to program a renderer which says how to display these widgets there.
    I'm pretty new to JSF but I'm hoping that I am on the right track here. There should be some way for non java developers to help with the creation of components I would think.

  • Create reusable jsf components as jsf components

    Hi
    I'm new to JSF (and J2EE in general, I used to use WebObjects a decade ago). I'm using JSF 1.2
    so, I'd like to know if it is possible to create reusable jsf components designing some jsp page ?
    I'm particularly interressed in reusable components that, when used, are not leafs in the html trees (but so support that the reusing page provide some piece of html to be put "inside")
    Is there any way to do that ? (WebObjects, a decade or so ago, allowed to do that...)
    Thanks for your help
    cd

    Use Facelets instead of JSP. Then you can make use of ui:composition for this.
    By the way, J2EE is dead, it's called Java EE now. This keyword must give you more r|decent Google results.

  • Printing html pages from JSF-JSC created pages

    Hi all,
    I have a serious problem with my web apps created with JSC using the JSF components. I designed a page full of tables, developed in vertical for a total of about three or four pages scrolling down.
    When I try to print the generated page from the browser (Firefox, Safari, Explorer) I always get just the first 'page', the entire webpage generated by my application is not saw as a long page, but just 'cutted' out.
    It seems like all JSF components have some problems being like layers or so...any hint? How can I print my html page generated by my web app?
    G

    Perhaps viewing the source of the generated html page will give you a clue to what's wrong..

Maybe you are looking for

  • Everything gone after iOS 8.1 update!

    I installed the update to iOS 8.1 yesterday - iTunes says there is a back up yesterday morning prior to my update. After the update finally finished. It was stuck in a boot loop toggling between black screen and black screen with apple. After pluggin

  • How to refresh a table with multiple joins

    Hi, First at all, I'm newby in ADF, and my english is no so good, sorry for that... I'm using JDeveloper 11g Release 2 (11.1.2.3.0). I have a table created from a view object that have multiple joins with other entities. When I insert a new row progr

  • How to maintain Proof of Delivery in R/3

    Hi Guys, I just wanted to ask how can I maintain Proof of Delivery in R/3 I have a PO Number and Delivery Number as input. Thanks. Chris

  • Tricky Scenerio in AS 3.0

    Hi Guys I am trying to accomplish something which I think is little tricky for me in AS 3.0. Please help me out if you guys have any idea how to solve it. I am putting multiple instances of UILoader (containing videos) on the main stage and we can pu

  • APP-SQLAP-10380: You cannot select this payment document

    User did a quick payment. When the check failed to print user voided the check and tried to reprint. Now when the user is trying to reissue the check they are getting the following: APP-SQLAP-10380: You cannot select this payment document because it