You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Wolfgang <wk...@ebi.ac.uk> on 2008/01/22 13:05:34 UTC

Get pixel size from left: attribute via getter

Hi,

I have a  h:panelGroup with style attributes and I want
to get the pixel size for the left: attribute via getter from the
Bean. But since the left: attribute uses a colon instead of a ="..." like a
simple value attrbiute the ="#{bean.getter} does not work. I tried
various combinations  but no success..

<h:panelGroup style="float:right; position:relative; top:2px; left:5px";>


Anny suggestions?
Cheers,
Wolfgang

Re: Get pixel size from left: attribute via getter

Posted by Martin Marinschek <ma...@gmail.com>.
IntelliJ doesn't realize this is allowed syntax - just ignore the error
message of IntelliJ in this case!

It should work anyways.

regards,

Martin

On Jan 23, 2008 9:19 AM, Wolfgang <wk...@ebi.ac.uk> wrote:

> Hi Andrew,
>
> if I try to access my int variable from the backing bean, which has
> getter/setter,  in the way
> as youe have described but then my editor (IntelliJ) says: invalid css
> property style; a term excepted;
>
> Cheers
>
> Andrew Robinson schrieb:
> > Why not? It should. Have you set a breakpoint in the backing bean
> > getter, or used a system.out to ensure that your value is correct?
> > What do you see in the generated HTML?
> >
> > -Andrew
> >
> > On Jan 22, 2008 9:15 AM, Wolfgang < wkluge@ebi.ac.uk
> > <ma...@ebi.ac.uk>> wrote:
> >
> >     Hi,
> >
> >     yes this is exactly what I want to achieve...but it is not working..
> >
> >
> >     Andrew Robinson schrieb:
> >     > Is this what you want to do?
> >     >
> >     > <h:panelGroup style="float:right; position:relative; top:2px;
> >     > left:#{bean.left}px";>
> >     >
> >     >
> >     >
> >     > On Jan 22, 2008 5:05 AM, Wolfgang < wkluge@ebi.ac.uk
> >     <ma...@ebi.ac.uk>
> >     > <mailto:wkluge@ebi.ac.uk <ma...@ebi.ac.uk>>> wrote:
> >     >
> >     >     Hi,
> >     >
> >     >     I have a  h:panelGroup with style attributes and I want
> >     >     to get the pixel size for the left: attribute via getter
> >     from the
> >     >     Bean. But since the left: attribute uses a colon instead of a
> >     >     ="..." like a
> >     >     simple value attrbiute the ="#{bean.getter} does not work. I
> >     tried
> >     >     various combinations  but no success..
> >     >
> >     >     <h:panelGroup style="float:right; position:relative; top:2px;
> >     >     left:5px";>
> >     >
> >     >
> >     >     Anny suggestions?
> >     >     Cheers,
> >     >     Wolfgang
> >     >
> >     >
> >
> >
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Get pixel size from left: attribute via getter

Posted by Wolfgang <wk...@ebi.ac.uk>.
Hi Andrew,

if I try to access my int variable from the backing bean, which has 
getter/setter,  in the way
as youe have described but then my editor (IntelliJ) says: invalid css 
property style; a term excepted;

Cheers

Andrew Robinson schrieb:
> Why not? It should. Have you set a breakpoint in the backing bean 
> getter, or used a system.out to ensure that your value is correct? 
> What do you see in the generated HTML?
>
> -Andrew
>
> On Jan 22, 2008 9:15 AM, Wolfgang < wkluge@ebi.ac.uk 
> <ma...@ebi.ac.uk>> wrote:
>
>     Hi,
>
>     yes this is exactly what I want to achieve...but it is not working..
>
>
>     Andrew Robinson schrieb:
>     > Is this what you want to do?
>     >
>     > <h:panelGroup style="float:right; position:relative; top:2px;
>     > left:#{bean.left}px";>
>     >
>     >
>     >
>     > On Jan 22, 2008 5:05 AM, Wolfgang < wkluge@ebi.ac.uk
>     <ma...@ebi.ac.uk>
>     > <mailto:wkluge@ebi.ac.uk <ma...@ebi.ac.uk>>> wrote:
>     >
>     >     Hi,
>     >
>     >     I have a  h:panelGroup with style attributes and I want
>     >     to get the pixel size for the left: attribute via getter
>     from the
>     >     Bean. But since the left: attribute uses a colon instead of a
>     >     ="..." like a
>     >     simple value attrbiute the ="#{bean.getter} does not work. I
>     tried
>     >     various combinations  but no success..
>     >
>     >     <h:panelGroup style="float:right; position:relative; top:2px;
>     >     left:5px";>
>     >
>     >
>     >     Anny suggestions?
>     >     Cheers,
>     >     Wolfgang
>     >
>     >
>
>


Re: Get pixel size from left: attribute via getter

Posted by Andrew Robinson <an...@gmail.com>.
Why not? It should. Have you set a breakpoint in the backing bean getter, or
used a system.out to ensure that your value is correct? What do you see in
the generated HTML?

-Andrew

On Jan 22, 2008 9:15 AM, Wolfgang <wk...@ebi.ac.uk> wrote:

> Hi,
>
> yes this is exactly what I want to achieve...but it is not working..
>
>
> Andrew Robinson schrieb:
> > Is this what you want to do?
> >
> > <h:panelGroup style="float:right; position:relative; top:2px;
> > left:#{bean.left}px";>
> >
> >
> >
> > On Jan 22, 2008 5:05 AM, Wolfgang < wkluge@ebi.ac.uk
> > <ma...@ebi.ac.uk>> wrote:
> >
> >     Hi,
> >
> >     I have a  h:panelGroup with style attributes and I want
> >     to get the pixel size for the left: attribute via getter from the
> >     Bean. But since the left: attribute uses a colon instead of a
> >     ="..." like a
> >     simple value attrbiute the ="#{bean.getter} does not work. I tried
> >     various combinations  but no success..
> >
> >     <h:panelGroup style="float:right; position:relative; top:2px;
> >     left:5px";>
> >
> >
> >     Anny suggestions?
> >     Cheers,
> >     Wolfgang
> >
> >
>
>

Re: Get pixel size from left: attribute via getter

Posted by Wolfgang <wk...@ebi.ac.uk>.
Hi,

yes this is exactly what I want to achieve...but it is not working..


Andrew Robinson schrieb:
> Is this what you want to do?
>
> <h:panelGroup style="float:right; position:relative; top:2px; 
> left:#{bean.left}px";>
>
>
>
> On Jan 22, 2008 5:05 AM, Wolfgang < wkluge@ebi.ac.uk 
> <ma...@ebi.ac.uk>> wrote:
>
>     Hi,
>
>     I have a  h:panelGroup with style attributes and I want
>     to get the pixel size for the left: attribute via getter from the
>     Bean. But since the left: attribute uses a colon instead of a
>     ="..." like a
>     simple value attrbiute the ="#{bean.getter} does not work. I tried
>     various combinations  but no success..
>
>     <h:panelGroup style="float:right; position:relative; top:2px;
>     left:5px";>
>
>
>     Anny suggestions?
>     Cheers,
>     Wolfgang
>
>


Re: Get pixel size from left: attribute via getter

Posted by Andrew Robinson <an...@gmail.com>.
Is this what you want to do?

<h:panelGroup style="float:right; position:relative; top:2px; left:#{
bean.left}px";>



On Jan 22, 2008 5:05 AM, Wolfgang <wk...@ebi.ac.uk> wrote:

> Hi,
>
> I have a  h:panelGroup with style attributes and I want
> to get the pixel size for the left: attribute via getter from the
> Bean. But since the left: attribute uses a colon instead of a ="..." like
> a
> simple value attrbiute the ="#{bean.getter} does not work. I tried
> various combinations  but no success..
>
> <h:panelGroup style="float:right; position:relative; top:2px; left:5px";>
>
>
> Anny suggestions?
> Cheers,
> Wolfgang
>