Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1536

Incorrect code in example in liferay faces portlet documentation

    Details

      Description

      In the documentation you have this code example:

      <link
      href="#{liferay.themeDisplay.uRLSignIn}">#{i18n['sign-in']}</link>
      

      However, per the java beans spec:

      8.8 Capitalization of inferred names.

      When we use design patterns to infer a property or event name, we need to decide what rules
      to follow for capitalizing the inferred name. If we extract the name from the middle of a normal
      mixedCase style Java name then the name will, by default, begin with a capital letter.
      Java programmers are accustomed to having normal identifiers start with lower case letters.
      Vigorous reviewer input has convinced us that we should follow this same conventional rule
      for property and event names.

      Thus when we extract a property or event name from the middle of an existing Java name, we
      normally convert the first character to lower case. However to support the occasional use of all
      upper-case names, we check if the first two characters of the name are both upper case and if
      so leave it alone. So for example,

      • "FooBah" becomes "fooBah"
      • "Z" becomes "z"
      • "URL" becomes "URL"

      We provide a method Introspector.decapitalize which implements this conversion rule.

      Which leads to the correct example code:

      <link
      href="#{liferay.themeDisplay.URLSignIn}">#{i18n['sign-in']}</link>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-2.1.2-ga3
                liferay-faces-3.0.2-legacy-ga3
                liferay-faces-3.0.2-ga3
                liferay-faces-3.1.2-ga3