Wednesday 28 March 2012

JSF f:event

Must be a ComponentSystemEvent or:
  • postAddToView
  • preValidate/postValidate
  • preRenderView/preRenderComponent

Oracle DB Console and New Hostname

  • emca -deconfig dbcontrol db -repos drop
  • emca -config dbcontrol db -repos create

Friday 23 March 2012

IE8 Flashing CSS background-image

<meta http-equiv="Page-Enter" content="blendTrans(Duration=.01)" />

<meta http-equiv="Page-Exit" content="blendTrans(Duration=.01)" />

Thursday 15 March 2012

SelectManyCheckbox with POJOs

<h:selectManyCheckbox id="roles" layout="pageDirection" label="Roles"
value="#{userEdit.user.roles}" converter="#{roleConverter}" collectionType="java.util.ArrayList">
<f:selectItems value="#{userEdit.allRoles}" var="rol" itemLabel="#{rol.name}" itemValue="#{rol}" />
</h:selectManyCheckbox></h:selectManyCheckbox>

Monday 12 March 2012

Loading CSS with background image

  • in CSS: url(background.jpg)
  • in JBoss Tools HTML Editor: Page Design Options > Include css files
  • in JSP: ${pageContext.servletContext.contextPath}/resources/css/style.css
  • in JSF: #{request.contextPath}/resources/css/style.css (cannot use #{resource['css:style.css']})

Friday 9 March 2012

JSF 2.0 Notes

  • Tomcat 7.0 (unified EL)
  • myfaces archetype 2.0

Wednesday 7 March 2012

CSS Center with "auto"

  • margin-left: auto; margin-right:auto
  • margin: 10px auto (1)
  • margin: 10px auto 10px (2)
  • margin: 10px auto 10px auto (3)

(1) top/bottom + right/left
(2) top + right/left + bottom
(3) top + right + bottom + left

Friday 2 March 2012