You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by emerson <ec...@gmail.com> on 2011/03/17 19:12:17 UTC

Tomahawk Input Calendar is showing in the wrong position

We changed the template of the page, and afterwards the calendar popup
started to appear away from the button.

The component configuration is:

<t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
renderPopupButtonAsImage="true" renderAsPopup="true"
popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
inicial para pesquisar" title="Digite a data inicial para pesquisar">
</t:inputCalendar>

The imagens of the before/After

Before:
https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink

After:
https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink

I would like to highlight that when using firebug, it shows in the div
tag that wraps the calendar a fixed posiition by top and left style
attributes. We dont know however where this is set.

Any ideas?

Re: Tomahawk Input Calendar is showing in the wrong position

Posted by emerson <ec...@gmail.com>.
Thanks Leonardo!

On 17 March 2011 16:28, Leonardo Uribe <lu...@gmail.com> wrote:
> Hi
>
> To locate the default files it uses tomahawk AddResource api. In
> tomahawk for JSF 2.0 it uses the new ResourceHandler that is part of
> the standard api.
>
> In the first case look on tomahawk jar on
> org/apache/myfaces/custom/calendar/resource/ path. You'll see two
> themes (DB and WH).
>
> http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/
>
> In the second case look on tomahawk jar on META-INF/resources.
>
> http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core20/src/main/resources/META-INF/resources/
>
> The easy way is just copy the default resources and do the necessary changes.
>
> regards,
>
> Leonardo
>
> 2011/3/17 emerson <ec...@gmail.com>:
>> What would be the original CSS on regards to location?
>> Would it possible to just override that positioning without loosing
>> the rest of the CSS?
>>
>> thanks
>> emerson
>>
>> On 17 March 2011 15:40, Leonardo Uribe <lu...@gmail.com> wrote:
>>> Hi
>>>
>>> That is something new. I have never seen that before. Maybe some css
>>> configuration affects the div or the calendar, so maybe you need to
>>> create a custom theme for the calendar so you can override the default
>>> values where the popup appear.
>>>
>>> The properties to do that are styleLocation, javascriptLocation and
>>> imageLocation (in tomahawk for jsf 2.0 there is also styleLibrary,
>>> javascriptLibrary and imageLibrary).
>>>
>>> regards,
>>>
>>> Leonardo
>>>
>>> 2011/3/17 emerson <ec...@gmail.com>:
>>>> We changed the template of the page, and afterwards the calendar popup
>>>> started to appear away from the button.
>>>>
>>>> The component configuration is:
>>>>
>>>> <t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
>>>> renderPopupButtonAsImage="true" renderAsPopup="true"
>>>> popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
>>>> id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
>>>> inicial para pesquisar" title="Digite a data inicial para pesquisar">
>>>> </t:inputCalendar>
>>>>
>>>> The imagens of the before/After
>>>>
>>>> Before:
>>>> https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink
>>>>
>>>> After:
>>>> https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink
>>>>
>>>> I would like to highlight that when using firebug, it shows in the div
>>>> tag that wraps the calendar a fixed posiition by top and left style
>>>> attributes. We dont know however where this is set.
>>>>
>>>> Any ideas?
>>>>
>>>
>>
>

Re: Tomahawk Input Calendar is showing in the wrong position

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

To locate the default files it uses tomahawk AddResource api. In
tomahawk for JSF 2.0 it uses the new ResourceHandler that is part of
the standard api.

In the first case look on tomahawk jar on
org/apache/myfaces/custom/calendar/resource/ path. You'll see two
themes (DB and WH).

http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/

In the second case look on tomahawk jar on META-INF/resources.

http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core20/src/main/resources/META-INF/resources/

The easy way is just copy the default resources and do the necessary changes.

regards,

Leonardo

2011/3/17 emerson <ec...@gmail.com>:
> What would be the original CSS on regards to location?
> Would it possible to just override that positioning without loosing
> the rest of the CSS?
>
> thanks
> emerson
>
> On 17 March 2011 15:40, Leonardo Uribe <lu...@gmail.com> wrote:
>> Hi
>>
>> That is something new. I have never seen that before. Maybe some css
>> configuration affects the div or the calendar, so maybe you need to
>> create a custom theme for the calendar so you can override the default
>> values where the popup appear.
>>
>> The properties to do that are styleLocation, javascriptLocation and
>> imageLocation (in tomahawk for jsf 2.0 there is also styleLibrary,
>> javascriptLibrary and imageLibrary).
>>
>> regards,
>>
>> Leonardo
>>
>> 2011/3/17 emerson <ec...@gmail.com>:
>>> We changed the template of the page, and afterwards the calendar popup
>>> started to appear away from the button.
>>>
>>> The component configuration is:
>>>
>>> <t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
>>> renderPopupButtonAsImage="true" renderAsPopup="true"
>>> popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
>>> id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
>>> inicial para pesquisar" title="Digite a data inicial para pesquisar">
>>> </t:inputCalendar>
>>>
>>> The imagens of the before/After
>>>
>>> Before:
>>> https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink
>>>
>>> After:
>>> https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink
>>>
>>> I would like to highlight that when using firebug, it shows in the div
>>> tag that wraps the calendar a fixed posiition by top and left style
>>> attributes. We dont know however where this is set.
>>>
>>> Any ideas?
>>>
>>
>

Re: Tomahawk Input Calendar is showing in the wrong position

Posted by emerson <ec...@gmail.com>.
What would be the original CSS on regards to location?
Would it possible to just override that positioning without loosing
the rest of the CSS?

thanks
emerson

On 17 March 2011 15:40, Leonardo Uribe <lu...@gmail.com> wrote:
> Hi
>
> That is something new. I have never seen that before. Maybe some css
> configuration affects the div or the calendar, so maybe you need to
> create a custom theme for the calendar so you can override the default
> values where the popup appear.
>
> The properties to do that are styleLocation, javascriptLocation and
> imageLocation (in tomahawk for jsf 2.0 there is also styleLibrary,
> javascriptLibrary and imageLibrary).
>
> regards,
>
> Leonardo
>
> 2011/3/17 emerson <ec...@gmail.com>:
>> We changed the template of the page, and afterwards the calendar popup
>> started to appear away from the button.
>>
>> The component configuration is:
>>
>> <t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
>> renderPopupButtonAsImage="true" renderAsPopup="true"
>> popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
>> id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
>> inicial para pesquisar" title="Digite a data inicial para pesquisar">
>> </t:inputCalendar>
>>
>> The imagens of the before/After
>>
>> Before:
>> https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink
>>
>> After:
>> https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink
>>
>> I would like to highlight that when using firebug, it shows in the div
>> tag that wraps the calendar a fixed posiition by top and left style
>> attributes. We dont know however where this is set.
>>
>> Any ideas?
>>
>

Re: Tomahawk Input Calendar is showing in the wrong position

Posted by Werner Punz <we...@gmail.com>.
Hi Leo I am not entirely sure but as far as I can remember the input 
calendar basically does some offset calculation to determine the 
position, as far as I recall this is due to the fact that it needs an 
outer form to submit its values.
Now given all the browser quirks in the past this offset calculation 
might fail in complex css scenarios on some browsers.

Unless things have changed this might be the issue here.

Werner



Am 17.03.11 19:40, schrieb Leonardo Uribe:
> Hi
>
> That is something new. I have never seen that before. Maybe some css
> configuration affects the div or the calendar, so maybe you need to
> create a custom theme for the calendar so you can override the default
> values where the popup appear.
>
> The properties to do that are styleLocation, javascriptLocation and
> imageLocation (in tomahawk for jsf 2.0 there is also styleLibrary,
> javascriptLibrary and imageLibrary).
>
> regards,
>
> Leonardo
>
> 2011/3/17 emerson<ec...@gmail.com>:
>> We changed the template of the page, and afterwards the calendar popup
>> started to appear away from the button.
>>
>> The component configuration is:
>>
>> <t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
>> renderPopupButtonAsImage="true" renderAsPopup="true"
>> popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
>> id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
>> inicial para pesquisar" title="Digite a data inicial para pesquisar">
>> </t:inputCalendar>
>>
>> The imagens of the before/After
>>
>> Before:
>> https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink
>>
>> After:
>> https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink
>>
>> I would like to highlight that when using firebug, it shows in the div
>> tag that wraps the calendar a fixed posiition by top and left style
>> attributes. We dont know however where this is set.
>>
>> Any ideas?
>>
>



Re: Tomahawk Input Calendar is showing in the wrong position

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

That is something new. I have never seen that before. Maybe some css
configuration affects the div or the calendar, so maybe you need to
create a custom theme for the calendar so you can override the default
values where the popup appear.

The properties to do that are styleLocation, javascriptLocation and
imageLocation (in tomahawk for jsf 2.0 there is also styleLibrary,
javascriptLibrary and imageLibrary).

regards,

Leonardo

2011/3/17 emerson <ec...@gmail.com>:
> We changed the template of the page, and afterwards the calendar popup
> started to appear away from the button.
>
> The component configuration is:
>
> <t:inputCalendar value="#{ConsultaDiarioForm.dataInicio}"
> renderPopupButtonAsImage="true" renderAsPopup="true"
> popupWeekString="Semana" size="10"    popupTodayString="Hoje é"
> id="dataInicio" popupDateFormat="dd/MM/yyyy" alt="Digite a data
> inicial para pesquisar" title="Digite a data inicial para pesquisar">
> </t:inputCalendar>
>
> The imagens of the before/After
>
> Before:
> https://picasaweb.google.com/lh/photo/H9ML-JtAIzj-5mXeunEM7SyftixIMAaR_uGG46TnU-0?feat=directlink
>
> After:
> https://picasaweb.google.com/lh/photo/-S1izZxddwHVR0EVg362TiyftixIMAaR_uGG46TnU-0?feat=directlink
>
> I would like to highlight that when using firebug, it shows in the div
> tag that wraps the calendar a fixed posiition by top and left style
> attributes. We dont know however where this is set.
>
> Any ideas?
>