@ResourceDependencies in JSF2.0

Hi,
I'm testing with JSF2.0 beta1.
I added the following annotations to my components:
@ResourceDependencies({
     @ResourceDependency(name="/js/easytable/easytable.js",library="com.easypaygroup.framework",target="head"),
     @ResourceDependency(name="/css/easytable/easytable.css",library="com.easypaygroup.framework")
public class TableComponent extends AbstractTableComponent {
When I opens the page the resources (JS & CSS) are correctly added to my html page.
When I post the page to a second page, the second page will not have the ResourceDependencies in the html.
Strange when I post to the same page the ResourceDependencies are correct.
Conclusion, when I fire an action to a second page the ResourceDependencies are lost!
Does somebody know if there is any problem,
Pieter

I'm guessing you're using Mojarra's implementation of JSF 2.0 (there is a distinction between the implementation and a specification). If so, use a nightly build - that issue should be resolved.

Similar Messages

  • Creating new JSF2 pages from a running Servlet (3.0) or JSF2 page?

    I'm new to JEE6 web apps with JSF 2.x frontends (GlassFish 3), and I still wasn't able to find a solution for this dynamic JSF 2.x problem:
    *From inside a running JSF 2.x web app (Servlet 3.0), which possibilities (if any) do I have to dynamically add generated JSF pages (whole new .xhtml files) to specific folders of the (exploded) document root, so that these pages can be dispatched to the client like any traditional, statically-deployed one?*
    Background: An app for "promoting" authors/editors (content providers) which has these few main requirements:
    <ol>
    <li>New providers will register under <tt>www.acme.com/app/register.xhtml</tt>.</li>
    <li>The system will grant each provider "sub-domain" associated with web space under
    <tt>www.acme.com/app/<b>providerX</b></tt> where providerX is an arbitrary sub-domain name chosen by the provider during the registration.</li>
    <li>Each provider will initially have some pre-defined pages in their document context root, e.g.
    <tt>www.acme.com/app/providerX/index.xhtml</tt>, <tt>about-me.xhtml</tt>, <tt>contact.xhtml</tt>, etc.</li>
    <li>Each provider will have an administration console for managing 2 tasks:
    <ul>
    <li type="a"><tt>www.acme.com/app/providerX/admin/page-manager.xhtml</tt> </li>
    <li type="a"><tt>www.acme.com/app/providerX/admin/customer-manager.xhtml</tt></li>
    </ul>
    to specify new pages with offers, publish these pages in their document context root, e.g. <tt>www.acme.com/app/<b>providerX</b>/<b>my-services</b>.xhtml</tt> (customized page name), and
    to manage their readers/customers, respectively.
    </li>
    <li>Thus, each providerX will also have a pre-deployed customer registration page running, which creates standard customer accounts. E.g.:
    <ul>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/registration.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/login.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/customer-account-dashboard.xhtml</tt></li>
    </ul>
    </li></ol>
    Please note: I know that for such kind of systems a CMS would be more suitable, but is such a system -- here aiming at only basic functionality -- also realizable in pure JEE 6 technologies, i.e. w/o CMS???
    <b>The unclear main aspect is stated in my initial question above. Basically, I hope to get these clarifications:</b>
    <ol>
    <li><b>Which app architecture designs can I use to deploy new generated JSF pages or servlets from within a running JSF page or servlet???</b></li>
    <li><b>Supposing that all relevant page description data provided by a provider is stored in a db:
    Where can I "cache" the new .xhtml pages generated from these data on-the-fly when (a) an exploded WAR, and (b) a packaged WAR is running???</b>
    The pages shall be "hooked" to the scope (doc root) of the respective provider and dispatches by the <tt>FacesServlet</tt> as such.</li>
    </ol>
    Due to the crucial importance in a current project, I'd really appreciate any constructive help very much.
    Natalia.

    Natalia F. wrote:
    Determining you as one of the experts in this forum, please, could I ask you how you'd solve this kind of web apps in JSF2 (one of the requirements stated at the beginning of this thread):I'm certainly an expert at having an opinion about everything.
    >
    Having a "page-manager.xhtml" JSF2 UI at "/page-manager" context that lets registered member X define a website (=a set of .jsf/.xhtml pages) in a new context "/websiteX" (where "websiteX" is freely chosen and associated with dedicated webspace to store the pages in the filesystem):
    How to store these dynamically created website pages from within the PageManagerServlet?
    <ol><li type="a">Could I create a new exploded WAR structure in the filesystem (or elsewhere) when a new context is defined, and then store new .jsf/.xhtml files therein when a new page is defined, all this with usual file operations? -- Would this be enough, or...</li>
    <li type="a">...after storing a new page, would I need to explicitly tell the container to deploy the page (or re-deploy the WAR(?)) so that I can instantly test/run the page when it is new/modified, or will it be compiled automatically when pointing a browser to it???
    I guess both is possible, but for performance reasons, a pre-compile would be better. How can I achieve this?</li>
    </ol>
    Thank you a million for your help, Natalia.I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.
    My "expert" opinion: this cannot be done with JSF. In fact the only Java web framework which I can think of that has any chance of making something like this possible is Play framework. I'd really take the road that EJP took: make the content dynamic, not the webapp.

  • How to get the index value from rich:dataTable in jsf2.0

    hi,
    I am developing web application using jsf2.0. In this case, I used rich:dataTable tag for display the values from mysql.
    so this is working..
    my problem is, How to select the perticular row or index from the datatable for another processing...
    help me..
    Thanks.

    Hi,
    You need to get the selectedIndex attribute of the drop down element, e.g.
    String ind = web
                   .element(
                        41,
                        "/web:window[@index='0' or @title='Our Business Web Site']/web:document[@index='4' or @name='optBody']/web:form[@name='frmOptions' or @index='0']/web:select[(@name='PathLen' or @index='2')]").getAttribute("selectedIndex");
    System.out.println("Drop down index is: " + ind);
    You can use the Object Browser to get the path to the element you are interested during recording.
    Regards,
    Jamie

  • Need Suggestion about JSP/Servlet OR JSF2.0

    I am new to Java and working on it as fast as possible. Got 5+ years experience in ASP.NET C#. I have covered basics of Java and now want to jump into web development by making a project by converting one of my ASP.NET project.
    I have explored Servlet/JSP and JSF2.0. Want to learn only one from them and put all my energies in it. I find JSF more robust, clean and easy to use with templating etc . I am doing all this so that I cover most of the things to complete one full project and try to find a job as starter in Java.
    Now my questions
    As a starter job in Java what things should I know?
    Should I learn Servlet/JSP even if I am good at JSF (suppose)?
    Do companies still need skills in Servlet/JSP or they are adopting JSF?
    Thanks

    Prateek wrote:
    first i would like to asked you one question why you want to change your technology ? you have over 5+ year experience in Microsoft technology .java and microsoft both are programming language .i recommend you if you have 5+ year experience then you do not need to switch your technology . this is one things .but i am sure it is not a big deal for you to switch the technology .
    see jsf and jsp both are based on the servlet .main things is that you have to learn servlet first .Why wouldn't you want to switch your technology? Java barely existed when I started my career. If I had stuck with only the language I needed for my first job, I'd have very few jobs available to me now. If one technology was good for everything, then other technologies wouldn't be invented--we would have stuck with the first technology. Different languages have different advantages (and different disadvantages). You should learn what you need for the tasks you are given, as well as learn what you need for the jobs that are available. If there are fewer jobs in technologies you already know, you should learn a new one. Or, you can learn a new one just because you want to expand your horizons, or any other reason you feel like.

  • Sessions and Controllers best-practice in JSF2

    Hi,
    I've not done web development work since last using Apache Struts for its MVC framework ( about 6 years ago now ). So bear with me if my questions does not make sense:
    SESSIONS
    1) Reading through the JSF2 spec PDF, it mentions about state-saving via the StateManager. I presume this is also the same StateManager that it used to store managed-beans that are in @SessionScoped ?
    2) In relation to session-scoped managed beans, when does a JSF implementation starts a new session ? That is, when does the implementation such as Mojarra call ExternalContext.getSession( true ) .. and when does it simply uses an existing session ( calling ExternalContext.getSession( false ) ) ?
    3) In relation to session-scoped managed beans, when does a JSF implementation invalidate a session ? That is, when does the implementation call ExternalContext.invalidateSession() ?
    4) Does ExternalContext.getSession( true ) or ExternalContext.invalidateSession() even make sense if the state-saving mechanism is client ? ( javax.faces.STATE_SAVING_METHOD = client ) Will the JSF implementation ever call these methods if the state-saving mechanism is client ?
    CONTROLLERS
    Most of the JSF2 tutorials that I have been reading on-line uses the same backing-bean when perfoming an action on the form ( when doing a POST or a GET or a post-back to the same page ).
    Is this best practice ? It looks like mixing what should have been a simple POJO with additional logic that should really be in a separate class.
    What have others done ?

    gimbal2 wrote:
    jmsjr wrote:
    EJP wrote:
    It's better because it ensures the bean gets instantiated, stuck in the session, which gets instantiated itself, the bean gets initialised, resource-injected, etc etc etc. Your way goes goes behind the scenes and hopes for the best, and raises complicated questions that don't really need answers.Thanks.
    1) But if I only want to check that the bean is in the session ... and I do NOT want to create an instance of the bean itself if it does not exist, then I presume I should still use ExternalApplication.getSessionMap.get(<beanName>).I can't think of a single reason why you would ever need to do that. Checking if a property of a bean in the session is populated however is far more reasonable to me.In my case, there is an external application ( e.g. a workflow system from a vendor ) that will open a page in the JSF webapp.
    The user is already authenticated in the workflow system, and the external system from the vendor sends along the username and password and some parameters that define what the request is about ( e.g. whether to start a new case, or open an existing case ). There will be no login page in the JSF webapp as the authentication was already done externally by the workflow system.
    Basically, I was think of implementing a PhaseListener that would:
    1) Parse the request from the external system, and store the relevant username / password and other information into a bean which I store into the session.
    2) If the request parameter does not exist, then I go look for a bean in the session to see if the actual request came from within the JSF webapp itself ( e.g. if it was not triggered from the external workflow system ).
    3) If this bean does not exist at all ( e.g. It was triggered by something else other than the external workflow system that I was expecting ) then I would prefer that it would avoid all the JSF lifecycle for the current request and immediately do a redirect to a different page ( be it a static HTML, or another JSF page ).
    4) If the bean exist, then proceed with the normal JSF lifecycle.
    I could also, between [1] and [2], do a quick check to verify that the username and password is indeed valid on the external system ( they have a Java API to do that ), and if the credentials are not valid, I would also avoid all the JSF lifecycle for the current request and redirect to a different page.

  • Issue in JSF2.0 with NetBeans6.9

    Hi,
    I am trying to build one jsf component using the JSF2.0 with NetBeans 6.9. I am trying to follow the steps mentioned at below link
    http://www.exadel.com/tutorial/jsf/HowToWriteYourOwnJSFComponents.pdf
    I am facing following exceptions while running my application on tomcat server.
    1) First Issue :-
    ==============================================================================
    error trance :-
    org.apache.jasper.JasperException: An exception occurred processing JSP page
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    java.lang.UnsupportedOperationException: Not supported yet.
         com.home.jsf.components.TickerTag.getComponentType(TickerTag.java:26)
         javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:205)
         javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:476)
         javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:660)
         javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1126)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_j_005fticker_005f0(welcomeJSF_jsp.java:155)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_005fview_005f0(welcomeJSF_jsp.java:123)
         org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    ===============================================================================
    Every things are in place but its not behaving as expected.
    2) Second issue :-
    After doing some more google, I added one jsf file and modified my web.xml
    from *<welcome-file>faces/welcomeJSF.jsp</welcome-file>* to *<welcome-file>faces/welcome.xhtml</welcome-file>*
    then it started showing me below error.
    ========================================
    XML Parsing Error: no element found
    Location: http://localhost:8080/HelloWorldJSF/
    Line Number 1, Column 1
    ========================================
    Could any one please help me on this.
    Thanks in advance
    Jaikrat Singh Tariyal

    Hi,
    trhat would be possible for an Unix System ... but I'm on a Windows OS system and I already assign everybody with full modification rights ...
    Thanks anyway for ur help I'll recheck it anyway sometimes its strange ...
    greetings Lars

  • Error in JSF2.0 !!!!! URGENT !!!!!

    Using: tomcat 6.0.18
    Using: JSF 2.0
    -------------------------------- JSF Managedbean
    public class TestHandler {
    private Boolean active = null;
    public Boolean getActive(){
         return active;
    Public void setActive(Boolean active){
         System.out.println(“My value is: “+ active);
         this.active = active;
    ------------------------------------------------------- JSF Custom Component
    <e:yesNo value="#{testHandler.active}"/>
    ------------------------------------------------------- RENDERED HTML
    <select name="f:active" id="f:active">
         <option value="" selected="selected"></option>
         <option value="YES">Ja</option>
         <option value="NO">Nee</option>
    </select>
    ----------------------------------- yesNo COMPONENT RENDERER
    public void decode(FacesContext context, UIComponent component) {
         UIInput input = (UIInput) component;
    input.setValue(null);
    !!!!!!!!!!!!!!!!!!!!!!!!!!!! RESULT !!!!!!!!!!!!!!!!!!!!!!
    Expected:
    -     property active of the testhandler must be null
    -     [console output] My value is: null
    Actual result:
    -     property active is false
    -     [console output] My value is: false
    !!!!!!!!!!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
    This error does not occur a tomcat 6.0.14 + JSF 1.2

    Hi BalusC,
    This error has nothing to do with JSF2.0 it is all due to the tomcat-6.0.18 jasper libraries.
    I have the same error with JSF1.2 as with JSF2.0.
    But i don't have this error when I use tomcat-6.0.13 for both (JSF1.2 & JSF2.0)!!!
    To solve this problem I copied the jasper libraries from tomcat-6.0.13 to the tomcat-6.0.18.
    Since tomcat-6.0.18 is a final release I posted it as a bug in the jasper category.
    When I find some time I will drill down with my debugger to point the error in the jasper library code.
    Regards,
    Pieter

  • Jsf2 authentication problem

    Hi all,
    I have a problem with authentication for my JSF 2 project.
    Actually I have just 2 simple pages:
    1. login.xhtml
    2. protected.xhtml
    You can login with ID and PW on the login.xhtml . If you successfully login, than you can get protected.xhtml. If you not, than error message or whatever.
    My problem is : if you simply call the URL of protected.xhtml page without the login function, than it can displayed often and unprotected. I want protect this second page. It must be only available after successfully login.
    My server is Tomcat 6.24.
    How can I configure the authentication of JSF2?
    I need simple examples and tips.
    Thank you
    Tuvshin
    Edited by: Tuvshin09 on Apr 8, 2010 1:31 AM
    Edited by: Tuvshin09 on Apr 8, 2010 1:50 AM

    Hello. RaymondDeCampo.
    I made it via web.xml. But this approach broked the JSF2 components, ajax and any more. For example: Here i protected my URLs via web.xml (see web.xml).
    web.xml
    <web-app>
    <!-- SECURITY -->
       <security-role>
          <role-name>admin</role-name>
       </security-role>
       <security-role>
          <role-name>customer</role-name>
       </security-role>
       <security-constraint>
          <display-name>Security constraint for the /private folder</display-name>
          <web-resource-collection>
             <web-resource-name>Protected Area</web-resource-name>
             <url-pattern>/xhtml/cust/*</url-pattern>
             <!-- If you list http methods, only those methods are protected. -->
             <!-- Leave this commented out to protect all access -->
             <!--
                <http-method>DELETE</http-method> <http-method>GET</http-method>
                <http-method>POST</http-method> <http-method>PUT</http-method>
             -->
          </web-resource-collection>
          <auth-constraint>
              <!-- Only only administrator and CMS editors to access this area -->
             <role-name>admin</role-name>
             <role-name>customer</role-name>
          </auth-constraint>
       </security-constraint>
       <login-config>
          <auth-method>FORM</auth-method>
          <form-login-config>
             <form-login-page>/xhtml/index.jsf</form-login-page>
             <form-error-page>/xhtml/index.jsf</form-error-page>
          </form-login-config>
       </login-config>
       <!--
       <login-config>
                    <auth-method>BASIC</auth-method>
                    <realm-name>Editor Login</realm-name>
        </login-config>
       -->
       </web-app>I want implement the security that can base on "JSF2".
    Tuvshin
    Edited by: Tuvshin09 on Apr 8, 2010 11:55 PM

  • SaveState and restoreState never called after upgrade to JSF2.1.1

    Hi,
    I upgraded my project to JSF2.1.1.
    For all my custom compontent the saveState and restoreState is never called.
    Are there any required changes due to JSF2.1.1 release?
    Thanks in advance,
    Pieter

    Most likely, this will fix your issue:
    1: http://docs.info.apple.com/article.html?artnum=93698
    Also clean up your temp files:
    (Empty your Temp directory and restart)
    2: http://docs.info.apple.com/article.html?artnum=93976
    If you get an error when uninstalling quicktime, go through article 1, then run the Microsoft Cleanup Utility to remove quicktime afterwards:
    3: http://support.microsoft.com/default.aspx?scid=kb;en-us;290301

  • JSF2.0 Ajax validation Problem

    Hello everyone,I'm learning ajax validation of JSF2.0
    <h:form>
    <h:inputText id="name" value="#{user.name}" validator="#{user.validateName}">
    <f:ajax event="keyup" render="nameError"/>
    </h:inputText>
    <h:message for="name" id="nameError" style="color:red"/>
    </h:form>
    and user.validateName:
    public void validateName(FacesContext fc, UIComponent c, Object value) {
    if ( ((String)value).contains("_") )
    throw new ValidatorException(new FacesMessage("Name cannot contain underscores"));
    and it worked fine before I change the validator to JSF standard length validator:
    <h:form>
    <h:inputText id="name" value="#{user.name}">
    <f:validateLength minmum="5" maxmum="10"/>
    <f:ajax event="keyup" render="nameError"/>
    </h:inputText>
    <h:message for="name" id="nameError" style="color:red"/>
    </h:form>
    it didn't work then,when I typee in username shorter then 5 or longer then 10 it didn't show any error...
    any reply will help me,TKS!

    FoxInSky wrote:
    Hi all:
    Could Anybody told me the reason? Why the Ajax button send and receive more data than the traditionally button? Or if there is anything wrong the way I use its internal Ajax library?Perhaps because it sends more information? Why would you care?
    >
    Another question is: When I clicked the AjaxButton quickly and continually,the page will become unresponsive,and the result from HttpWatch shows Aborted,and sometimes "Abored exception" will be printed out in the console window.If you press the button like that, more and more ajax requests will be done. You could block that by disabling the button after pressing it.
    As for "it not working", what about the receiving end of the ajax call? Is the backing bean action actually being run?

  • Do we need jsf-facelets.jar with JSF2?? Please Help

    Hello,
    In the VDL Section of this article [http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#facelets|http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#facelets]
    It says that JSF 2 already has facelets. So do we need facelets jar with jsf2 jars??
    I am facing few issues concerning this. Once of them is below.
    INFO: Initializing Mojarra 2.0.1 (FCS b02) for context ''
    Nov 25, 2009 11:31:48 AM com.sun.faces.config.processor.ApplicationConfigProcessor processViewHandlers
    WARNING: JSF1069: Disabling the JSF 2.0 Facelets ViewHandler as an older FaceletViewHandler, com.sun.facelets.FaceletViewHandler, has been explicitly configured. If this is not desired behavior, remove the older FaceletViewHandler and library from your application.
    Nov 25, 2009 11:31:48 AM com.sun.faces.config.ConfigManager initializeThanks for responding!

    - Not sure of Intellij internals, but you should be able to override the default mapping of the URI to some xml resource that describes the tags -
    How do I do that? Should I extract the *.tld files from the jsf-impl.jar and put in WEB-INF and then include the path to it in the facelet?
    - How were you making the taglib.xml known to the older runtime? The doctype shouldn't make a difference here. -
    I just included my test-component.taglib.xml in the web.xml like this and is still the same.
    <context-param>
            <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
            <param-value>/WEB-INF/test-component.taglib.xml</param-value>
        </context-param>This is my taglib file. Any thing wrong below?
    <?xml version="1.0" encoding="UTF-8"?>
    <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                 http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
                 version="2.0">
        <namespace>http://tahir.components/comp</namespace>
            <tag>
                <tag-name>test</tag-name>
                <component>
                    <component-type>testComponent</component-type>
                    <handler-class>com.customcomponent.handler.TestComponentHandler</handler-class>
                </component>
            </tag>
    </facelet-taglib>So when I include the uri in the xhtml file, it says it doesnt recognize the URI. When I add the facelet jar it recognizes it. Not sure whats going on.
    Thanks for your time, appreciate it.
    Edited by: tz_coder on Nov 27, 2009 7:39 AM

  • H:inputtext not working with multiple forms in JSF2.2

    h:inputText is not working in the latest JSF2.2 with multiple forms. I have 2 forms
    form1 have: one command button and one input text
    form2 has: one input text and one output label
    on click of command button in form1, i am rendering the form2(both outputlabel and input text).
    but only output label is rendered properly with correct values (corresponding getter method gets called and value is displaying) but the input text is not calling the corresponding getter method hence showing null.
    Note: we noticed this issue only if we use multiple forms, within single form its working fine. also it worked fine in JSF2.0
    Version used: JSF api - 2.2 (com.sun.faces) JSF impl - 2.2 (com.sun.faces)
    let me know if anyone have solution to handle this.
    the forms are not nested and both the beans are in View scope.  
    <h:form id="form1" prependId="false">
    <a4j:commandLink id="actionEdit" title="Click" action="#{bean.action}" 
    render="paymentInstructionDetail" styleClass="iconLarge edit" />
    </h:form>
    <h:form id="form2" prependId="false">
      <a4j:outputPanel ajaxRendered="true" id="paymentInstructionDetail">
      <h:inputText value="#{bean1.amount}" id="sample"/>
      <h:outputLabel value="#{bean1.amount}" id="sampleLabel"/>
     </a4j:outputPanel>
    </h:form>

    Your link doesn't work. Do you mind reporting it?

  • How disable JSF2 edit my script tag?

    I am using jsf2. Problem is the script tag being edited to append closing script tag. It cause the jquery not work(I also not sure why but it does not work when i come with closing tag). How to disable jsf to format my script tag?
    original
    <script src="/jquery/menu/demo/jquery.dimensions.min.js"/>
    output
    <script src="/jquery/menu/demo/jquery.dimensions.min.js"><!--
    //--></script>

    am not sure, try with this
    <script src="/jquery/menu/demo/jquery.dimensions.min.js" type="text/javascript" > </script>

  • Best way for skinning a JSF2.0 application

    Hi,
    I’m wondering what is the best way to skin my application.
    My applications uses facelet templates with css files included.
    The css of my custom components are injected with the @ResourceDependancy annotation.
    My question is if there is a standard way for skinning (in JSF2.0)
    Thanks for the suggestions.
    Pieter

    There is no boxed feature for skinning, however, it should be possible using the @ResourceDependency annotation.
    If each skin is contained within a resource library, then you can refer to the library via EL expression within the annotation:
    @ResourceDependency(library = "#{user.selectedSkin}", name = "style.css")
    selectedSkin resolves to a library name included with your component library.

  • Must I use spring Framework with JSF2 and Hibernate?

    Hi all,
    I'm starting to develop a web portal and I would use JSF2 and Hibernate.
    Now I don't know JSF2 so I searched some tutorial.
    I found a tutorial on JSF2 that seems very complete but in this tutorial I found a section where the author use Hibernate for the "model section", JSF2 for the "view section" and Spring for the "controller section"!
    Now I have a doubt, can I develop a web portal without Spring MVC or I can't develop any controller's component with JSF2?
    Thank you for your replies!

    For Ram, do you mean that JSF2 isn't a MVC framework with your reply?
    For Kayaman, the author did some examples how implements some frameworks with JSF2 and he do 3 examples:
    1) JSF2 and JDBC;
    2) JSF2 and Spring;
    3) JSF2, Spring and Hibernate!
    However, after this thread, I found a forum in linked to the tutorial and I asked why they use JSF2 and Spring together! Now Im waiting the answer!
    For Gimbla2: well, I'm novice on JSF2 but I develop for some years with ADF and JBO framework!
    You are right to tell me "On the official sites you can find all informations" but I would know some things from some one that used both frameworks!
    Thanks again to all.
    Edited by: Filippo Tenaglia on 20-giu-2011 14.16

Maybe you are looking for