You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Enrico De Benetti (JIRA)" <de...@myfaces.apache.org> on 2007/07/17 09:51:04 UTC

[jira] Created: (TOMAHAWK-1057) imageLocation doesn't run correctly

imageLocation doesn't run correctly
-----------------------------------

                 Key: TOMAHAWK-1057
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1057
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Calendar
    Affects Versions: 1.1.6
            Reporter: Enrico De Benetti
            Priority: Minor
             Fix For: 1.1.7-SNAPSHOT


I tryed to use image Location in the inputCalendar component but it doens't run.
I developed a method into the class:
org.apache.myfaces.custom.calendar.HtmlCalendarRenderer ; the method is this:

protected static String getImagePath(FacesContext facesContext,UIComponent uiComponent){
    	
    	 String urlImage=HtmlRendererUtils.getImageLocation(uiComponent);                
    	   if(urlImage==null || urlImage.trim().length()==0){        	 
            urlImage= (JavascriptUtils.encodeString(AddResourceFactory.getInstance(facesContext)
                .getResourceUri(facesContext, HtmlCalendarRenderer.class, "DB/")));	 
         }    	     	
   return urlImage; 
}

and i call this method in the method getLocalizedLanguageScript when i  call:
setStringVariable(script,popupCalendarVariable +".initData.imgDir",getImagePath(facesContext,uiComponent));

if i defined a image path  i took the images i want, else i took the standard images  in the Tomahawk  jar.
It seems run good.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1057) imageLocation doesn't run correctly

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550423 ] 

Simon Kitching commented on TOMAHAWK-1057:
------------------------------------------

Setting the imageLocation attribute on the t:inputCalendar tag works for me with the current trunk, without any patches.

Please test again. If it still fails for you, post your calendar tag definition and the section of the generated html source that sets up the initData.imgDir variable.

> imageLocation doesn't run correctly
> -----------------------------------
>
>                 Key: TOMAHAWK-1057
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1057
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.6
>            Reporter: Enrico De Benetti
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: HtmlCalendarRenderer.java
>
>
> I tryed to use image Location in the inputCalendar component but it doens't run.
> I developed a method into the class:
> org.apache.myfaces.custom.calendar.HtmlCalendarRenderer ; the method is this:
> protected static String getImagePath(FacesContext facesContext,UIComponent uiComponent){
>     	
>     	 String urlImage=HtmlRendererUtils.getImageLocation(uiComponent);                
>     	   if(urlImage==null || urlImage.trim().length()==0){        	 
>             urlImage= (JavascriptUtils.encodeString(AddResourceFactory.getInstance(facesContext)
>                 .getResourceUri(facesContext, HtmlCalendarRenderer.class, "DB/")));	 
>          }    	     	
>    return urlImage; 
> }
> and i call this method in the method getLocalizedLanguageScript when i  call:
> setStringVariable(script,popupCalendarVariable +".initData.imgDir",getImagePath(facesContext,uiComponent));
> if i defined a image path  i took the images i want, else i took the standard images  in the Tomahawk  jar.
> It seems run good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.