OpenTranqueraFramework SourceForge.net Logo
Home
Features
Skin definition
Examples
Processor
Xkins Forms
Velocity
Struts
JSF
Downloads

Jave Server Faces

Xkins can be used to implement a RenderKit in JavaServerFaces. An implementation exists and is called XkinsFaces.

XkinsFaces is set of renderers that acts as decorators of existing renderers and implements Renderers. XkinsFaces works on top of Xkins and has a basic Skin that contains all Xkins Templates needed by the renderers.

A valid xkinsFaces Skin must extend this basic Skin in order to work. So, basic skin defines a "well known" set of templates to implement and use with XkinsFaces. Anyone can create his or her own Skin extending basic, deploy this new skin in a XkinsFaces application and the webapp will look like this skin commands. In a future, there could be lots of skins you could download and deploy in your webapp to look diferent without changing anything of your JSPs, classes or HTML.

Decorators configurtation

Xkins works like a decorator for existing renderers. Decorated renderers are defined as constants in definition.xml of faces-basic skin:
	<constant name="FormDecorated" value="org.apache.struts.faces.renderer.FormRenderer"/>

In this cases, Decorated Renderer is Strut's Faces FormRenderer. If you have other JSF implementation, you should change this value.

    <component>
        <type>javax.faces.component.UICommand</type>
        <renderer>
            <type>ButtonRenderer</type>
            <class>net.sf.opentranquera.faces.renderkit.XkinsCommandRenderer</class>
        </renderer>
    </component>

Renderers are declared in xkins-faces-config.xml

<faces-config>
  <!-- Xkins renderkit -->
  <render-kit>
    <renderer>
      <renderer-type>Button</renderer-type>
      <renderer-class>net.sf.opentranquera.xkins.faces.renderkit.XkinsButtonRenderer</renderer-class>
    </renderer>
    <renderer>
      <renderer-type>StrutsForm</renderer-type>
      <renderer-class>net.sf.opentranquera.xkins.faces.renderkit.XkinsFormRenderer</renderer-class>
    </renderer>
    <renderer>
      <renderer-type>Grid</renderer-type>
      <renderer-class>net.sf.opentranquera.xkins.faces.renderkit.XkinsGridRenderer</renderer-class>
    </renderer>
    <renderer>
      <renderer-type>Group</renderer-type>
      <renderer-class>net.sf.opentranquera.xkins.faces.renderkit.XkinsGroupRenderer</renderer-class>
    </renderer>
  </render-kit>
</faces-config>


Print version | Download | Powered by SourceForge.net