Uploaded image for project: 'Shale'
  1. Shale
  2. SHALE-431

Tomahawk's enabledOnUserRole property doesn't work with Clay

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.0.5
    • Clay
    • None

    Description

      The "enabledOnUserRole" attribute accepted by most Tomahawk components (t:selectBooleanCheckbox, t:inputTextArea, etc.) does not have an effect when the components are instantiated using Clay. The "visibleOnUserRole" attribute does seem to work properly, however. Extending the components to explicitly set the "rendererType" attribute fixes the problem.

      Example:
      <input
      type="checkbox"
      jsfid="t:selectBooleanCheckbox"
      value="#

      {mybean.myflag}"
      enabledOnUserRole="myrole"
      />

      When logged in as a user that does not have the role "myrole", the checkbox above still renders normally (in read/write mode).

      Example workaround:

      <component jsfid="mySelectBooleanCheckbox" extends="t:selectBooleanCheckbox">
      <attributes>
      <set name="rendererType" value="org.apache.myfaces.Checkbox" bindingType="VB" />
      </attributes>
      </component>

      <input
      type="checkbox"
      jsfid="mySelectBooleanCheckbox"
      value="#{mybean.myflag}

      "
      enabledOnUserRole="myrole"
      />

      With the "rendererType" attribute set as above, the checkbox renders as expected (in read-only mode for users that do not have the specified role).

      This issue affects many if not all Tomahawk components that use the "enabledOnUserRole" attribute (which is pretty much all of them).

      Attachments

        1. tomahawk-1.1.3-config.xml
          375 kB
          Hermod Opstvedt

        Activity

          People

            gvanmatre@comcast.net Gary VanMatre
            reggert Richard W. Eggert II
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: