Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4340

raw input-fields in h:form breaks JSF-Application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.1.Final
    • JSF
    • None
    • Hide

      look at description.

      Show
      look at description.
    • Workaround Exists
    • Hide

      do not place raw html-input-fields within h:form-tags or use JBOSS AS 7.1.0 FINAL instead of JBOSS AS 7.1.1 FINAL.

      Show
      do not place raw html-input-fields within h:form-tags or use JBOSS AS 7.1.0 FINAL instead of JBOSS AS 7.1.1 FINAL.

    Description

      I have updated from JBOSS AS 7.1.0 FINAL to JBOSS AS 7.1.1 FINAL and after that a problem with its underlying JSF-Implementation occured.

      The following two versions shows the problem:

      When clicking the button 'my-btn' of VERSION 1,
      then JSF do not send any data to the server.
      It even does not say anything in my log or my facelets-debug-page. The error is totally silent!

      However, using VERSION 1 with JBOSS AS 7.1.0 FINAL works without error !!

      VERSION 2 does work both in JBOSS AS 7.1.0 FINAL and JBOSS AS 7.1.1 FINAL.
      When clicking the button 'my-btn' of VERSION 2,
      then JSF sends data to the server,
      because I placed my input-field outside of the JSF-Form-Tag.
      The input-field is NOT a JSF-component, I use it only for client-side-purpose (so no need for h:inputText).
      Why I am forced to use a h:inputText, when not wanting it ?

      VERSION 1:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      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:a4j="http://richfaces.org/a4j">

      <h:form id="overall-form" prependId="false">

      <header id="my-hd">
      <h:commandLink id="my-btn" value="get data " action="#

      {myBean.getData}">
      <f:ajax render="@form" />
      </h:commandLink>
      </header>

      <!-- I use a raw html-input-field only for client-side-purpose, so I do not want to use a <h:inputText /> , but this input-field breaks my JSF-Application !->
      <div
      <input type="text" value=""/>
      </div>


      </h:form>

      VERSION 2:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      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:a4j="http://richfaces.org/a4j">


      <h:form id="overall-form" prependId="false">
      <header id="my-hd">
      <h:commandLink id="my-btn" value="get data " action="#{myBean.getData}

      ">
      <f:ajax render="@form" />
      </h:commandLink>
      </header>
      </h:form>

      <!-- I use a raw html-input-field only for client-side-purpose, so I do not want to use a <h:inputText /> , as it is no more included within a JSF-form-tag, my JSF-Application works without errors->
      <div
      <input type="text" value=""/>
      </div>

      I guess, it is a bug in JSF-lib which was upgraded in JBOSS AS 7.1.1 FINAL to JSF 2.1.7.

      Attachments

        Activity

          People

            ssilvert@redhat.com Stan Silvert
            nimo22 nimo stephan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: