Posted by Martin Marinschek <ma...@gmail.com>.
Hi Safu,
in most cases, the popup will be absolutely positioned, in these
cases, this will be ok. I'd add another attribute, with which you can
control if this appendix should be rendered or not.
something like: positionAbsolute="true|false" and then using this
while rendering.
regards,
Martin
On 7/3/07, Safurudin Mahic <sa...@stud.aitel.hist.no> wrote:
> I barely skimmed through the Renderer;
>
> writer.writeAttribute(HTML.STYLE_ATTR,(popup.getStyle()!=null?(popup.getStyle()+
> (popup.getStyle().trim().endsWith(";")?"":";")):"")+
> "position:absolute;display:none;",null);
>
> As mentioned, it is not possible to put a position: fixed on the
> <t:popup style for example,
> because the position: absolute always renders last, and is the one that
> the browser adheres to.
> I could always override this behaviour on my instance of tomahawk, but I
> think this issue doesn't
> necessarily affect only me.The position:absolute shouldn't be hardcoded.
> It will be much more flexible if it only defaults to that attribute, and
> if overriden, make it behave
> according to the overriden value, or don't default it at all, make the
> developer decide where it should
> be placed.
>
> Would the proposal to remove the hardcoded attribute be accepted by the
> devs?
>
> Regards,
> Safu
>
> Martin Marinschek skrev:
> > Probably, the wouldn't be too hard to implement, no.
> >
> > Have fun hacking!
> >
> > regards,
> >
> > Martin
> >
> > On 7/3/07, Safurudin Mahic <sa...@stud.aitel.hist.no> wrote:
> >> I'm currently using a <t:popup in a datatable to show details about a
> >> row.
> >> One of the issues I'm facing is that the renderer for the popup always
> >> renders
> >> position:absolute; display: none; at the end of the inline style. While
> >> this is practical
> >> as a default for showing the popup next to the event, in some cases
> >> where you want the popup
> >> to be displayed at the same spot every time, this is not possible to
> >> achive by setting
> >> something like;
> >>
> >> <t:popup title="Head" id="test"
> >> style="background-color:white;color:#111111;
> >> border: 3px solid #000; width: 300px;
> >> position: fixed; top: 20px; left: 20px"
> >> >
> >>
> >> because the renderer always overrides with position: absolute; display:
> >> none; at the end of the rendered style.
> >> It would be far more flexible to leave this to the developer himself to
> >> decide via the use of the style attribute.
> >> If someone like it to be next to the event, use position absolute, in
> >> other cases use some other positioning method.
> >> In that case, the attributes displayAtDistanceX and Y would become
> >> redundant.
> >>
> >> Also the attributes closePopupOnExitingElement and
> >> closePopupOnExitingPopup always render the element
> >> with onmouseout events, which in some cases never will invoke. On my
> >> Nokia N800 for example, the device doesn't
> >> have a mouse, and hence doesn't support the onmouseevents, which means I
> >> can never get the popup to hide.
> >> Perhaps a <facet with a close button?
> >>
> >> Would these suggestions be a hard thing to implement? If it isn't, I
> >> guess I could always do some code hacking myself
> >>
> >> Regards,
> >> Safurudin Mahic
> >>
> >>
> >>
> >>
> >
> >
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
Re:
Posted by Safurudin Mahic <sa...@stud.aitel.hist.no>.
I barely skimmed through the Renderer;
writer.writeAttribute(HTML.STYLE_ATTR,(popup.getStyle()!=null?(popup.getStyle()+
(popup.getStyle().trim().endsWith(";")?"":";")):"")+
"position:absolute;display:none;",null);
As mentioned, it is not possible to put a position: fixed on the
<t:popup style for example,
because the position: absolute always renders last, and is the one that
the browser adheres to.
I could always override this behaviour on my instance of tomahawk, but I
think this issue doesn't
necessarily affect only me.The position:absolute shouldn't be hardcoded.
It will be much more flexible if it only defaults to that attribute, and
if overriden, make it behave
according to the overriden value, or don't default it at all, make the
developer decide where it should
be placed.
Would the proposal to remove the hardcoded attribute be accepted by the
devs?
Regards,
Safu
Martin Marinschek skrev:
> Probably, the wouldn't be too hard to implement, no.
>
> Have fun hacking!
>
> regards,
>
> Martin
>
> On 7/3/07, Safurudin Mahic <sa...@stud.aitel.hist.no> wrote:
>> I'm currently using a <t:popup in a datatable to show details about a
>> row.
>> One of the issues I'm facing is that the renderer for the popup always
>> renders
>> position:absolute; display: none; at the end of the inline style. While
>> this is practical
>> as a default for showing the popup next to the event, in some cases
>> where you want the popup
>> to be displayed at the same spot every time, this is not possible to
>> achive by setting
>> something like;
>>
>> <t:popup title="Head" id="test"
>> style="background-color:white;color:#111111;
>> border: 3px solid #000; width: 300px;
>> position: fixed; top: 20px; left: 20px"
>> >
>>
>> because the renderer always overrides with position: absolute; display:
>> none; at the end of the rendered style.
>> It would be far more flexible to leave this to the developer himself to
>> decide via the use of the style attribute.
>> If someone like it to be next to the event, use position absolute, in
>> other cases use some other positioning method.
>> In that case, the attributes displayAtDistanceX and Y would become
>> redundant.
>>
>> Also the attributes closePopupOnExitingElement and
>> closePopupOnExitingPopup always render the element
>> with onmouseout events, which in some cases never will invoke. On my
>> Nokia N800 for example, the device doesn't
>> have a mouse, and hence doesn't support the onmouseevents, which means I
>> can never get the popup to hide.
>> Perhaps a <facet with a close button?
>>
>> Would these suggestions be a hard thing to implement? If it isn't, I
>> guess I could always do some code hacking myself
>>
>> Regards,
>> Safurudin Mahic
>>
>>
>>
>>
>
>
Re:
Posted by Martin Marinschek <ma...@gmail.com>.
Probably, the wouldn't be too hard to implement, no.
Have fun hacking!
regards,
Martin
On 7/3/07, Safurudin Mahic <sa...@stud.aitel.hist.no> wrote:
> I'm currently using a <t:popup in a datatable to show details about a row.
> One of the issues I'm facing is that the renderer for the popup always
> renders
> position:absolute; display: none; at the end of the inline style. While
> this is practical
> as a default for showing the popup next to the event, in some cases
> where you want the popup
> to be displayed at the same spot every time, this is not possible to
> achive by setting
> something like;
>
> <t:popup title="Head" id="test"
> style="background-color:white;color:#111111;
> border: 3px solid #000; width: 300px;
> position: fixed; top: 20px; left: 20px"
> >
>
> because the renderer always overrides with position: absolute; display:
> none; at the end of the rendered style.
> It would be far more flexible to leave this to the developer himself to
> decide via the use of the style attribute.
> If someone like it to be next to the event, use position absolute, in
> other cases use some other positioning method.
> In that case, the attributes displayAtDistanceX and Y would become
> redundant.
>
> Also the attributes closePopupOnExitingElement and
> closePopupOnExitingPopup always render the element
> with onmouseout events, which in some cases never will invoke. On my
> Nokia N800 for example, the device doesn't
> have a mouse, and hence doesn't support the onmouseevents, which means I
> can never get the popup to hide.
> Perhaps a <facet with a close button?
>
> Would these suggestions be a hard thing to implement? If it isn't, I
> guess I could always do some code hacking myself
>
> Regards,
> Safurudin Mahic
>
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces