ICEfaces
  1. ICEfaces
  2. ICE-10111

ace:fileEntry button labels can't be changed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      It's not possible to easily change the labels of the buttons that compose the ace:fileEntry component. In theory, it should be possible to override the default values by defining custom values in the application's message bundle to the following properties:

      org.icefaces.ace.component.fileEntry.ADD_FILES org.icefaces.ace.component.fileEntry.ADD_FILES_detail org.icefaces.ace.component.fileEntry.START_UPLOAD org.icefaces.ace.component.fileEntry.START_UPLOAD_detail org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD_detail

      However, this doesn't seem to be working.

        Activity

        Arturo Zambrano created issue -
        Arturo Zambrano made changes -
        Field Original Value New Value
        Fix Version/s 4.0 [ 11382 ]
        Arturo Zambrano made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ]
        Hide
        Arturo Zambrano added a comment -

        Closing this issue as invalid. It is already possible to override the ace:fileEntry button labels. It is done in the following way.

        Step 1. Create a properties file somewhere in your classpath. For example, in the ICEfaces Showcase app, create a file named 'fileEntryMessages.properties' in the 'org.icefaces.samples.showcase.view.resources' package.

        Step 2. Populate that file, defining values for the appropriate ace:fileEntry button labels keys. For example...

        org.icefaces.ace.component.fileEntry.ADD_FILES = Custom Add Files
        org.icefaces.ace.component.fileEntry.ADD_FILES_detail = Custom Add Files
        org.icefaces.ace.component.fileEntry.START_UPLOAD = Custom Start Upload
        org.icefaces.ace.component.fileEntry.START_UPLOAD_detail = Custom Start Upload
        org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD = Custom Cancel Upload
        org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD_detail = Custom Cancel Upload
        

        It is advised to define the same value for the '_detail' keys when overriding the default values.

        Step 3. In your application's faces-config.xml file, add a <message-bundle> tag under the <application> tag, containing the package and name of your custom messages files (without including the '.properties' file extension). For our example above, this would look as follows:

        	<application>
        		<message-bundle>
        			org.icefaces.samples.showcase.view.resources.fileEntryMessages
        		</message-bundle>
        	</application>
        
        Show
        Arturo Zambrano added a comment - Closing this issue as invalid. It is already possible to override the ace:fileEntry button labels. It is done in the following way. Step 1. Create a properties file somewhere in your classpath. For example, in the ICEfaces Showcase app, create a file named 'fileEntryMessages.properties' in the 'org.icefaces.samples.showcase.view.resources' package. Step 2. Populate that file, defining values for the appropriate ace:fileEntry button labels keys. For example... org.icefaces.ace.component.fileEntry.ADD_FILES = Custom Add Files org.icefaces.ace.component.fileEntry.ADD_FILES_detail = Custom Add Files org.icefaces.ace.component.fileEntry.START_UPLOAD = Custom Start Upload org.icefaces.ace.component.fileEntry.START_UPLOAD_detail = Custom Start Upload org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD = Custom Cancel Upload org.icefaces.ace.component.fileEntry.CANCEL_UPLOAD_detail = Custom Cancel Upload It is advised to define the same value for the '_detail' keys when overriding the default values. Step 3. In your application's faces-config.xml file, add a <message-bundle> tag under the <application> tag, containing the package and name of your custom messages files (without including the '.properties' file extension). For our example above, this would look as follows: <application> <message-bundle> org.icefaces.samples.showcase.view.resources.fileEntryMessages </message-bundle> </application>
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: