Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-7975

jsf validation gives property does not exist warning on messagebundle properties

    XMLWordPrintable

Details

    • Hide
      • create a project in Eclipse Helios and add JSF capabilities to it. I created a regular faceted project and added JSF capabilities to it manually, with JBoss 5.1 as the target runtime
      • add a message bundle to the project. In my case I had one resource bundle with Dutch and English language files in a package 'texts' (texts/msg_en.properties, texts/msg_nl.properties)
      • define the bundle in a faces-config file

      <application>
      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
      <locale-config>
      <default-locale>en</default-locale>
      <supported-locale>en</supported-locale>
      <supported-locale>nl</supported-locale>
      </locale-config>
      <message-bundle>texts.msg</message-bundle>
      </application>

      • load the bundle using f:loadBundle. For reference: I have the f:loadBundle in a facelets template I share across all pages.
      • create a reference to the bundle value using # {msg.key}

        ; upon saving the file, the validator should now flag a warning on the fact that 'key' does not exist.

      Show
      create a project in Eclipse Helios and add JSF capabilities to it. I created a regular faceted project and added JSF capabilities to it manually, with JBoss 5.1 as the target runtime add a message bundle to the project. In my case I had one resource bundle with Dutch and English language files in a package 'texts' (texts/msg_en.properties, texts/msg_nl.properties) define the bundle in a faces-config file <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> <locale-config> <default-locale>en</default-locale> <supported-locale>en</supported-locale> <supported-locale>nl</supported-locale> </locale-config> <message-bundle>texts.msg</message-bundle> </application> load the bundle using f:loadBundle. For reference: I have the f:loadBundle in a facelets template I share across all pages. create a reference to the bundle value using # {msg.key} ; upon saving the file, the validator should now flag a warning on the fact that 'key' does not exist.

    Description

      I have one issue that I did not have with beta 1. In my facelets pages (jsf 1.2 capabilities) I use a message bundle (loaded through f:loadBundle) that I reference like "#

      {msg.keyname}

      ". Since beta 2 the validator flags all the message bundle properties as non-existing; that did not happen before the update. After changing the references to the map way, as "#

      {msg['keyname']}

      ", the validator was happy again.

      It does not happen for all my files; I have a set of richfaces modal panels that I include using facelets ui:include, stored in a separate subdirectory. These did not trigger any validation errors. Seems it only happens for files I reference in the jsf navigation rules. Although I did get the issue in a facelets template also.

      Just to make it clear: I was using beta 1 and had no problems. Upon updating my installed plugins I got beta 2 and after rebooting Eclipse this issue instantly popped up without any changes to the project. I tried the following without success:

      • clean the project
      • manually validate the entire project
      • change the JSF validation settings

      Attachments

        Activity

          People

            vrubezhny Victor Rubezhny (Inactive)
            gimbal_jira erik van altena (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: