36.11. Seam 2 UI controls migration to JSF

Seam 2 provided many useful JSF UI controls and tags beyond the standard set. The table here presents details for migrating to standard JSF 2.x controls or tags.

Table 36.5. 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"

Achieve a similar effect by using the standard f:convertDateTime tag and setting the locale, or setting the context-param javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE to true.

s:convertEntity

No direct mapping

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

Use of a custom converter is recommended.

s:convertAtomicInteger

No direct mapping

Use of a custom converter is recommended.

s:convertAtomicLong

No direct mapping

Use of a custom converter is recommended.

s:validateEquality

No direct mapping

Use respective f:validate*: f:validateDoubleRange, f:validateLength, f:validateLongRange, and f:validateRequired.

s:validate

f:validateBean

s:validateAll

No direct mapping

Achieve a similar effect by using f:validateBean or Richfaces rich:validator.

s:decorate

No direct mapping

Achieve the same functionality by using the UIInputContainer and a composite container, both of which are demonstrated in the Open18 migration example input.xhtml file.

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

Achieve a similar effect by using 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

Use h:message for="name" errorClass="invalid" or 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

Achieve similar functionality by using Richfaces rich:fileUpload.

s:cache

No direct mapping

s:resource

No direct mapping

s:download

No direct mapping

s:graphicImage

No direct mapping

Continue to use h:graphicImage as Seam extends JSF control.

s:remote

No direct mapping