Hey ayouB,

as I understand you this is a matter of HTML/CSS/Javascript. Each HTML
element has several attributes which you can also specify on a JSF
component. Using CSS is always the best way: Set the styleClass attribute
of your JSF component and modify its positions with CSS. If your component
does not have a styleClass attribute (like a ui:repeat) you can simply wrap
it into a HTML-DIV element and declare the used style class there.
E.g.:
<h:inputText styleClass="mystyle" .../>

Results in HTML;
<input class="mystyle" .../>

Which could be styled within a CSS file included in that HTML/JSF page like
this:
.mystyle {
    position: absolute; /* makes left,top usable; depends on parent
absolute element; also see position: relative */
    left: 0px; /* x */
    top: 0px; /* y */
}

Of course, you can also modify your HTML elements with JavaScript at
browser runtime:
<input id="myinput" .../>
JavaScript to set style class:
document.getElementById("myinput").class = "mystyle";

If your x,y position is varying and dependent of some server-side
calculation you could also define it directly in the style attribute of the
HTML element but in general this is bad style:
<input style="position:absolute;left:0px;top:0px" .../>

Hope this helps.

regards,
Max

2012/5/3 ayouB __ <[email protected]>

>
> hi every body,
>
> I want to know please if there's a possibility to modify the (x,y)
> position of a JavaServer Faces graphical component (e.g : Button,
> inputText, Calendar ...) during the execution of the web application.
>
> PS : I'm using JSF 2.0 (Apache MyFaces) and JBoss Richfaces 4.
>
> Thanks in advance :)

Reply via email to