Grundsätzlich versuche ich auf einer Anmeldeseite für meine App zu arbeiten. Ich bin fast fertig, aber das Fenster ist scrollbar und die panelBox
(siehe Login-Quellcode unten) befindet sich ganz links im Fenster. Ich dachte, es in die Mitte zu setzen würde das Problem lösen, aber es tat es nicht. Wie ein aus dem Fenster von Scrollen und Zentrieren der panelBox
wie zentrieren und verhindern Login von scrollen
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="LoginPage.jsf" id="d1">
<af:form id="f1" inlineStyle="background-color:#c3de2f;" defaultCommand="b1">
<af:panelStretchLayout id="psl1" dimensionsFrom="children" startWidth="100" endWidth="100" topHeight="200"
bottomHeight="500">
<f:facet name="bottom">
<af:spacer width="10" height="100" id="s1"/>
</f:facet>
<f:facet name="center">
<af:panelBox text="Hi!" id="pb1" showDisclosure="false" background="light"
type="stretch"
immediate="true" inlineStyle="background-color:#c3de2f;">
<af:outputText value="Testing" id="ot1"
inlineStyle="font-size:x-large; font-weight:bolder;"/>
<af:panelFormLayout id="pfl1"
inlineStyle="background-image:none; ">
<f:facet name="footer">
<af:button id="b1" action="#{loginBean.Login.doLogin}"
icon="resources/images/button.png"/>
<af:message id="m1"
message="see admin for assistance"/>
</f:facet>
<af:outputText value="enter username and password" id="ot2"
inlineStyle="font-style:italic; font-weight:bold; font-size:small;"/>
<af:inputText label="Username:" id="it1"
value="#{loginBean.Login.username}"/>
<af:inputText label="Password:" id="it2"
value="#{loginBean.Login.password}"
secret="true" showRequired="true"/>
</af:panelFormLayout>
</af:panelBox>
</f:facet>
<f:facet name="start"/>
<f:facet name="end"/>
<f:facet name="top">
<af:panelGridLayout id="pgl2">
<af:gridRow height="auto" id="gr1">
<af:gridCell width="100%" id="gc1">
<af:image source="/resources/images/logo.png" id="i1"/>
</af:gridCell>
</af:gridRow>
</af:panelGridLayout>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>