Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12523

a4j:commandButton generates duplicated context path using a resource value expression within image attribute

    Details

      Description

      a4j:commandButton produces an extra context path prefix for the image resource path, when it is used with the value expression

      #{resource['library:file']}

      for the image attribute.

      Example code
      <a4j:commandButton image="#{resource['icons:icon.gif']}" value="#{resource['icons:icon.gif']}"/>
      
      Generated Result code
      <input type="image" alt="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" src="/com.example.my.context.path/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" value="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" onclick="RichFaces.ajax(&quot;j_idt76&quot;,event,{&quot;incId&quot;:&quot;1&quot;} );return false;" name="j_idt76" id="j_idt76">
      

      The generated code show the correct value for the expression within the generated button label, but the image could not be located correctly because of the wrong generated image resource path.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lfryc Lukáš Fryč
                Reporter:
                checkoff Andreas Owczarek
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified