Invoking JSF actions from a hyperlink

I suspect I already know the answer to this question based on my experiments and what I've read on the web and in books, but I thought I'd ask here just in case.
The basic problem is that I would like to invoke JSF from a hyperlink. For example: mystore.com/displayProduct.faces?id=1234
But I can't. JSF just seems to be (intentionally) built not to allow access to the JSF lifecycle via GET requests. Which makes it fine for web sites that are composed simply of loads of forms, but seems quite unsuitable for web sites that need to display products and search results via links that are easy to bookmark and easy for search engines to crawl.
Thanks for any words of wisdom anyone might have...

Thanks for the reply and the link. I had a look at the linked thread and might be able to use that technique for getting parameters out of a GET request into my action, but I still need to get JSF to call my action method somehow and there is no way that I can see to tell it which method to call.
Also, it seems like manually reading values from the request is sidestepping a lot of JSF and losing out on the value that it adds, i.e. validating and converting the parameters for me. I could manually populate components in the bean and then call the validators and converters myself, but still.

Similar Messages

  • Invoking ADF Actions from JS API

    Is there a way to invoke an action from a javascript function? Something that would perhaps mimic what this commandLink does:
    <af:commandLink text="Lights, Camera, Action!"
    id="chuckNorris" action="flyingKick"/>
    What I am looking for is the ability to invoke the action "flyingKick" from a javascript function.

    Thanks, I actually already saw this. What I need though is something that doesn't a serverListener though - a programmatic version of a commandLink with an action if you will.

  • Invoking pageflow action from Backing Files

    Hi,
    I have a requirement to be able to force a pageflow to a particular state by invoking a specific action on the pageflow from the preRender() method of a backing file.
    I.e under certain circumstances i want to force the portlet to return to its 'initial' state by running the begin action. It has to be done programitically and not setting refresh-action on the portlet.
    Is it possible to do this programatically from a backing file ? Is so any sample code would be appreciated !.
    TIA
    Martin

    What do you mean by state of a page flow?
    If you want to set the state of the portlet you can do that easily using the PortletBackingContext.
    If you want to clear the instance variables of a pageflow, you can do that by overriding methods in the parent class of PageFlowController.
    Kunal
    Kunal Mittal

  • How to invoke commandLink action?

    Hi!
    On my page i have commandLink defined like this:
    <af:commandLink binding="#{regBean.cmdLink}" text="commandLink 1" action="#{regBean.startRegistration}"/>
    i need to invoke its action automatically when the page is loaded (it is just "please wait" page") ... i have pagePhaseListener, my own afterPageLoad() method is invoked at right time.
    System.out.println("afterPageLoad");
    Object retVal = cmdLink.getAction().invoke(FacesContext.getCurrentInstance(),null);
    System.out.println("afterPageLoad end- "+retVal);
    But when i try invoke commandLink action from this method, it is not invoked, even debugging message after this call is not processed, no exception is thrown..
    What am i doing wrong? thanks a lot for any help
    Tomas

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
        public Test() {
         setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         Container content = getContentPane();
         JButton jb = new JButton("DO NOT PRESS");
         jb.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
              doFirstThing();
              doSecondThing();
         content.add(jb, BorderLayout.SOUTH);
         setSize(200,200);
         show();
        private void doFirstThing() { System.out.println("I'm doin mah thing!"); }
        private void doSecondThing() { System.out.println("I wanna go first!"); }
        public static void main( String args[] ) { new Test(); }
    }If you want something different from this, you are going to have to explain more.

  • How to call a struts action from a JSF page

    I am working on a small POC that has to do with struts-faces. I need to know how to call a struts ".do" action from a JSF page..
    Sameer Jaffer

    is it not possible to call a action from the faces submit button and/or the navigation?
    This a simple POC using struts-faces exmaples.
    Here is my struts-config and faces-config file.
    <struts-config>
    <data-sources/>
    <form-beans>
      <form-bean name="GetNameForm" type="demo.GetNameForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
      <forward name="getName" path="/pages/inputname.jsp"/>
    </global-forwards>
    <action-mappings>
      <action name="GetNameForm" path="/greeting" scope="request" type="demo.GreetingAction">
       <forward name="sayhello" path="/pages/greeting.jsp"/>
      </action>
    </action-mappings>
    <controller>
        <set-property property="inputForward" value="true"/>
        <set-property property="processorClass"
                value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    </struts-config>faces-config
    <faces-config>
    <managed-bean>
      <managed-bean-name>calculate</managed-bean-name>
      <managed-bean-class>com.jsftest.Calculate</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
      <managed-bean-name>GetNameForm</managed-bean-name>
      <managed-bean-class>demo.GetNameForm</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
      <from-view-id>/calculate.jsp</from-view-id>
      <navigation-case>
       <from-outcome>success</from-outcome>
       <to-view-id>/success.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
       <from-outcome>failure</from-outcome>
       <to-view-id>/failure.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    <navigation-rule>
      <from-view-id>/inputNameJSF.jsp</from-view-id>
      <navigation-case>
       <to-view-id>/pages/greeting.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    </faces-config>in my inputNameJSF.jsp (faces page)
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Say Hello!!</title>
    </head>
    <body>
    Input Name
    <f:view>
         <h:form >
              <h:inputText value="#{GetNameForm.name}" id = "name" />
              <br>
              <h:commandButton id="submit"  action="/greeting.do" value="   Say Hello!   " />
         </h:form>
    </f:view>
    </body>
    </html>I want to be able to call the struts action invoking the Action method in the that returns the name
    package demo;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class GreetingAction extends org.apache.struts.action.Action {
        // Global Forwards
        public static final String GLOBAL_FORWARD_getName = "getName";
        // Local Forwards
        private static final String FORWARD_sayhello = "sayhello";
        public GreetingAction() {
        public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            String name = ((demo.GetNameForm)form).getName();
            String greeting = "Hello, "+name+"!";
            request.setAttribute("greeting", greeting);
            return mapping.findForward(FORWARD_sayhello);
    }Edited by: sijaffer on Aug 11, 2009 12:03 PM

  • Invoking Web Service from JSF Managed Bean

    Hi all,
    I am trying to invoke a webservice from Managed Bean and getting an exception.
    Server : WAS 6.1.0.2
    Version :JSF 1.2
    Type of WS Invocation : JAX-WS web services
    IDE : RAD 7.0.0
    I have set up the class path correctly and added relevant WS Client in EAR ....
    Following is the exception am receiving :
    [8/31/11 7:59:25:335 EDT] 0000002d WebApp E [Servlet Error]-[Faces Servlet]: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:170)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:123)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:84)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:204)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:171)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:754)
    at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:627)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:550)
    at com.sun.faces.taglib.html_basic.InputTextareaTag.doEndTag(InputTextareaTag.java:651)
    at com.ibm._jsp._sample._jspx_meth_h_inputTextarea_0(_sample.java:107)
    at com.ibm._jsp._sample._jspx_meth_h_form_0(_sample.java:149)
    at com.ibm._jsp._sample._jspx_meth_f_view_0(_sample.java:180)
    at com.ibm._jsp._sample._jspService(_sample.java:77)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
    at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1263)
    at java.beans.Beans.instantiate(Beans.java:219)
    at java.beans.Beans.instantiate(Beans.java:63)
    at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:226)
    at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:291)
    at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:81)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:249)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:140)
    Thanks in advance ..
    Steve Bob

    No you haven't, because
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType a relevant class can still not be found and Java really is not going to lie to you; this class is not on your application's classpath so it is either missing or put in the wrong place. Note that missing classes can be caused by you forgetting to properly redeploying your application - its usually something silly like that. Figure out what you did wrong and correct your mistake.
    The fact that you have to mention that you "setup the classpath" is questionable; in web applications you don't touch the classpath at all. So what exactly did you do?

  • Call a JSF application from a Standar Web application (JSP)

    Hi all,
    We have 2 aplication, one is JSF and the other one is standar web jsp.
    We want to invoke from the standard web application to the JSF application and pass param from the jsp to the *.jsf page.
    how can I do that?
    Thanks.

    You can open a jsf page from any other application.
    <form action="http://hostip:port/app/MyPage.jsf?key1=value1&key1=value1">
    as we do in any other jsp page.
    Now in JSF application, in MyPage.jsf write a scriptlet to get the parameters and from there you can use these params.
    You can get a managed Bean reference in your jsp page. Here is the code for that.(ResultsInExcelBean is my managed bean.)
    FacesContext fc = FacesContext.getCurrentInstance();
         ResultsInExcelBean resultsInExcelBean = (ResultsInExcelBean)fc.getApplication().createValueBinding("#{ResultsInExcelBean}").getValue(fc);     
    Hope this helps you.
    Sravan

  • Have to click the button twice to invoke its action!!!!

    I am using netbeans 5.5 visual web pack and tomcat server for my JSF project.
    In one of my pages i have to click the submit button twice to invoke its action.
    I searched forum for the answer but could not find any that could solve my problem.
    Whenever i first click the button from the lifecycle listener class i used i found the application goes through following phases:
    BeforePhase: RESTORE_VIEW 1
    AfterPhase: RESTORE_VIEW 1
    BeforePhase: APPLY_REQUEST_VALUES 2
    com.sun.rave.web.ui.renderer.UploadRenderer::decode()
    com.sun.rave.web.ui.renderer.UploadRenderer::     Looking for id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
    com.sun.rave.web.ui.renderer.UploadRenderer::     Found id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
    AfterPhase: APPLY_REQUEST_VALUES 2
    BeforePhase: RENDER_RESPONSE 6
    AfterPhase: RENDER_RESPONSE 6There is no INVOKE_APPLICATION phase in first click. In second click, the status i got is:
    BeforePhase: RESTORE_VIEW 1
    AfterPhase: RESTORE_VIEW 1
    BeforePhase: APPLY_REQUEST_VALUES 2
    com.sun.rave.web.ui.renderer.UploadRenderer::decode()
    com.sun.rave.web.ui.renderer.UploadRenderer::     Looking for id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
    com.sun.rave.web.ui.renderer.UploadRenderer::     Found id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
    AfterPhase: APPLY_REQUEST_VALUES 2
    BeforePhase: PROCESS_VALIDATIONS 3
    AfterPhase: PROCESS_VALIDATIONS 3
    BeforePhase: UPDATE_MODEL_VALUES 4
    AfterPhase: UPDATE_MODEL_VALUES 4
    BeforePhase: INVOKE_APPLICATION 5
    AfterPhase: INVOKE_APPLICATION 5
    BeforePhase: RENDER_RESPONSE 6
    AfterPhase: RENDER_RESPONSE 6Now the INVOKE_APPLICATION phase is invoked.
    I have <h:messages /> tag but no errors could be seen.
    What can be the reasons behind this problem

    Well the code that is producing the problem is quite big. Anyway i will post it, hoope you can get something out of it.
    The jsp page is:
    <ui:body binding="#{ReceptionPage$CompanyPersonPage.body1}" id="body1" style="-rave-layout: grid">
                        <div align="center">
                            <ui:staticText binding="#{ReceptionPage$CompanyPersonPage.staticText1}" id="staticText1"
                                style="font-family: Georgia,'Times New Roman',times,serif; font-size: 18px; font-weight: bold" text="Company Person Page"/>
                        </div>
                        <div align="left" style="color:red;font-weight:bold;layout:table;">
                            <h:messages id="errMsgs"/>
                        </div>
                        <ui:form binding="#{ReceptionPage$CompanyPersonPage.form1}" id="form1">
                            <ul>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label1}" id="label1" style="" text="Citizenship Number:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField1}" id="textField1" required="true" style="" text="#{CompanyPersonBean.citizenshipNumber}"/>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label2}" id="label2" style="" text="Name:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField2}" id="textField2" required="true" style="" text="#{CompanyPersonBean.name}"/>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label3}" id="label3" style="" text="Country:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField3}" id="textField3" required="true" style="" text="#{CompanyPersonBean.country}"/>
                                </li>
                                <li>
                                    <fieldset style="width:250px;float:left;">
                                        <legend>Temporary Address</legend>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.tempDistrictLabel}" id="tempDistrictLabel" text="District:"/>
                                        <br/>
                                        <ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.tempDistrictDropDown}"
                                            converter="#{ReceptionPage$CompanyPersonPage.integerConverter1}" id="tempDistrictDropDown" immediate="true"
                                            items="#{ReceptionPage$CompanyPersonPage.tempDistrictDataProvider.options['DISTRICT_ID,DISTRICT_NEPALI_NAME']}"
                                            onChange="common_timeoutSubmitForm(this.form, 'ul:li:fieldset:tempDistrictDropDown');" valueChangeListener="#{ReceptionPage$CompanyPersonPage.tempDistrictDropDown_processValueChange}"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.tempAreaLabel}" id="tempAreaLabel" text="Area(VDC/Municipality):"/>
                                        <br/>
                                        <ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.tempAreaDropDown}"
                                            converter="#{ReceptionPage$CompanyPersonPage.integerConverter3}" id="tempAreaDropDown" items="#{ReceptionPage$CompanyPersonPage.tempAreaDataProvider.options['AREA_ID,AREA_NEPALI_NAME']}"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.tempWardNoLabel}" id="tempWardNoLabel" text="Ward No:"/>
                                        <br/>
                                        <ui:textField binding="#{ReceptionPage$CompanyPersonPage.tempWardNoTextField}" id="tempWardNoTextField" required="true"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.tempHouseNoLabel}" id="tempHouseNoLabel" text="House No:"/>
                                        <br/>
                                        <ui:textField binding="#{ReceptionPage$CompanyPersonPage.tempHouseNoTextField}" id="tempHouseNoTextField"/>
                                    </fieldset>
                                    <fieldset style="width:250px;">
                                        <legend>
                                        Permanent Address</legend>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.permDistrictLabel}" id="permDistrictLabel" text="District:"/>
                                        <br/>
                                        <ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.permDistrictDropDown}"
                                            converter="#{ReceptionPage$CompanyPersonPage.integerConverter2}" id="permDistrictDropDown" immediate="true"
                                            items="#{ReceptionPage$CompanyPersonPage.permDistrictDataProvider.options['DISTRICT_ID,DISTRICT_NEPALI_NAME']}"
                                            onChange="common_timeoutSubmitForm(this.form, 'ul:li:fieldset:permDistrictDropDown');" valueChangeListener="#{ReceptionPage$CompanyPersonPage.permDistrictDropDown_processValueChange}"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.permAreaLabel}" id="permAreaLabel" text="Area(VDC/Municipality):"/>
                                        <br/>
                                        <ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.permAreaDropDown}"
                                            converter="#{ReceptionPage$CompanyPersonPage.integerConverter4}" id="permAreaDropDown" items="#{ReceptionPage$CompanyPersonPage.permAreaDataProvider.options['AREA_ID,AREA_NEPALI_NAME']}"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.permWardNoLabel}" id="permWardNoLabel" text="Ward No:"/>
                                        <br/>
                                        <ui:textField binding="#{ReceptionPage$CompanyPersonPage.permWardNoTextField}" id="permWardNoTextField" required="true"/>
                                        <br/>
                                        <ui:label binding="#{ReceptionPage$CompanyPersonPage.permHouseNoLabel}" id="permHouseNoLabel" text="House No:"/>
                                        <br/>
                                        <ui:textField binding="#{ReceptionPage$CompanyPersonPage.permHouseNoTextField}" id="permHouseNoTextField"/>
                                    </fieldset>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label4}" id="label4" style="" text="Phone Number:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField4}" id="textField4" style="" text="#{CompanyPersonBean.phoneNumber}"/>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label5}" id="label5" style="" text="Mobile:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField5}" id="textField5" style="" text="#{CompanyPersonBean.mobileNumber}"/>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label6}" id="label6" style="" text="Email:"/>
                                    <br/>
                                    <ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField6}" id="textField6" style=""
                                        text="#{CompanyPersonBean.emailAddress}" validator="#{ReceptionPage$CompanyPersonPage.textField6_validate}"/>
                                </li>
                                <li>
                                    <b>Person Company Relation:</b>
                                    <br/>
                                    <ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox1}" id="checkbox1" label="Is Promoter" style=""/>
                                    <br/>
                                    <ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox2}" id="checkbox2" label="Is Board Oof Director" style=""/>
                                    <br/>
                                    <ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox3}" id="checkbox3" label="Is Shareholder" style=""/>
                                    <br/>
                                    <br/>
                                </li>
                                <li>
                                    <ui:label binding="#{ReceptionPage$CompanyPersonPage.label7}" id="label7" style="" text="Citizenship Certificate File"/>
                                    <br/>
                                    <ui:upload binding="#{ReceptionPage$CompanyPersonPage.citizenshipFileUPloadField}"
                                        columns="#{CompanyPersonBean.citizenshipFilePath}" id="citizenshipFileUPloadField" required="true" style=""/>
                                </li>
                                <li>
                                    <ui:button action="#{ReceptionPage$CompanyPersonPage.button1_action}" binding="#{ReceptionPage$CompanyPersonPage.button1}"
                                        id="button1" style="height: 23px"
                                        text="Save"/>
                                    ||
                                    <ui:button
                                        binding="#{ReceptionPage$CompanyPersonPage.button2}" id="button2" onClick="window.close()" style="height: 24px" text="Close"/>
                                </li>
                            </ul>
                        </ui:form>
                    </ui:body>
                        The corresponding bean is:
    public class CompanyPerson {
        private String citizenshipNumber;
        private String name;
        private String country;
        private String phoneNumber;
        private String mobileNumber;
        private String emailAddress;
        private String citizenshipFilePath;
        private String isShareHolder;
        private String isBoardOfDirector;
        private String isPromoter;
        public CompanyPerson() {
        public String getCitizenshipNumber() {
            return citizenshipNumber;
        public void setCitizenshipNumber(String citizenshipNumber) {
            this.citizenshipNumber = citizenshipNumber;
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
        public String getCountry() {
            return country;
        public void setCountry(String country) {
            this.country = country;
        public String getPhoneNumber() {
            return phoneNumber;
        public void setPhoneNumber(String phoneNumber) {
            this.phoneNumber = phoneNumber;
        public String getMobileNumber() {
            return mobileNumber;
        public void setMobileNumber(String mobileNumber) {
            this.mobileNumber = mobileNumber;
        public String getEmailAddress() {
            return emailAddress;
        public void setEmailAddress(String emailAddress) {
            this.emailAddress = emailAddress;
        public int getTemporaryAddressId() {
            return temporaryAddressId;
        public void setTemporaryAddressId(int temporaryAddressId) {
            this.temporaryAddressId = temporaryAddressId;
        public int getPermanentAddressId() {
            return permanentAddressId;
        public void setPermanentAddressId(int permanentAddressId) {
            this.permanentAddressId = permanentAddressId;
        public String getCitizenshipFilePath() {
            return citizenshipFilePath;
        public void setCitizenshipFilePath(String citizenshipFilePath) {
            this.citizenshipFilePath = citizenshipFilePath;
        public String getIsShareHolder() {
            return isShareHolder;
        public void setIsShareHolder(String isShareHolder) {
            this.isShareHolder = isShareHolder;
        public String getIsBoardOfDirector() {
            return isBoardOfDirector;
        public void setIsBoardOfDirector(String isBoardOfDirector) {
            this.isBoardOfDirector = isBoardOfDirector;
        public String getIsPromoter() {
            return isPromoter;
        public void setIsPromoter(String isPromoter) {
            this.isPromoter = isPromoter;
    }No all the properties of the bean has been bind to components.
    I also have value change listener methods for two drop down lists whose immediate property is set to true to bypass the validation. If i change the dropdownlist selection then its value change listener method is successfully invoked, then after if i click the submit button, then it will works.

  • JSF Pages are not rendering correctly when  loaded using Non JSF actions

    Hi All,
    This problem is irritating me and I am posting the same query for the third time here.
    When I come from non jsf actions such as page submitting using Javascript, clicking anchor link, clicking normal Html submit button and so on my page is not rendering correctlly .
    In other words, My first GET method/Post method works perfectly for the first time when the page is loaded.
    But when we try to access the page for the second time, although logical work is perfect in bean, I am getting same old page.
    How to resolve this issue?
    or
    Is this Bug of Sun's Implementation of JSF Framework.
    Thanks,
    Sudhakar

    Hi Sudhakar,
    There is a discussion about refreshing a page, Take a look at the below thread
    http://swforum.sun.com/jive/thread.jspa?threadID=55660
    Hope this what you are looking for
    MJ

  • Invoking BPEL process from a jsp

    Hi,
    I am invoking a synchronous BPEL process from a jsp.
    The jsp I am using is pasted below for your reference.
    createWorkOrderFFA.jsp invokes another jsp invokeWorkOrderFFA.jsp which inturn calls the BPEL process.
    The code is given below.
    -----------------createWorkOrderFFA.jsp starts-----------
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.dispatch.IDeliveryService" %>
    <html>
    <head>
    <title>Work Order Creation </title>
    <meta http-equiv="PRAGMA" content="NO-CACHE" />
    <meta http-equiv="EXPIRES" content="-1" />
    <SCRIPT LANGUAGE="JavaScript">
    function setfocus(){
    document.generatePO.technicianName.focus();
    function mypopup()
    mywindow = window.open ("totalWODetails.jsp","mywindow","scrollbars=1,width=600,height=500");
    mywindow.moveTo(50,50);
    function DoTheCheck()
              if((document.generatePO.repair.checked != true) && (document.generatePO.replacement.checked != true) &&(document.generatePO.emergency.checked != true))
                             alert('Please select atleast one task type for Work Order');
                             return false;
                             document.generatePO.submit();
              return true;
    function chkvalues(){
    if( document.generatePO.additionalInfo.value == "")
    alert(" Please provide additional information for tasks assigned");
    document.generatePO.additionalInfo.focus();
    return false;
    return true;
    </SCRIPT>
    </head>
    <body bgcolor = "#E9C2A6">
    <br>
    <tr cellspacing="0" cellpadding="0">
    <td width="30%" align=left ><b><h2><font color="#3333CC">  </font></b></h2> </td>
    </tr>
    <!-- <h1 align='center'> Work Order Creation </h1> -->
    <table border="1" cellspacing="0" cellpadding="0" width="80%" align=center>
    <tr bgcolor=#A68064 valign=center > </tr>
    <tr bgcolor=#A68064 valign==center><td valign=center > <h2 align='center'> <font COLOR="#CDCDCD" SIZE=5 FACE="sans-serif"> Field Force Automation - Work Order Creation </font></h2></td></tr>
    <tr><td align=center>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" >
    <form name="generatePO" action="./invokeWorkOrderFFA.jsp" onSubmit="return DoTheCheck()">
    </tr>
    <tr >
    <br>
    <td width="40%" align="right" > <b> <font color="black" SIZE=2 FACE="sans-serif" align="right"> Interface Type: </font> </b>           </td>
    <!-- <td width="2%">:</td><td><input type="text" name="SSN" maxlength=10 size=10></td> -->
    <td width="60%" colspan = "2">
    <SELECT NAME="interfaceType">
    <OPTION VALUE="Batch"> Batch </OPTION>
    <OPTION VALUE="Near Real Time"> Near Real Time </OPTION>
    <OPTION VALUE="Automatic"> Automatic </OPTION>
    </SELECT >   
    </td>
    </tr>
    <tr>
    <td width="40%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    </tr>
    <tr>
    <td width="40%" align=middle><b><font color="black" SIZE=2 FACE="sans-serif" align="right">                Work Order Tasks *  : </font> </b></td>
    <td width="20%"><b>Maintenance</b><br>
         <INPUT TYPE=CHECKBOX NAME="repair" value="repair" >repair<P>
         <INPUT TYPE=CHECKBOX NAME="replacement" value="replacement">replacement<P>
    </td>
    <td width="20%" align=left></td></td>
    </tr>
    </tr>
    <tr> <td width="20%">
    <td width="40%" align=left> <b>Emergency</b><br><INPUT TYPE=CHECKBOX NAME="gasEmergency" value="gasEmergency">Gas Emergency<P>
    </td>
    <td width="20%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    </tr>
    <tr>
    <td width="40%" align=middle><b><font color="black" SIZE=2 FACE="sans-serif" align="right">              Additional Information: </font> </b></td>
    <td width="20%"><TEXTAREA NAME="additionalInfo" COLS=40 ROWS=6></TEXTAREA>
    </td>
         <td width="20%" align=left> 
    </td>
    <td width="20%" align=left> 
    </td>
    </tr>
    </tr>
    <tr bgcolor=#A68064>
    <td width="40%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    </tr>
    <tr bgcolor=#A68064 ><td width="100%" colspan=4 align=center bgcolor=#A68064>  
    <input type="submit" name="submit" value="Submit Order" style="background-color: #E9C2A6;">    
    <input type="reset" name="reset" value="Reset Values" style="background-color: #E9C2A6;" >     
    <input type="button" name="btn" value=" WO Error Report" onClick="javascript: mypopup()" style="background-color:#E9C2A6;" >     
    </td>
    </tr>
    <tr bgcolor=#A68064>
    <td width="40%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    <td width="20%" align=left bgcolor=#A68064> 
    </td>
    </tr>
    <tr bgcolor=#A68064>
    <td width="50%" colspan = "4" align=left bgcolor="#A68064">    <font color="#CDCDCD"> * Indicates Mandatory fields </font>
    </td>
    </tr>
    <tr bgcolor=#A68064> </tr>
    </form>
    </table>
    </td></tr></table>
    </table>
    <br>
    <!-- <marquee> <b>Wipro Technologies</b>, <br> Disclaimer : This is only a prototype model and used only for testing. </marquee> -->
    <script language="JavaScript">
    </Script>
    </body>
    </html>
    -----------------createWorkOrderFFA.jsp ends-------------
    -----------------invokeWorkOrderFFA.jsp starts-----------
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <html>
    <head>
    <title>Invoke WorkOrderService </title>
    </head>
    <body>
    <%
    String interfaceType = request.getParameter("interfaceType");
         String repair = request.getParameter("repair");
              System.out.println("repair repair---------------------->");
         String replacement = request.getParameter("replacement");
    String gasEmergency = request.getParameter("gasEmergency");
    String additionalInfo = request.getParameter("additionalInfo");
         String woType1="Maintenance";
         String woType2="Emergency";
         System.out.println("before xml---------------------->");
    String xml = "<hostWOApplication xmlns=\"http://services.otn.com\">"
              +"<interfaceType>" + interfaceType + "</interfaceType>"
                   +"<Maintenance>"
                   +"<repair>" + repair + "</repair>"
                   +"<replacement>" + replacement + "</replacement>"
                                  +"</Maintenance>"
                   +"<Emergency>"
              + "<gasEmergency>" + gasEmergency + "</gasEmergency>"
                   +"</Emergency>"
                   + "<additionalInfo>" + additionalInfo + "</additionalInfo>"
              + "</hostWOApplication>";
    System.out.println("Payload data ----------------------------------------->"+xml);
    Locator locator = new Locator("default","bpel");
    System.out.println("Before Idelivery service--------------->");
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    System.out.println("After IDeliveryService data----------------------->");
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    System.out.println("Before process service--------------->");
    deliveryService.request("A2", "process", nm);
    System.out.println("After process service--------------->");
    out.println( "<b><Font Face=Arial color=red>Work Order has been initiated!</font></b>" );
    %>
         <table bgColor="#E9C2A6" border="1" cellpadding="0">
         <tr ><td width="100%" colspan=4 align=center >
    <b>The Work Order Details could be found at this link:
    <Font Face=Arial color=red><italic>Work Order Creation Details<italic></Font><b>
         </tr>
    </table>
    </body>
    </html>
    -----------------invokeWorkOrderFFA.jsp ends-----------
    I am getting the following error:
    ----------------error desc starts----------------------
    Oracle BPEL Process Manager Full Cycle
    An unexpected error has occurred while executing your request. This is most likely related to a defect in the Oracle BPEL Process Manager product. We apologize for the inconvenience. Please open a TAR in http://metalink.oracle.com if you are our customers. Otherwise, you can post the error to the OTN forum and we will get back to you as soon as possible.
    Attachments:
    Build Information:
    Oracle BPEL Server version 2.2
    Build: 1361
    Build time: Thu Mar 17 15:51:23 PST 2005
    Build type: release
    Source tag: BPELPM_10_1_2_beta3_branch
    Exception Message:
    [java.lang.Exception]
    Invalid Login. Domain not specified.
    Exception Trace:
    java.lang.Exception: Invalid Login. Domain not specified.
         at com.collaxa.cube.fe.util.ServletUtils.getLocator(ServletUtils.java:80)
         at displayInstance.jspService(_displayInstance.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:89)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ----------------error desc ends----------------------

    hey mgrovr..
    how to ensure that my jsps are under orabpel. i m getting a javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found exception wile invoking bpel process from jsp. I have created the jsps in Jdeveloper and i'm running it from there only.
    Can u tell me a way to keep me application under orabpel

  • JSF Page is not  rendering correctly on NON JSF Action

    Hi All,
    When I go from JSF actions (clicking HtmlCommandButton HtmlActionLink), I am getting the correct page. But when I come from non jsf actions say if I come through by clicking normal anchor tag or javascript action or normal html submit button, I am getting same old rendered page. How can I overcome this problem??
    Thanks
    Sudhakar

    I am getting same old rendered pageIn otherwords, page is not getting refreshed and contains old data

  • "Can't get Action from Action Reference"?

    I really can't figure out why I get java.lang.IllegalArgumentException with "Can't get Action from Action Reference: BeanName.actionName" message. I specified all properties in faces-config.xml. Bean and its action names are all checked several times, but I still get that exception. Is it a JSF bug, or my simple mistake? Is there anyone who experienced the same problem?
    I'm using two forms in one page. all components' ids are all different. Only one form generated the exception not regarding the order of the forms. (the one is login form and the other (which doesn't generate exception) is leave-comment form.)
    Here is the form code:
                   <h:form id="loginForm" formName="loginForm" >
                        Login >
                        <h:input_text id="loginUserName" valueRef="UserBean.userName">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_text>
                        |
                        Password >
                        <h:input_secret id="loginPassword" valueRef="UserBean.password">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_secret>
                        |
                        <h:command_button id="loginSubmit" label="login" commandName="loginSubmit" actionRef="UserBean.loginAction" />
                   </h:form>
    and here is managed-bean part:
    <managed-bean>
         <managed-bean-name>UserBean</manager-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.UserBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>idStr</property-name>
    <null-value/>
    </managed-property>
    <managed-property>
    <property-name>userName</property-name>
    <null-value/>
    </managed-property>
              <managed-property>
                   <property-name>password</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
    Thanks in advance!

    here goes the source code of NotesBean:
    abstract class NotesBean {
         protected static final String SUCCESS = "success";
         protected static final String FAILURE = "failure";
         private String connectionProfile;
         protected NotesBean() {}
         public String getConnectionProfile() {
              return connectionProfile;
         public void setConnectionProfile(String newProfileName) {
              connectionProfile = newProfileName;
         public abstract Action getCreateAction();
         public abstract Action getDeleteAction();
         public abstract Action getUpdateAction();
         protected Connection getConnection() throws NotesException {
              ConnectionProfile profile = ConnectionProfileFactory.getProfile(connectionProfile);
              return DriverManager.getConnection(profile.getUrl(), profile.getProperties());
    }I think everything is ok with the beans, right?
    By the way: shouldn�t the error message be:
    "Can't get Action from Action Reference: UserBean.loginAction"I just examplified the message using somewhat generic name. Sorry for confusion :)
    As a final try, here is the whole JSP code: (ignore korean texts)
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://gleamynode.net/notes" prefix="notes" %>
    <html>
    <head>
         <title>gleamynode.net :: gathering of my mentality</title>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <link rel="stylesheet" HREF="css/gleamynode.css" type="text/css" />
    </head>
    <body>
    <f:use_faces>
    <notes:useNotes>
         <c:choose>
              <c:when test="${empty param['id']}">
                   <notes:getPages var="pages" />
                   <c:forEach var="p" items="${pages}" begin="0" end="0">
                        <c:set var="p" value="${p}" scope="request"/>
                   </c:forEach>
              </c:when>
              <c:otherwise>
                   <notes:getPage var="p" pageId="${param['id']}" />
              </c:otherwise>
         </c:choose>
         <div id="header">
              <h:command_hyperlink href="index.jsp" label="gleamynode.net :: gathering of my mentality"/>
         </div>
         <div id="menu">
              About | Essays | Projects | Others | Links
         </div>
         <div id="content">
              <div id="page">
                   <div id="pageTitle">
                        #${p.id}. ${p.title}
                   </div>
                   <div id="pageContent">
                        ${p.content}
                        <div id="pageTimestamp">
                             ${p.timestamp}
                        </div>
                   </div>
              </div>
              <c:choose>
                   <c:when test="${fn:length(p.comments) > 0}">
                        <div id="comments">
                             <div id="teaser">
                                  ${fn:length(p.comments)} ?? ??? ????
                             </div>
                             <c:forEach var="c" items="${p.comments}">
                                  <div id="commentHeader">
                                       #${c.id}. ${c.userName}
                                  </div>
                                  <div id="commentContent">
                                       ${c.content}
                                       <div id="commentTimestamp">
                                            ${c.timestamp}
                                       </div>
                                  </div>
                             </c:forEach>
                        </div>
                   </c:when>
              </c:choose>
              <div id="commentForm">
                   <jsp:useBean id="CommentBean" class="net.gleamynode.notes.http.faces.CommentBean" scope="request" />
                   <jsp:setProperty name="CommentBean" property="pageIdStr" value="${p.id}"/>
                   <jsp:setProperty name="CommentBean" property="content" value=""/>
                   <div id="teaser">
                   </div>
                   <h:form id="commmentForm" formName="commentForm" >
                        <input type="hidden" name="id" value="${p.id}"/>
                        <h:input_hidden id="pageId" valueRef="CommentBean.pageIdStr"/>
                        <table width="95%">
                             <tr>
                                  <td class="name" width="9%">Name:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userName" valueRef="CommentBean.userName">
                                            <f:attribute name="style" value="width:75%;"/>
                                       </h:input_text>
                                  </td>
                                  <td class="name" width="8%">Email:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userEmail" valueRef="CommentBean.userEmail">
                                            <f:attribute name="style" value="width:75%;"/>
                                       </h:input_text>
                                  </td>
                                  <td class="name" width="8%">URL:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userURL" valueRef="CommentBean.userURL">
                                            <f:attribute name="style" value="width:100%;"/>
                                       </h:input_text>
                                  </td>
                             </tr>
                             <tr>
                                  <td colspan="6">
                                       <h:input_textarea id="content" valueRef="CommentBean.content">
                                            <f:attribute name="style" value="width:100%; height: 12em;"/>
                                       </h:input_textarea>
                                  </td>
                             </tr>
                             <tr>
                                  <td class="buttons" colspan="6">
                                       <h:command_button id="submit" label="leave a comment" commandName="submit" actionRef="CommentBean.createAction" />
                                  </td>
                             </tr>
                        </table>
                   </h:form>
              </div>
              <div id="loginForm">
                   <div id="teaser">
                   </div>
                   <h:form id="loginForm" formName="loginForm" >
                        Login >
                        <h:input_text id="loginUserName" valueRef="UserBean.userName">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_text>
                        |
                        Password >
                        <h:input_secret id="loginPassword" valueRef="UserBean.password">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_secret>
                        |
                        <h:command_button id="loginSubmit" label="login" commandName="loginSubmit" actionRef="UserBean.loginAction" />
                   </h:form>
              </div>
              <div id="copyright">
                   Copyright � 1999~ by Trustin Lee, All Rights Reserved.
              </div>
         </div>
         <div id="footer">
         </div>
    </notes:useNotes>
    </f:use_faces>
    </body>
    </html>and, here is the whole faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
              "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
              "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <navigation-rule>
            <from-tree-id>/index.jsp</from-tree-id>
            <navigation-case>
                <from-outcome>success</from-outcome>
                <to-tree-id>/index.jsp</to-tree-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>failure</from-outcome>
                <to-tree-id>/failure.jsp</to-tree-id>
            </navigation-case>
        </navigation-rule>
         <managed-bean>
              <managed-bean-name>PageBean</managed-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.PageBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>title</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>content</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>CommentBean</managed-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.CommentBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
            <managed-property>
                <property-name>pageIdStr</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>userName</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>userEmail</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>userURL</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>content</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
        <managed-bean>
             <managed-bean-name>UserBean</manager-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.UserBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
            <managed-property>
                <property-name>userName</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>password</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
    </faces-config>Thank you for your continuous help, Rene! Learned alot from you about JSF :)

  • How to create JSF application from xsd files?

    Hi,
    We have many xsd files describing xml's which we are supposed to send to web services. Application which we are creating should allow user to fill xml documents with data and then we should send those xml files to some web service. We want to automatize as much as possible the process of application creation to avoid possible errors and to minimize our efforts (there are plenty of quite complex xsd files).
    Our first approach was: we used Oracle JSXB to generate java classes basing on xsd files (using JDeveloper 10.1.3.2.0.4066). Then we tried to generate DataControls, but this action fails with following error:
    Window title: Error in init bean
    Message: Could not complete initbean because it would result in an invalid document
    Details: oracle.bali.xml.model.XmlInvalidOnCommitException: SEVERE: Wartość atrybutu Name nie jest typu ID (Value of Name attribute is not of ID type)
    Wartość musi być następującego typu: (Value must be of following type)
    Nazwa typu: ID (Type name)
    Typ pierwotny: string (Primitive type)
    Z następującymi więzami: (With following constraints)
    zgodne z wzorcem: [\i-[:]][\c-[:]]* (Compliant with template)
    [ node = Name ]
    <JavaBean version="10.1.3.40.66" id="XSLStylesheet" BeanClass="oracle.xml.xslt.XSLStylesheet" Package="oracle.xml.xslt" isJavaBased="true">
    <Attribute Name="classMethodParams" IsUpdateable="0" Type="java.util.Hashtable" />
    We tried Sun implementation fo JAXB - it generated different java classes (with annotation mechanism). Creation of DataControls using those classes was successful. Then we created simple JSF page and tried to put those DataControls on it in order to let the user fill it with data. The thing is that those controls are read only as there is no row created in those DC. We can't create any row in those DC as there are only 'commit' and 'rollback' operations. When we try to call 'CreateInsert' operation on child elements of those DC we get error in JDeveloper log window:
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: JBO-29000: DataControl:createRowData
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: DataControl:createRowData
    new row is not created and controls are still read-only.
    The question is:
    1. is there another, more efficient way to create JSF application from xsd files?
    2. if this is the best way to do it, what do we do wrong?
    Leszek

    To anyone who might find it useful: our solution to mentioned problem.
    Few tips how to solve described problem:
    1. Do not use JAXB (we checked Oracle and Sun)
    2. Use castor http://www.castor.org/
    a) for each xsd generate java files in separated package
    b) use java 1.5 to let castor generate lists
    c) use mapping of xml namespaces to java packages to have only 1 implementation of each xsd
    3. Create facades - java files for you root-level java objects
    4. Right click those facades and choose 'Create DataControl' in jdev
    5. Now you may drag and drop you DataControls and use them in your JSF (or UIX) application
    I hope it will help someone :)
    Leszek

  • Horizontal NavBar in JSPF,  Action Link or Hyperlink.?

    I am trying to create a placed in a JSF fragment page (navbar.jspf). The fragment page is added to the multiple web pages for a consistant look and ease of maintenance.
    Note, this website uses resource bundles for multilingual content.
    I was able to get the horizontal navigation bar using action link work in Creator 2004 but, its not working in Creator 2.
    Taking a step back, What is the best way to create a horizontal navigation bar. Do you use action link or hyperlink?
    What are the steps you use to create a link between pages?

    Hi,
    The tutorials under the section Control Page Navigation on the Java Studio Creator 2 � Early Access,
    Tutorials & Sample Applications page may answer some of your questions. The URL to this page is:
    http://developers.sun.com/prodtech/javatools/jscreator/ea/jsc2/learning/tutorials/index.html
    Secondly in JSC2 EA2 there only is the hyperlink and Image hyperlink component.
    You have mentioned that the horizontal navigation bar is not working in Creator 2. Could you please tell us what exactly is happening and what are the errors you are encountering if any.
    Cheers
    Giri

  • Invoking ALBPM Process from ALSB

    Hi,
    I am presently trying to invoke ALBPM(Oracle BPM) process by registering my process as webservice to ALSB (OSB). I am however not able to trigger my processes from ALSB. I have posted the steps followed. Please help me in figuring out the missing piece
    a) Registered the ALBPM Process WSDL in ALSB by importing manually
    b) Created a Business Service based on the WSDL
    c) Created a Proxy Service based on the WSDL.
    Invoked the "startSession" operation to generate the sessionID using ALSB test browser. ALSB receives an error response.
    I was however able to generate my sessionID and also invoke my processes successfully by using any generic Soap client.
    Please do help me in figuring out my missing steps.
    Thanks in Advance,
    Rudraksh

    Hi,
    Thanks for your response. I am getting an echo of the request as the response. I am just trying to invoke my "startSession" from test browser . I am presently using the default proxy services to trigger the ALBPM webservices. I haven't configured any message flows.I have posted the invocation trace response below.
    Invocation trace ::
    Routed Service
    No Service has been invoked, the request is echoed.
    I also happened to try out the option of registering the endpoint to connect to OSB from with OBPM. I am presently getting this stack trace everytime I try to register.
    fuego.lang.exception.ProgramException: Couldn't invoke method 'publish' on fuego.alsb.deployment.ProcessesDeploymentModel@7846a9
         at fuego.lang.exception.ProgramException.wrap(ProgramException.java:55)
         at fuego.lang.reflect.MethodUtils.invokeMethod(MethodUtils.java:50)
         at fuego.ui.wizards.ui.InvokeMethodActionListener.actionPerformed(InvokeMethodActionListener.java:49)
         at fuego.ui.peer.swt.SwtButton$1.widgetSelected(SwtButton.java:63)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
         at fuego.ui.peer.swt.SwtWindow.setVisible(SwtWindow.java:179)
         at fuego.ui.UiComponent.setVisible(UiComponent.java:832)
         at fuego.ui.Dialog.setVisible(Dialog.java:218)
         at fuego.designer.action.OpenAlsbProcessDeploymentDialogAction.run(OpenAlsbProcessDeploymentDialogAction.java:61)
         at fuego.eclipse.ui.EclipseAction.run(EclipseAction.java:180)
         at fuego.eclipse.ui.EclipseAction.run(EclipseAction.java:199)
         at fuego.eclipse.studio.actions.EclipseActionDelegate.run(EclipseActionDelegate.java:39)
         at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
         at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
         at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
         at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
         at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
         at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
         at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:198)
         at fuego.lang.reflect.MethodUtils.invokeMethod(MethodUtils.java:40)
         ... 43 more
    Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:338)
         at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:210)
         at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:128)
         at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:308)
         at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:400)
         at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:255)
         at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
         at java.io.ObjectInputStream.readClassDesc(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
         at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
         at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
         at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:201)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
         at javax.management.remote.rmi.RMIConnectionImpl_1030_WLStub.invoke(Unknown Source)
         at weblogic.management.remote.common.RMIConnectionWrapper$15.run(ClientProviderBase.java:606)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.security.Security.runAs(Security.java:61)
         at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:604)
         at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(Unknown Source)
         at javax.management.MBeanServerInvocationHandler.invoke(Unknown Source)
         at $Proxy23.importUploaded(Unknown Source)
         at fuego.alsb.dao.impl.AlsbManagerImpl.importJar(AlsbManagerImpl.java:404)
         at fuego.alsb.process.ProjectHelper.publishProcess(ProjectHelper.java:534)
         at fuego.alsb.process.ProjectHelper.publish(ProjectHelper.java:139)
         at fuego.alsb.deployment.ProcessesDeploymentModel.publish(ProcessesDeploymentModel.java:138)
         ... 50 more
    I am stuck.I really appreciate any help in this regard.
    Rudraksh
    Edited by: rudraksh on Jul 17, 2009 1:59 PM

Maybe you are looking for

  • Does the Flash Player (Win7 / IE 9+) cache content outside of the browser?

    I have encountered a technical issue using Flash (CC) content in Captivate 7.  I am distributing the content to a customer with approximately 1000 Windows PC's running IE 9 +.  Some of these computers have no issue but a small number experience a pro

  • Photographers Package in UK

    How do I purchase the 'Photographers Package' for $9.99 in the UK?

  • Phap_admin: how to add columns to the initial ALV

    Hello everyone, I have a requirement which is to add 2 new columns on the ALV that appears after going through the phap_admin selection screen. I show you a picture as an example: I need to add 2 fields form infotype 0002 in this ALV list. I've been

  • I have an iPad 2 that I set up to link with my work iPhone.

    I will be leaving the company soon and I need to setup my iPad 2 to sync with my personal iPhone.  How can I do that? My personal iPhone is iPhone 5s, Thanks Luv2bike2nv

  • Brand new iMac 24 inch does not start

    I went to best buy and bought the 24 inch 2.66 GHz iMac. We loved it when the apple guy gave us a demo. I brought the brand new iMac home and set it up. Pushed the power button - IMac does not power on. Tried diff options like changing plug socket, e