[JBoss Seam] - Handling Expired Password Best Practice
by djeverson
Hi,
Our environment JBoss 4.0.5, Seam 1.2.1, Facelets
As part of our login use case, we have a requirement that the user's password must be changed within a defined period.
We attempted to implement this functionality by throwing an Exception in the Authenticator class:
| if (user.isPasswordChangeRequired()) {
| throw new ExpiredPasswordException("User must change password");
| }
|
In pages.xml, we added the following:
| <exception class="us.crimnet.exceptions.ExpiredPasswordException">
| <redirect view-id="/change_password.xhtml"/>
| </exception>
|
When we test this, the exception is thrown. However, the user is not redirected to the change_password.xhtml page. Rather, they just remain on the log page with a message saying that the log in failed.
How have others implemented similar use cases?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039440#4039440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039440
19 years
[JBoss Seam] - s:fragment in dataTable
by tony.herstell@gmail.com
given :
| <h:dataTable var="eachDisplayableCategory"
| value="#{displayableCategorySet}"
| rendered="#{displayableCategorySet.rowCount>0}">
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="#{messages.category_name}" />
| </f:facet>
| <h:outputText value="Head: #{eachDisplayableCategory.head} - " />
| <h:outputText value="Displayed: #{eachDisplayableCategory.displayed} - " />
| <h:outputText value="Selected: #{eachDisplayableCategory.selected} - " />
| <h:outputText value="Parenting: #{eachDisplayableCategory.parenting} - " />
| <h:outputText value="Refined: #{eachDisplayableCategory.refined} - "/>
| <h:outputText value="Name: #{eachDisplayableCategory.immutableCategory.nameKey}"/>
| </h:column>
|
| <s:fragment rendered="#{eachDisplayableCategory.displayed}">
|
| <h:column>
|
The last fragment, that comes before a <h:column> causes the <h:column> to not be rendered in a dataTable. IS THIS A BUG?
Also.. it appears that not providing a <h:column> at all; causes no text to be display (This one I can appreciate - even though it took hours to find it!).. a useful message from JSF saying NO Columns would have been nice!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039437#4039437
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039437
19 years