Why JSF & When to use JSF?

Hi Experts,
I am new to JSF and i am studying that now. I have some basic questions.
1. Why JSF and When to use JSF means What is the right requirement or situation to use JSF?
2. Studied that JSF is basically a UI driven framework and developed to provide & support for UI component model. If that is the case, each UI components(Textfield, drop-down, etc..) in the web page is coupled to server-side components and for each validation or events, is the page submitted to server and come back?
3. What are the other benefits i get compared to Struts and JSP if i use JSF?
Please provide your experience.
Thanks,.
Edited by: MouliOnTech on Mar 6, 2009 3:02 AM

Depends on how you code the JSF page and which component library you use.
Standard JSF components doesn´t support asynchronous requests, so the validation will only happen when you submit the form to the server (either by pressing the submit button or by Javascript´s form.submit). But there are also Ajaxical JSF component libraries out which can validate asynchronously based on the (Javascript) events. For example RichFaces/Ajax4jsf.

Similar Messages

  • When we use jsf can we also use hibernate or ejb for database visting.

    when we use jsf can we also use hibernate or ejb for database visting.

    http://blog.exadel.com/?p=8
    http://java.sys-con.com/read/46977.htm
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html
    http://www.jroller.com/page/ksevindik/?anchor=lookup_tables_with_hibernate_and
    Sergey : http://jsfTutorials.net

  • Validation messages in JSF (when not using ADF faces)

    I've spent some time with JDeveloper 11 and would like to use it on an upcoming project. I have to target IE 6, so I won't be able to take advantage of ADF Faces. Instead I'd like to use the ADF Business Components with a standard JSF interface so it can be used by people still running IE 6.
    I've created a Business Component from a database table and can bind a JSF HTML Creation Form by dragging the appropriate view from the AppModule in the Data Controls pane. However, when I attempt to submit the page without all the fields being valid I get the following validation error message:
    j_id__ctru2:j_id__ctru6: Validation Error: Value is required. j_id__ctru2:j_id__ctru6: Validation Error: Value is required.
    I've tried making this more descriptive, but editing the error message in the Validation Rules section of the Business Component has no effect. What's the best way to convey a meaningful validation message to the user when not using ADF Faces?
    Also - I'm still very new to JDeveloper. Since I won't be able to rely on my users having Internet Explorer 7, would you recommend I stay with JDeveloper 10? The examples and documentation I've seen so far for JDeveloper 11 appear heavily biased towards using ADF Faces so I'm starting to wonder how much support is there for using plain old JSF.
    Thanks for your time!

    Hi,
    if you are completely new to this then I suggest to use JDeveloper 10.1.3 and ADF Faces in there. Its good to use with IE6 as well. Currently we do have more tutorials available for this release than for 11, which for this reason is a better choice for someone new to this
    Frank

  • Using JSF and Struts

    I am a bit of a newbie in terms of UI applications on the JEE platform, so I apologize up front if this question seems silly. I was wondering if someone could comment on the approach below. Is this something that's possible or am I barking up the wrong tree?
    We have a vendor application that is written using Struts. We want to add a section of our own pages to this application, but we would rather use a more strategic approach in our pages, so we would like to use JSF for those.
    The original web.xml file in the vendor app uses a dtd of version 2.3 as shown below:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    When I use JSF, I use a DTD version of 2.5 as shown here:
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    The problem is that when I use version 2.3, the elements needed to support JSF are invalid. When I use 2.5, the elements needed to support struts are invalid.
    Could someone comment in that, if you had this vendor app and you needed to add your own pages, is it not possible to use JSF in this scenario or if you can, what is the best approach to resolving this issue?
    Thank you in advance

    First make sure that your application server supports Servlet API 2.5. Whether the desired Servlet API version is supported or not solely depends on the application server implementation and version used. For example Tomcat 5.5 is a Servlet API 2.4 implementation which only supports the API versions up to with 2.4. If you want to use Servlet API 2.5, then you obviously need a Servlet API 2.5 implementation, for example Tomcat 6.0.
    Consult the website and/or documentation of the application server in question.

  • Upgrade from JSF 1.1 to JSF 1.2 (Mojarra and MyFaces) failed.

    Dear all,
    I tried to upgrade from JSF 1.1 to JSF 1.2 but failed. The application starts OK in jsf 1.1 both myfaces and RI, but failed to start using JSF 1.2.
    My environment is as follows.
    - JDK 1.5
    - Tomcat 6.0
    - Facelet
    - JSF Mojarra 1.2
    The error is as follows, occurs when starting tomcat (my application is in context /web)
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/web'
    Feb 12, 2009 10:39:40 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/web'
    Feb 12, 2009 10:39:40 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Feb 12, 2009 10:39:40 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [web] startup failed due to previous errors
    What I have included in WEB-INF/lib are:
    - JSTL 1.2 (standard.jar and jstl.jar)
    - JSF mojarra 1.2 (jsf-api.jar and jsf-impl.jar)
    - Facelets( el-api.jar, el-impl.jar, and jsf-facelet.jar)
    - commons-digester.jar
    - commons-beanutils.jar
    - commons-logging.jar
    - commons-collection.jar
    Documentation that I read from mojarra FAQ states that i need EL, but EL has been included in Facelets.
    Am i missing something? The following is the part of web.xml that i used, maybe useful to locate what i am missing.
    <web-app xmlns="[http://java.sun.com/xml/ns/j2ee]"
    xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]"
    xsi:schemaLocation="[http://java.sun.com/xml/ns/j2ee] [http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd]"
    version="2.4">
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <!-- Special Debug Output for Development -->
    <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
    </context-param>
    <!-- Optional JSF-RI Parameters to Help Debug -->
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    </context-param>
    <!--use this if start using JSF 1.2 -->
    <context-param>
    <param-name>com.sun.faces.injectionProvider</param-name>
    <param-value>com.sun.faces.vendor.GlassFishInjectionProvider</param-value>
    </context-param>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet

    Hi BalusC,
    Thank you for your time answering my question.
    For the first point, you were right. Now I have downloaded the latest Mojarra release.
    As for the case of web.xml, i should mentioned that I have tried declaring it as Servlet API 2.4 and Servlet API 2.5, and still got the error. My web.xml that declares as 2.5 looks as follows:
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaeeweb-app_2_5.xsd"
    version="2.5">
    On the third point, maybe i stated my problem in a wrong way. What I meant was, I tried each implementation separately, and both implementation did not work.
    About Glassfish injection, i followed the step in Mojarra FAQ regarding the following error.
    JSF1033: Resource injection is DISABLED
    This error showed when i started tomcat. However, since I use the latest Mojarra release, the message error disappear. I have deleted the "glasshfish injection provider" from web.xml, and the error has disappeared.
    Here's the latest of my tomcat startup messages (after i replaced the Mojarra libraries, declared as servlet 2.5 in web xml, and removed glassfish injection provider from web.xml).
    Feb 18, 2009 9:41:58 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
    Feb 18, 2009 9:41:58 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
    Feb 18, 2009 9:41:59 AM org.apache.coyote.http11.Http11AprProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-80
    Feb 18, 2009 9:41:59 AM org.apache.coyote.ajp.AjpAprProtocol init
    INFO: Initializing Coyote AJP/1.3 on ajp-8009
    Feb 18, 2009 9:41:59 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 772 ms
    Feb 18, 2009 9:41:59 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Feb 18, 2009 9:41:59 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    Feb 18, 2009 9:42:01 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/web'
    Feb 18, 2009 9:42:01 AM com.sun.faces.config.ConfigureListener contextInitialized
    WARNING: JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times.
    Feb 18, 2009 9:42:06 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Feb 18, 2009 9:42:06 AM org.apache.catalina.core.StandardContext start
    *SEVERE: Context [web] startup failed due to previous errors*
    Feb 18, 2009 9:42:07 AM org.apache.coyote.http11.Http11AprProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-80
    Feb 18, 2009 9:42:07 AM org.apache.coyote.ajp.AjpAprProtocol start
    INFO: Starting Coyote AJP/1.3 on ajp-8009
    Feb 18, 2009 9:42:07 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 8116 ms
    The application still failed to start.There wasnt enough information for me to digest what is actually went wrong, other than SEVERE: Listener start. And let me say this again, the application starts OK when I used JSF 1.1 (Reference Implementation or MyFaces).
    Anyone has the same experience.?
    Thanks in advance.
    Edited by: niner on Feb 17, 2009 7:11 PM

  • When to use which scope

    Hi,
    I have a CRUD application.. Where in the data is fetched, displayed n edited n stored back to db. Also there is a sequential access between pages & the information entered on the first page is needed on the second page & so forth. What would be the best scope & why ?
    When to use which scope? What is the life-cycle of each scope.
    Also, I couldn't find any good tutorial on scopes. If you are aware of the same, please guide.
    Its urgent.
    Thanks in advance.

    921331 wrote:
    Hi,
    I have a CRUD application.. Where in the data is fetched, displayed n edited n stored back to db. Also there is a sequential access between pages & the information entered on the first page is needed on the second page & so forth. What would be the best scope & why ?
    When to use which scope? What is the life-cycle of each scope.
    Also, I couldn't find any good tutorial on scopes. If you are aware of the same, please guide.
    Its urgent.
    Thanks in advance.You could use ViewScope and parameters to the next view or if using CDI have a look at conversation scope. You should read about them in detail yourself because even if someone chooses one for you it's still you who has to go on to use it correctly.

  • Why and how to use "inner class"

    When i am learning advanced java language features,
    i could not understand why and when to use the "inner class",
    who can give me some examples?
    Thanks!

    You would use an inner class when an object needs visibility of the outer class. This is akin to a C++ friend.
    An example of this is an iterator. An iterator over some collection is typically implemented as an inner class of the collection class. The API user asks for an Iterator (from the Collection) and gets one - in fact they receive an instance of an inner class, but doesn't care. The iterator needs to be inner, as the iterator needs to see the internal data structures of the outer (collection) class.
    This could also be done with an anonymous class, as mentioned by spenhoet above. However, in the case of a collection, the role of the iterator is clear - thus it deserves its own class. And often there is more than one place an iterator can be returned (e.g. see java.util.List, which has several methods that return Iterators/ListIterators), thus it must be put in its own class to allow reuse of the code by outer class.

  • Jsf 1.2_08 gives me blank page when i use h:panelGrid with binding attribut

    I am using jsf 1.2_08 (Mojarra 1.2_08-b06-FCS) + jstl-1.2.jar + Apache Tomcat/6.0.6 + jdk1.5.0_08 on linux suse server. when i load a jsp page with a h:panelGrid, i get a blank page
    my panelGrid is as follows
    <h:panelGrid id="financialProjections" binding="#{veusSituationMonitorDisplayBean.financialProjections}" border="0" cellpadding="0" cellspacing="0" columnClasses="nspLabel w200,ra bl,ra bl,ra bl,ra bl,ra bld,ra bl,ra bl" columns="8" width="100%"/>
    when i remove the binding attribute, rest of the page displays fine.
    Thanks in Advance
    my web.xml is
    <?xml version="1.0"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>AJAXServlet</servlet-name>
    <servlet-class>net.em.servlets.AJAXServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>InitialLizeApplicationbeansServlet</servlet-name>
    <servlet-class>net.em.servlets.InitialLizeApplicationBeanServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>AJAXServlet</servlet-name>
    <url-pattern>/abc.ajax</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>
    net.em.emrp.filters.EMExtensionsFilter
    </filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>10m</param-value>
    </init-param>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>ResponseOverrideFilter</filter-name>
    <filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
    </filter>
    <session-config>
    <session-timeout>
    720 <!-- minutes -->
    </session-timeout>
    </session-config>
    <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
    <filter-name>ResponseOverrideFilter</filter-name>
    <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>ResponseOverrideFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
    <error-code>404</error-code>
    <location>/error404.html</location>
    </error-page>
    <error-page>
    <error-code>500</error-code>
    <location>/error500.html</location>
    </error-page>
    <taglib>
    <taglib-uri>http://ajaxtags.org/tags/ajax</taglib-uri>
    <taglib-location>/WEB-INF/ajaxtags.tld</taglib-location>
    </taglib>
    </web-app>

    BalusC wrote:
    I rather mean that you shouldn't instantiate the HtmlPanelGrid in the bean yourself, but just use the instance which is set through the setter during the restore_view phase.BalusC, why do you recommend this? The spec allows for the bean to create the component:
    *JSF 1.2, section 3.1.5* says:
    When a component instance is first created (typically by virtue of being referenced by a UIComponentELTag in a JSP page), the JSF implementation will retrieve the ValueExpression for the name binding, and call getValue() on it. If this call returns a non-null UIComponent value (because the JavaBean programmatically instantiated and configured a component already), that instance will be added to the component tree that is being created. If the call returns null, a new component instance will be created, added to the component tree, and setValue() will be called on the ValueBinding (which will cause the property on the JavaBean to be set to the newly created component instance).

  • Problem displaying error page of web.xml when using JSF, Ajax4jsf

    Hi,
    My application is using MyFaces, RichFaces and Ajax4jsf. When i try to display error page configured in web.xml, i am getting exception "Error while processing error page".
    my web.xml contents are as follows:
    <?xml version="1.0"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>faces</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
    org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
    <init-param>
    <description>
    set the size limit for uploaded files. Format: 10 - 10 bytes 10k
    - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>
    Set the threshold size - files below this limit are stored in
    memory, files above this limit are stored on disk.
    Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>Seam Redirect Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
    </filter>
    <filter>
    <filter-name>KTServletFilter</filter-name>
    <filter-class>com.kenexa.core.system.KTServletFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Seam Redirect Filter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>KTServletFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <!-- seam Listeners -->
    <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    <listener>
    <listener-class>com.kenexa.kr.web.KRServletListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsf</location>
    </error-page>
    </web-app>
    As per the configuration, when exception is thrown out of the application, container tries to display systemError.jsp page. If we want to include the JSF tags in systemError.jsp page, the request should pass through FacesServlet, so in the <error-page> <location> tag systemError page is specified with the extention systemError.jsf though it's actual extention is .jsp
    When exception is thrown from the application container invoke the error page but, while rendering systemError.jsf page exception is thrown saying "Exception processing error page "systemError.jsp" "
    To solve this problem i've gone through several forums, materials.
    In one forum a guy said, JSF1.1 spec has some problem in displaying error pages. To solve this don't write <f:view> tags in the error page, use <f:subview> intstead. By reading this, i again changed the contents of systemError.jsp page replacing <f:view> by <f:subview>. But the error is still repeating.
    Finally what i found is, when we use Ajax4jsf in the application, its AjaxViewRender class is throwing exception while rendering error pages configured through web.xml.
    So what i did is i changed error page extention from .jsf to .jsp in the <location> tag. Now jsf won't come in the picture and remove JSF related tags from the systemError.jsp page.
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsp</location>
    </error-page>
    Any comments are welcome----------------------------------------------------------------

    I too iam facing the same problem could you advise if you have found any solutions
              -Ram

  • Problem using JSF + ajax4jsf:poll component

    I have the following problem.
    I have JSF page and ajax4jsf:poll component on it for polling the server.
    There are also couple links and buttons on the page,
    At first, when polling is not enabled the links and buttons work fine.
    But after enabling polling and its' work, links and buttons stop working and the page is only reloaded when I click on them. Accoring to the logs action methods, binded to that links and buttons, are not invoked at all. And log shows that page is rerendered using ajax. But not pure JSF which we use in general case.
    Does anybody have any ideas, why this can be? I looked through the internet and I could not find similar problems.
    I will appreciate any ideas. Thanks.

    I have never used it, but did you try the example as given at the related developer guide? Please note the a4j:region and the placement at its own form instead of in another/shared form.
    [http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/poll.html]

  • Can one create a floating window using JSF?

    I was recently shown the interface for GMail. I don't have a GMail account, but one of the things I was asked to investigate was whether or not we can create the sort of floating window that appears on the GMail interface when one positions the mouse pointer over a cell on the grid showing the email messgaes. We have a grid on our JSF page, that shows specific data for items we're supporting, and it would be useful if we could have something like a mouseover event handler for each table row, and in that event handler show a window with a graphic specific to the data in that row, and the chart would move with the mouse pointer, perhaps changing the graphic if the mouse pointer is moved over a different row in the data table.
    Can we do this using JSF? If not, what alternative can you suggest that would provide a reasonable facsimile to this kind of user friendly feature?
    Thanks
    Ted

    "Core JavaServer Faces" Second Edition, by David Geary and Cay Horstmann, copyr 2007 - ISBN: 0-13-173886-0 - (it put me back USD $50, but well worth it). Page 644 gives two examples of how to generate a pop-up window. They give two examples because of problems that can arise when you transfer data between the main window and the pop-up. I do not want to violate copyright and there are ten pages of text devoted to this topic, so I'll just present some tickler code - if you cannot afford the book, maybe you can google on some terms. Sorry, I feel this is as far as I can go on this, I hope this helps some!
    The first example uses a JavaScript call:
    popup = window.open(url, name, features);
    popup.focus();
    where 'features' is a string like "height=300,width=200,toolbar=no,menubar=no"
    The second example creates the pop-up form using a hidden field like this:
    <h:form id="hidden" target="popup">
    <h:inputHidden id="country" value="#{bb.country}"/>
    <h:commandlink id="go" action="showStates"/>
    </h:form>

  • Issues in using JSF UI:Tree tag

    Hi,
    I am trying to work with Tree Structure using JSF UI tags. In Studio Creator i just created a JSP page and designed a Tree with two nodes under it. This is what i have in the body of my jsp.
    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{Page1.form1}" id="form1">
    <ui:tree binding="#{Page1.tree1}" id="tree1" style="left: 48px; top: 48px; position: absolute" text="L3">
    <ui:treeNode binding="#{Page1.treeNode1}" expanded="true" id="treeNode1" style="width: 408px" text="Tree Node 1">
    <f:facet name="image">
    <ui:image binding="#{Page1.image1}" icon="TREE_DOCUMENT" id="image1"/>
    </f:facet>
    </ui:treeNode>
    <ui:treeNode binding="#{Page1.treeNode2}" expanded="true" id="treeNode2" text="Tree Node 2">
    <f:facet name="image">
    <ui:image binding="#{Page1.image2}" icon="TREE_DOCUMENT" id="image2"/>
    </f:facet>
    </ui:treeNode>
    </ui:tree>
    </ui:form>
    </ui:body>
    But when i am trying to launch the jsp page from browser i am getting the below exception.
    com.sun.rave.web.ui.appbase.ApplicationException
    Caused by: java.lang.NullPointerException at java.io.File.(File.java:194) at com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager.getLayoutDefinition(XMLLayoutDefinitionManager.java:142) at com.sun.rave.web.ui.component.TemplateComponentBase.getLayoutDefinition(TemplateComponentBase.java:150) at com.sun.rave.web.ui.renderer.template.TemplateRenderer.encodeBegin(TemplateRenderer.java:73) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    Any suggestion to solve this issue would be greatly helpful.

    Now with Unified EL - JSTL and JSF tags are supposed to work on one page.
    If you want to use Unified EL you need
    1) A container that is built on Servlet 2.5 / JSP 2.1 , and example of such a container is Tomcat 6.x
    2) Probably need to upgrade to JSTL 1.2 , and JSF 1.2
    3) If you're upgrading the container to Servlet 2.5 then web.xml should conform to Servlet 2.5 version.
    4) Use correct taglib URIs for JSTL 1.2 and JSF 1.2
    Read here: Summary of new features in JSP 2.1
    http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/index.html
    JSP 2.1 Technology and JSF 1.2 Technology
    http://java.sun.com/developer/community/chat/JavaLive/2004/jl1207.html
    http://java.sun.com/products/jsp/index.jsp
    Message was edited by:
    appy77

  • Using JSF and IFRAMEs

    I have a basic JSF app that takes some input, does a request and creates a table on output. What I need to do with it now is to have the query "page" and results "page" in two iframes on the same page. Before the query has been run the second iframe should just be blank (or with some default text). After the query that frame should be populated but the query frame needs to still be there. I've managed to do part of this. The "search" page and the "results" page are in separate iframes:
    <%@ page session="true" %>
    <html>
    <head>
      <title>Frames</title>
    </head>
    <body>
    <table>
      <tr>
        <td width="100%" colspan="2">
          <iframe title="Synonyms Search" src="search.jsf"
              width="800" height="200">
          Alternate search content...
          </iframe>
         </td>
      </tr>
      <tr>
      <td width="100%">
        <iframe src="results.jsp" title="Results"
          width="800" height="800">
          Results....
        </iframe>
      </td>
      </tr>
    </table>
    </body>
    </html>The reason this page is not using jsf tags is that the iframes will need to contain other pages that themselves are not jsf (mostly servlets) and I wasn't sure I could make that work. Currently the problem is that previously the search page had a QueryBean that the results page accessed to create it's table of results. Now in iframes the results.jsp frame just has a jsp processing exception and running the query does nothing. I'm new to JSF so I'm sure there's parts I'm missing, these do work if I pull them outside the frames and write navigation rules in the faces-context.xml file.
    Thanks,
    Sarah

    nigeldeakin wrote:
    The first thing to ask is whether you are sure that
         @Resource(name = "jms/QueueConnectionFactory",mappedName = "queueConnectionFactory")
         private ConnectionFactory connectionFactory;is valid. Does it work when you use it in other places?No it is not working still giving me NullPointerException for it. I'm using JBoss AS and having hard times deploying a jms queue on it i used an xml file to configure the queue and here is the file
    <?xml version="1.0" encoding="UTF-8"?>
    <server>
         <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=StockHistoryQueue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
              <depends optional-attribute-name="ServerPeer">
                   jboss.messaging:service=ServerPeer
             </depends>
              <depends>jboss.messaging:service=PostOffice</depends>
         </mbean>
    </server>i think it's not working because i have this null exception for queue factory.

  • Using JSF and JMS

    Hello Suners,
    I'm developing a web project using JSF for client side development and EJB for server side development. I need to inject a stateful session bean inside my managed bean in order to send the user entries in a message to a JMS queue which in turn give it to registered MDB for asynchronous requests handling. The problem is once the session bean is initialized from within the managed bean i have a null pointer exception for the QueueConnectionFactory and in turn gives a lifecycle exception for my jsf page. I don't know where i should use my session bean. any help will be deeply appreciated, here is the beans code :
    SessionBean
    @Stateful
    public class StockSessionBean implements StockSession {
         @Resource(name = "jms/QueueConnectionFactory",mappedName = "queueConnectionFactory")
         private ConnectionFactory connectionFactory;
         @Resource(name = "StockHistoryQueue", mappedName = "stockHistoryQueue")
         private Destination stockQueue;
    @Remove
    private void sendUserOptions(UserOptions userOptions) {
              try {
                   Connection connection = connectionFactory.createConnection();
                   Session session = connection.createSession(false,
                             Session.AUTO_ACKNOWLEDGE);
                   MessageProducer producer = session.createProducer(stockQueue);
                   ObjectMessage message = session.createObjectMessage();
                   message.setObject(userOptions);
                   producer.send(message);
                   producer.close();
                   session.close();
                   connection.close();
              } catch (Exception e) {
                   e.printStackTrace();
    }ManagedBean
    @ManagedBean(name = "userInfo")
    @SessionScoped
    public class UserInfo {
    @EJB
    private StockSession stockSession
    public doSubmit(ActionEvent e){
    stockSession.setEmail(email);
    stockSession.setStockName(stockName);
    stockSession.sendUserOptions();
    }MDB
    @MessageDriven(activationConfig = {
              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
              @ActivationConfigProperty(propertyName = "destination", propertyValue = "StockHistoryQueue") })
    public class StockMDB implements MessageListener {
         public StockMDB() {
          * @see MessageListener#onMessage(Message)
         public void onMessage(Message message)
              sendEmail(priceList, userOptions.getEmail());
         }

    nigeldeakin wrote:
    The first thing to ask is whether you are sure that
         @Resource(name = "jms/QueueConnectionFactory",mappedName = "queueConnectionFactory")
         private ConnectionFactory connectionFactory;is valid. Does it work when you use it in other places?No it is not working still giving me NullPointerException for it. I'm using JBoss AS and having hard times deploying a jms queue on it i used an xml file to configure the queue and here is the file
    <?xml version="1.0" encoding="UTF-8"?>
    <server>
         <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=StockHistoryQueue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
              <depends optional-attribute-name="ServerPeer">
                   jboss.messaging:service=ServerPeer
             </depends>
              <depends>jboss.messaging:service=PostOffice</depends>
         </mbean>
    </server>i think it's not working because i have this null exception for queue factory.

  • Using jsf with struts

    hi;
    i am trying to understand the proper architecture when using jsf and struts together.
    i think i understand the differences between the technologies . it seems to me that instead of justifying jsf there should be a focus on how the two technologies actually collaborate.
    specifically, i would like to know or see examples of things like replacing the view portion of struts and plugging in the jsf framework instead or how to i replace the struts actions with jsf commands or maybe they are totally different things.
    where can i get information like this?
    thanks.

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

Maybe you are looking for

  • SELECT INTO ( variable ) STATEMENTS NOT WORKING FOR SYBASE TABLE AS VIEW

    Dear Experts, We have connected our 9i db with Sybase db using Hs connectivity. and then we have create the view in oracle db for SYBASE_TABLE as SYBASE_TABLE_VIEW. ALL THE INSERT, UPDATE AND DELETE COMMANDS ARE WORKING BUT THE select Into (variable)

  • Why wont my phone connect to my laptop

    why wont my iphone connect to my laptop to go onto itunes????

  • Rendering quality of clips INSIDE iMovie - not on export

    OK - I'm new to iMovie and have only used it one other time to make a slideshow. This time I'm trying to make as good a slideshow for a class presentation as I possibly can. That said, this is what I've discovered and am perplexed by it. If I start o

  • Disable CFMX7 on a home development machine?

    I installed CF7 Developer Edition on my home machine so I could do work at home (or just play around with CF if I get an idea) when I need to. I've had it installed for about a month, and I end up interacting with it in some way (i.e. writing somethi

  • Rapidclone - How to find the source?

    Hi Experts, In R12.1.3, is there a way to find out the source of the clone? I mean any IP addressof the source server or DBID or DBName of the source database. Expectign your help to resolve this. Thanks Sony