[JBoss Seam] - 12.3.6 Login Redirection
by tony.herstell@gmail.com
| <event type="org.jboss.seam.postAuthenticate">
| <action expression="#{redirect.returnToCapturedView}"/>
| </event>
|
After a successful login I want to send my user to a specific page (not only the page they came from!).
Basically I have a login page supported by a controller
| /* (non-Javadoc)
| * @see de.co.clickstream.actions.user.LoginController#startLogin()
| */
| @Begin
| public String startLogin() {
| log.info(">startLogin");
| log.info("Starting Login conversation.");
| if (conversation != null) {
| log.info("Conversation. (" + conversation.getId() + ")");
| }
| log.info("<startLogin");
| return "login";
| }
|
| public String switchToRegistration() {
| log.info(">switchToRegistration");
| log.info("<switchToRegistration");
| return "registration";
| }
|
| /* (non-Javadoc)
| * @see de.co.clickstream.actions.user.LoginController#cancel()
| */
| @End
| public String cancel() {
| log.info(">cancel");
| log.info("<cancel");
| return "mainPage";
| }
|
| /* (non-Javadoc)
| * @see de.co.clickstream.actions.user.LoginController#destroy()
| */
| @Remove @Destroy
| public void destroy() {
| log.info(">destroy");
| log.info("<destroy");
| }
|
I want to send them to a "members" page after login.
Is it possible to do something like:
| <event type="org.jboss.seam.postAuthenticate">
| <action expression="#{membresPageController.startXXX}"/>
| </event>
|
or just for a "menu page":
| <event type="org.jboss.seam.postAuthenticate">
| <action page="membersPage" activeConversation="die"/>
| </event>
|
where membersPage is a navigation rule:
[page]
<navigation-rule>
<navigation-case>
<from-outcome>membersPage</from-outcome>
<to-view-id>/pages/membersPage.xhtml</to-view-id>
</navigation-case>
[/page]
Of course I would want to complete the authentication conversation if there was one so I may actually want to go to my loginController and call a routine to go somewhere (this seems nicer):
| /* (non-Javadoc)
| * @see xxx.user.LoginController#handleSuccessfulLogin()
| */
| @End
| public String handleSuccessfulLogin() {
| log.info(">handleSuccessfulLogin");
| log.info("<handleSuccessfulLogin");
| return "membersPage";
| }
|
Please advise...
Very tired so make be %(*&(*&^ obvious by the morning!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034551#4034551
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034551
19 years
[JBoss Seam] - Load Resource Bundle
by jbossja
Hi,
I'm trying to load a Resource Bundle for a particular Locale.
In faces-config.xml I have:
| <message-bundle>messages</message-bundle>
| <locale-config>
| <default-locale>fr</default-locale>
| <supported-locale>fr</supported-locale>
| </locale-config>
|
And in my Bean I load the current Locale in this way:
| LocaleSelector localeSelector = LocaleSelector.instance();
| Locale locale = localeSelector.getLocale();
| ResourceBundle bundle = ResourceBundle.getBundle("messages", locale);
|
|
I have been able to get the Locale to "fr", but I can't load the Resource Bundle. I get a java.util.MissingResourceException: Can't find bundle for base name messages, locale fr.
Are there any other configurations that need to be set?
I have also tried to inject the Resource Bundle using
| @In java.util.ResourceBundle resourceBundle;
| resourceBundle.getBundle("messages").getString(key);
|
but to no avail
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034543#4034543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034543
19 years
[JBoss Seam] - Re: Possible bug - POJO doesn't automatically join transacti
by ASavitsky
Ok, thanks for the clarification. So, as I understand it, managed transactions give me a transaction around the method, and managed PCs give me an injected EM - but this doesn't mean that the EM automatically joins the transaction? Searched the reference docs, but haven't found any mention on whether it works one way or the other...
Still, the fact that it only breaks for transient entities and not for managed ones, is hard to explain (for me, anyway). Also, it only breaks when the @Out annotation is present, which makes it even more strange.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034540#4034540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034540
19 years