Seam UI jsf - mareknovotny/seam-migration GitHub Wiki

Seam 2 UI controls migration to JSF

Seam 2 provided many useful JSF UI controls and tags beyond the standard set.

The following table tries to solve migration to standard JSF 2.x controls or tags.

Table 1. Seam 2 UI controls alternatives in JSF 2
Seam 2 tag JSF 2 equivalent Note

s:button

h:button

action attribute maps to outcome, and there is no propagation attribute.

s:link

h:link

action attribute maps to outcome, and there is no propagation attribute.

s:conversationId

No direct mapping

s:conversationPropagation

No direct mapping

s:taskId

No direct mapping

s:defaultAction

No direct mapping

s:convertDateTime

f:convertDateTime type="time" pattern="kk:mm:ss"

A similar effect can be achieved by using the standard f:convertDateTime and setting the locale, or setting the context-param javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE to true

s:convertEntity

No direct mapping

you can use f:converter converterId="<yourConverterClass>"

s:convertEnum

No direct mapping

JSF has a built-in EnumConverter which can be extended if necessary

s:convertAtomicBoolean

No direct mapping

A custom converter is recommended

s:convertAtomicInteger

No direct mapping

A custom converter is recommended

s:convertAtomicLong

No direct mapping

A custom converter is recommended

s:validateEquality

No direct mapping

Use respective f:validate*
  • f:validateDoubleRange

  • f:validateLength

  • f:validateLongRange

  • f:validateRequired

s:validate

f:validateBean

s:validateAll

No direct mapping

f:validateBean or if used Richfaces rich:validator can achieve similar affects.

s:decorate

No direct mapping

There is no direct mapping for this, however the same functionality can be achieved with the UIInputContainer and a composite container, both of which are in the Open18 migration as example (input.xhtml).

s:div

No direct mapping

Could be done with an h:panelGroup layout="block" or a ui:fragment containing a div.

s:span

No direct mapping

similar output can be achieved by h:panelGroup or a ui:fragment with a span element

s:fragment

ui:fragment

s:label

No direct mapping

h:outputLabel is similar

s:message

No direct mapping

you can achieve the same with h:message for="name" errorClass="invalid" or better with RichFaces rich:message

s:formattedText

No direct mapping

s:token

No direct mapping

s:enumItem

No direct mapping

s:selectItems

h:selectItems

s:fileUpload

No direct mapping

If you use RichFaces you can have similar functionality with rich:fileUpload

s:cache

No direct mapping

s:resource

No direct mapping

s:download

No direct mapping

s:graphicImage

No direct mapping

still you can use h:graphicImage as Seam extends JSF control

s:remote

No direct mapping

⚠️ **GitHub.com Fallback** ⚠️