myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Bischoff <jbisch...@klkurz.com>
Subject Re: <t:commandLink> and image of button - how not to hard code
Date Fri, 09 Feb 2007 14:12:53 GMT
Lisa,

You can define the img tag in a small JSP or xhtml file and simply 
include it in pages that need it. That's one option.

Lisa wrote:
> anyone have any ideas on this one?  How can an image be configured as a
> resource in one location and referred to by <t:commandLink throughout the
> application so that it is hardcoded inonly one place.
> 
> Is there any way to specify the img file location in a CSS and refer to it
> in the <t:commandLink?
> 
> thanks
> 
> L
> 
> 
> 
> Lisa wrote:
>> I have a commandLink below that has a reference to a hard coded path to
>> button image.  Is there a way to simply specify a resource, where that
>> resource has the hard coded path to the button?
>>
>> If so, where are resources like this typically configured?
>>
>> Is there a better way to write the <t:commandLink> below so that the 3
>> hard coded paths are gone?
>>
>> thanks
>>
>> ---
>>                                 <t:commandLink
>>                                     actionListener="#{myBean.addData}"
>>                                     id="btnAdd"
>>                                    
>> onmouseover="BtnAddImg.src='../../images/AddButtonBlue.gif'; return true;"
>>                                    
>> onmouseout="BtnAddImg.src='../../images/AddButtonSilver.gif'; return
>> true;"
>>                                 >
>>                                      ../../images/Pt-Add-Button-Silver.gif 
>>                                 </t:commandLink>
>>
> 



Mime
View raw message