JSF & JavaScript

Hello
In some .jspx source i have:
<?xml version='1.0' encoding='windows-1251'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=windows-1251"/>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1251"/>
<title>untitled1</title>
<script src="untitled1.js" type="text/javascript"></script>
</head>
<body><h:form>
Test text
</h:form></body>
</html>
</f:view>
</jsp:root>
so, when ai start page in browser i have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" SYSTEM "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/>
<title>untitled1</title>
<script src="untitled1.js" type="text/javascript"/>
</head>
<body>
<form id="_id0" method="post" action="/Classification2-Project2-context-root/faces/untitled1.jspx" enctype="application/x-www-form-urlencoded">
Test text
<input type="hidden" name="_id0" value="_id0" />
</form>
</body>
</html>
Why
<script src="untitled1.js" type="text/javascript">
</javascript>
goes
<script src="untitled1.js" type="text/javascript"/>
In FF no problem but in IE this not execute.
Regards.

No. It's good for user experience. Only don't completely take over the validation, just extend validation to the client side.

Similar Messages

  • Jsf+javascript for form button enable/disable

    I have a page that has checkboxes and input boxes on it. I want the submit button disable when the page initially loads, and then upon making any chages to the form fields, enable the submit button. I have the javascript working, but the form is actually not going to my submit method in my backing bean. Here is my javascript:
    function enableSubmitButton(form, inputElement) {
        var formId = document.getElementById(inputElement.id).form.id;
        var submitButtonId = document[formId][formId+":submitButton"];
        submitButtonId.disabled = false;
        submitButtonId.setAttribute("class", "inputButton");
        submitButtonId.setAttribute("className", "inputButton"); // for IE which does not recognize "class"
    }Here is an example of a checkbox:
    <h:selectBooleanCheckbox id="chkChannelEmail"
         value="#{services.emailSubscribed}"
         rendered="#{services.renderEmail}"
         onclick="displayRequiredFields(this, 'chkChannelService); enableSubmitButton(this.form, this);">
    </h:selectBooleanCheckbox>and here is my command button
    <h:commandButton type="submit" value="Submit" id="submitButton" action="#{BackingBean.submit}" styleClass="inputButtonDisabled" disabled="true" />It seems to be updating the disabled value, because when my page loads up, i can alert out the disabled value, and it is true, and if I click on a checkbox, it alerts out that the disabled value is false, but submitting my page doesn't actually work.
    Thanks!!
    Edited by: jrthor2 on Oct 16, 2009 3:10 PM

    The commandbutton won't be invoked as long as the disabled attribute still evaluates to 'true' in the server side. So you need to solve this the other way. Let the disabled attribute for example depend on a request parameter or pass a hidden input element which notifies JSF that the disabled attribute should evaluate to 'false' and so on.
    The same story applies on the 'rendered' attribute by the way.

  • JSF - JavaScript - onCondition

    Hello again,
    I want to popup a new window handled by javascript. That works fine by placing it simply on <body onload="openWindow()"> and some
    Script.
    So far so good.
    But this should only be done if some coniditions come true in the backingBean.
    With JSP this is no problem with putting some java code within brackets.
    I am searching in the documentation but in this case it is not easy to find the best way.
    What is the good way ?

    To output something conditionally in JSF, use 'rendered' attribute.
    <body onload="<h:outputText value="openWindow()" rendered="#{bean.property}" />">To output something conditionally in JSP, use JSTL's c:if/c:choose tags.
    <body onload="<c:if test="${bean.property}">openWindow()</c:if>">To output something conditionally in EL, use ternary operator.
    <body onload="<h:outputText value="#{bean.property ? 'openWindow()' : ''}" />">Or if using Facelets or if the bean is already in scope:
    <body onload="#{bean.property ? 'openWindow()' : ''}">or<body onload="${bean.property ? 'openWindow()' : ''}">You may find this article useful to get more insights about the wall between JSF and Javascript: [http://balusc.blogspot.com/2009/05/javajspjsf-and-javascript.html].
    Edited by: BalusC on 26-okt-2009 10:42 (typo)

  • JSF/ Javascript Date Picker

    Has anyone incorporated a javascript date picker with JSF? if so how did you handle the fact that the inputText for jsf doesn't have a name and is in the form of <h:inputText>? Any help would be appreciated, Thanks.

    Did you look at the ADF Faces Date picker as an option?
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/chooseDate.html
    or
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/selectInputDate.html

  • Http Unit and JSF Generated JavaScript

    Has anyone successfully tested generated JSF javascript with Http Unit? We are having an issue testing the onChange javascript event on a selectOneMenu.
    Here is the JSF cod and generated HTML:
    <h:selectOneMenu id="selectLaborCategory"
    onchange="#{workordersearch.onchangeLc}"
    value="#{workordersearch.selectedPc}">
    <f:selectItems
    value="#{workordersearch.profitCenters}" />
    </h:selectOneMenu>
    </h:panelGroup>
    <select id="workordersearchForm:selectLaborCategory" name="workordersearchForm:selectLaborCategory" size="1" onchange="document.forms['workordersearchForm']['workordersearchForm:_idcl'].value='workordersearchForm:selectLaborCategory';document.forms['workordersearchForm']['badge'].value='48305';document.forms['workordersearchForm']['li'].value='add';document.forms['workordersearchForm']['start'].value='20040920';document.forms['workordersearchForm'].submit(); return false;">          <option value="-1" selected>Home labor category</option>
              <option value="2">Engineering</option>
              <option value="1">Flight test center</option>
              <option value="0">Not available</option>
              <option value="3">Other</option>
              <option value="4">PCS</option>
    </select>
    Event 'document.forms['workordersearchForm']['workordersearchForm:_idcl'].value='workordersearchForm:selectLaborCategory';document.forms['workordersearchForm']['badge'].value='97900';document.forms['workordersearchForm']['li'].value='add';document.forms['workordersearchForm']['start'].value='20040920';document.forms['workordersearchForm'].submit(); return false;' failed: org.mozilla.javascript.EvaluatorException: The undefined value has no properties. ()
    Thank You,
    Henry

    I eventually found out what the problem is on this:
    Within httpunit v1.5.4, there is a class called com.meterware.httpunit.WebForm$Scriptable implements NamedDelegate. The NamedDelegate provides the getName() method, which looks for the "name" attribute on the form tag.
    JSF uses the id attribute instead. To fix this, modify WebForm$Scriptable to also implement IdentifiableDelegate. The IdentifiableDelegate provides the getID() method, which looks for the "id" attribute on the form tag.
    public String getID()
    return WebForm.this.getID();
    Once this code is in place, the javascript cited above works fine.

  • JSF 2.0 Ajax navigation problem

    Hello
    I have some problem with new AJAX functionality of JSF 2.0.
    I want to do the navigation between two pages via AJAX because it looks more smooth and I have the possibility to show a wait screen during the server request.
    Here is a short example. I have two facelet page (page1.xhtml and page2.xhtml)
    page1.xhtml
    <h:form>
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form>
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>
    ....The example is very simple. Two pages and on each page is a link to navigate to the other page. I open the page1.xhtml in my browser and I click on the link. The first request is processed as expected. The second pages is displayed successfully. Now I want to go back to the other page. If I click on the link ("Go to page 1") nothing happens. If I click a second time on the link the navigation is working agian. Why I have to click twice? Is this a bug or feature of jsf? Do I use the <f:ajax> feature wrong?
    I did some investigations with firebug and what I can see is that after the second click on page2.xhtml a hidden field is available.
    <input type="hidden" name="javax.faces.ViewState" value="-6158142916843935211:2501145469136072012">
    If I add this hidden field via firebug into the page the navigaiton back to the first page is working after the first click. Why is this hidden field only after the second click available?
    Any ideas what I'm doing wrong?
    Thanks in advance

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • JSF 2.0: View Scope Problem

    Hey,
    I 'm having trouble using the JSF 2.0 view scope. My application is a search page displaying some search parameters and a list of results. The search parameters are backed by a session scope bean, the results a backed by a request scoped bean and there is some kind of controller bean in request scope, too. Searching and displaying the results works fine.
    The second step was some kind of details page to display when clicking on one result element. I have another controller bean for this goal, but when pressing the link the requested action is not performed. I remembered similar problems I had in the past where I put the bean containing the result list into view scope.
    But after putting the results bean into view scope searching is not working anymore. You click the search button, the search action is performed. But after successfully storing the results a new results bean is instantiated. An empty one of course.
    Now I 'm not sure anymore if I understand the view scope: I have a single page, I search something and the results are displayed on the same page. I cannot believe that request scoped results work fine and view scoped results do not.
    Can anyone help me?
    Thanks,
    Stephan

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • JSF 2.0 ajax : Submit form  on Enter key press in h:inputTextarea

    Dear All,
    I am new to JSF 2.0 . Just wanted to submit the form in ajax when a user hits the "Enter": key while typing
    in the h:inputTextarea . I would be very thankful to you guys if you help me out.
    Thanking in advance!

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • JSF 2.0 commandLink link, outputLink, etc

    I have a paragraph like below
    Nowis the time for all good men to come to the aid of their country. If
    they don'e it could be the end of us
    I want to put a command link in this paragraph for say "good men" so it looks like this
    Nowis the time for all good men to come to the aid of their country. If
    they don'e it could be the end of us
    When I use the <h:commandLink action="#{mybean.clickLink}" value="good men"/>, the link works just fine, but renders like this on the page
    Nowis the time for all
    good men
    to come to the aid of their country. If they don'e it could be the end of us
    Is there anyway to keep the <tr></tr> from rendering around the link when it's turned into HTML? Is there another tag that will still let me use action="#{mybean.clickLink}"???? This link MUST go back through the server.
    Thanks,
    Doug

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • Invalidate session in another context

    Hi everyone,
    In a nutshell, how to invalidate session of another context residing in another server?
    If it is not possible, what is the best approach to achieve something similar to that?
    Thanks for reading this.
    Z

    u can as well use the MBean interface implementations for Tomcat (JBoss)
    and call some public method of a MBean under name "jboss.web:type=Manager,path=/,host=localhost,*" - like 'expireSession' passing the sessionId string as param
    Rafal Baton Zaczynski
    http://baton.pop.e-wro.pl - Java/JSF/JavaScript - tips&tuts

  • Error  while parsing JSF jspx page when including javascript  loops

    Hi All,
    I have a jspx document which contains jsf tags including trinidad tags. I have added a javascript function in the page, which contains a for loop statement, however when I run the page I get an error
    com.sun.facelets.FaceletException: Error Parsing /xAdvisorWeb/bundles/receivetask/manageinbox.jspx: Error Traced[line: 48] The content of elements must consist of well-formed character data or markup.
    at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
    at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
    at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
    at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
    at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
    at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
    Please note that normal javascript code has worked in my jsf page, this problem only occurs only when I add for loop or while loop in the javascript function. Can we not add javascript loops in a jsf page? Is there something else I need to include?
    This is the relevant code snippet :
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:tr="http://myfaces.apache.org/trinidad"
    xmlns:ch="http://www.chordiant.com/jsf"
    xmlns:chrd="http://chordiant.com/jsf/chrd">
    <f:view locale="#{preferLocale.locale}">
    <f:verbatim escape="true">
    <script>
    function validateInput(){
    for(int i=0;i<3;i++)
    alert('Hi');
    return false;
    </script>
    </f:verbatim>
    <tr:commandLink styleClass="ttmBtnCmdLink" onclick="return validateInput();"
    action="#{manageInbox.executeTaskForAssignedWorkItems}">
    <tr:outputText value="#{msgs.execute_btn}"
    styleClass="ttmBtnOutTxt" />
    </tr:commandLink>
    Any help will be much appreciated.
    Thanks in advance,
    Debajyoti

    M-Y wrote:
    replace "<" with "& l t ;"
    remove spaces in "& l t ;" when u paste it in ur code
    in my previous 2 replies i entered it with out spaces and it was getting converted to "<"The forum engine parses HTML entities. So just replace the & by its HTML entity &amp; and it will work: &lt;.
    But no, this is not going to work. JavaScript doesn't recognize HTML entities as operators.
    Follow the suggestion rlubke gave. Or, even better, put all Javascripts in its own .js file and include this file in the HTML head.

  • Javascript and html menu to be used with ADF/JSF using JDeveloper

    I have a menu for a webpage that was originally built using html and javascript. I need to convert it to be used with JSF and ADF. In the html, the menu items used an unordered list inside of a div tag.
    It looks something like this:
    <!--<div id="shademenu" class="shadetabs">
    <ul>
    <li>Item1</li>
    <li>Item2</li>
    <li>Item3</li>
    <li>Item4</li>
    <li>Item5</li>
    <li>Item 6</li>
    </ul>
    </div> -->
    AND
    the submenu(s) have links that look something like:
    <!--<div id="dropmenu0" class="dropmenudiv">
    Data
    Data
    Data
    </div>-->
    It is unclear to me how to work with my javascript menu to get the same look and feel with JSF or ADF as I did with html. Any insights would be great. Thanks.
    Daniel
    Message was edited by:
    dannyc

    Hello,
    If you do not find any existing JSF component (in ADF Faces/Trinidad, or any other JSF library) you can for sure extend/create your own component with specific renderer that will be the HTML/Javscript that you want.
    So here some interesting pointers about the subject:
    - Buildin Custom JSF component (Chris Schalk)
    - Build Custom JSF Components) (Jonas Jacobi
    - Extending Default Render (and lot of other JavaEE blueprints)
    These links will give you a starting point.
    Regards
    Tugdual Grall

  • How to  include external javascript and css resources to a jsf?

    I need to include external css and javascript files to my jsf page. Using the code below does not work because all the styles on the css page are ignored and the functions within the js files are not executed.
    <link rel="stylesheet" type="text/css" href="/resources/styles/style.css" />
    <script language="JavaScript" src="/resources/javascript/util.js"></script>When I try to execute any js function within a script tag on a jsf page I get an object expected error.
    I googled about my problem and found this piece of code for importing styles for an external css.
    <style type="text/css">
    @import url("/resources/styles/style.css");
    </style>How could I add an external javascript file to my jsf?

    Used the relative urls in my first post as well as these, and both were not working.
    <link rel="stylesheet" type="text/css" href="./resources/styles/style.css" />
    <script language="JavaScript" src="./resources/javascript/util.js"></script>The ./ tells that the external file can be found by starting at the current directory and working down the path to the specified file. This is my directory structure. Index.jsf is the file that references the external js and css files.
    -Webcontent
    |_index.jsf
    |_resources
    |__styles
    | |__style.css
    |__javascript
    |__util.js
    Either way I still can't reference the files that I need. Calling a javascript function results in an object expected error, and the styles are ignored.
    If I include the js file directly in the jsf then I can get it to work. I don't want to do this because I have created a handful of seperate js files, and do not want to include all of them in one page. I am using myfaces and tomahawk if that helps.

  • Problem using javascript to submit jsf form, values not submitted

    Greetings!
    I have a t:selectOneMenu where I want the page to be submitted when they change the selected value. At this point, I am able to get the form to submit and reload the page, which is all fine. The problem is that none of the values from the page are not set in the backing bean. I have break points on the setter methods that are not being hit.
    I have tried a number of things from searching multiple forums, but here are snippets from my latest version...
    <h:form>
    <t:commandLink id="hiddenLink" forceId="true" value="test link"
    action="#{pc_PageX.doBtnHiddenLinkAction}"></t:commandLink>
    <t:selectOneMenu id="pageList_top" forceId="true" value="#{pc_PageX.ValueX}"
         onchange="jspellSync(); submitPageX();">
         <f:selectItems value="#{pc_PageX.ListX}" />
    </t:selectOneMenu>
    </h:form>
    function submitPageX(){
         var hiddenLink = document.getElementById("hiddenLink");
         hiddenLink.click();
    }Note that the <t:commandLink> is not hidden, though it will be in the final version if I can get this to work.
    If I click the commandLink myself, the page is submitted with all the page values as expected. If I change the list value, thus using javascript to fire the commandLink's click event, the page is submitted with NO values.
    Can anyone come up with an explanation for this behavior? Or better yet, a solution?
    A couple other things I've tried...
    - Not using a commandLink and using jsf's submit function -> onchange="jspellSync(); submit();"
    - Clicking the link using other ways -> hiddenLink.fireEvent('onclick');
    If all else fails, I'll just add a button that they have to click to submit the form.

    snotmare wrote:
    BalusC wrote:
    I recall this problem in one of the ancient JSF versions. Which JSF version do you use? Do you have any room to upgrade to latest? We're using an IBM implementation of JSF, which is at version 7.0. The IBM implementation appears to be built on the JSF base 1.1.That's not an IBM JSF implementation, they do not have any one, they just have some component libraries which runs on top of some JSF implementation. RAD/WSAD ships by default with Sun JSF RI. Try upgrading to at least 1.1_02 which you can download from the aforementioned link. There's a gap of 2 years (and inherently a lot of bugfixes) compared to 1.1. If the application server used supports Servlet 2.5, you could even upgrade to the latest 1.2.
    We've had other issues with the IBM implementation, which could be the cause in this case too. We've been talking about switching to MyFaces, but there is one feature of the IBM version that we like. It's basically a script collector (hx:scriptCollector) that allows us to do pre-processing on the page.As said before, IBM does not have a JSF implementation. So replacing RI by MyFaces wouldn't make any difference.

  • Jsf and javascript to disable a button

    Hi
    is there a way to get the following code to disable the button called next
    when the button "btn" is clicked i call the javascript function myFunc but it does not disable the button called "Next"
    <html>
         <head>
              <title>Personal Info</title>
         </head>
         <body>
         <script type="text/javascript">
         function myFunc()
              document.personalForm.Next.disabled=true;    
         </script>
              <f:view>
                   <h:form id="personalForm">
                   <h:commandButton id="Next" value="Next" action="doSomething" />
                   <h:commandButton id="btn" value="button" immediate="true" onclick="myFunc()"  />
                   </h:form>
              </f:view>
         </body>
    </html>

    You should write Javascript according to the HTML source, not to the JSF code.
    View the generated HTML source and base your JS on that.

Maybe you are looking for

  • I'm new and I REALLY need help

    Hi, my name is Chris, I'm new to java.sun.com and I'm a beginner programmer seeking a degree in Comp Sci. I've been writing some code and I've stumbled on some problems that I can't troubleshoot, (run-time?) error seems to be way over my head, the pr

  • Hi people, can anyone tell whether one has the possibility in numbers, the entries in the pop-up menu to sort alphabetically me

    hi people, can anyone tell whether one has the possibility in numbers, the entries in the pop-up menu to sort alphabetically me

  • S955d -s5374 bugcheck

    Brand new Satellite throws a bugcheck every morning  and today three times.   0x0000009f   Also, internet explorer became unresponsive .  this is difficult because i am training a new computer user on this system.  I thought it might be avg , is ther

  • Middleware issues-Urgent

    Hi I am maintaining 2 products and few sales orgs in R/3. When I extract those 2 products to CRM, there is a sales Org is a missing in CRM after downloding. Example: 1.Product 100   sales org 10 to 70  ( done) 2.Product 200  Sales Org 10 to 69 ( Here

  • Generating reports for events

    All, We are looking to generate some reports on RM'd document events. For example, number of documents viewed in a week or month etc. Has anyone done something like this? Suggestions as to where to begin? Thanks, Andrew