[JBoss Seam] - SelectOneRadio
by yohann49
hello !
I have a page with radio buttons. But when I click on the submit button, I don't know what button has been selected.
My bean :
| @Stateful
| @Scope(SESSION)
| @Name("PackageManager")
| public class PackageManager implements com.pingwy.web.front.PackageManagerLocal, Serializable {
|
| /**
| * Creates a new instance of PackageManager
| */
|
| @In
| private EntityManager em;
|
| @In(required = false) @Out(required = false) private List<Package> packages = new ArrayList<Package>();
|
| //@In(required = false) @Out(required = false) private List<Package> packageLine = new ArrayList<Package>();
|
| @In(required = false) @Out(required = false) private Package packageLine;
|
| @Factory(value ="packages")
| public void findPackage(){
|
| System.out.println("bonjour");
|
| Query query;
|
| query = em.createQuery("Select p From Package p");
| packages = (List<Package>) query.getResultList();
|
|
| }
|
| @Remove @Destroy
| public void destroy(){
| }
|
| public Package getPackageLine() {
| return packageLine;
| }
|
| public void setPackageLine(Package packageLine) {
| this.packageLine = packageLine;
| }
|
| public List<Package> getPackages() {
| return packages;
| }
|
| public void setPackages(List<Package> packages) {
| this.packages = packages;
| }
|
| }
|
My jsf page :
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich">
|
|
|
| <ui:composition template="templates/client.xhtml">
|
| <ui:define name="servicesclients">
|
| <h:form>
|
|
| <h:selectOneRadio value="#{PackageManager.packageLine}" layout="pageDirection" >
| <s:selectItems value="#{packages}" var="pack" label="#{pack.packName} : #{pack.descriptionPa.ck}"/>
| </h:selectOneRadio>
|
| <h:commandButton value="Next" type="submit"/>
|
| </h:form>
|
| </ui:define>
|
|
|
| </ui:composition>
|
|
thanks in advance.
Yohann
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078373#4078373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078373
18Â years, 8Â months
[JBoss Portal] - Dashboard 403 error
by lucboudreau
I was working on making the portal CAS compliant and when I finally suceeded, it turns out that I changed some config option and now the dashboard page keeps answering with a 403 unauthorized error. I verified every portlet-instance.xml file and portal-object file but I don't remember where I tweaked it.
Here's a server log excerpt.
anonymous wrote : 2007-08-27 10:21:27,505 DEBUG [org.apache.jk.server.JkCoyoteHandler] Invoke R( /portal/auth/dashboard) org.apache.coyote.Response@547c9a /portal/auth/dashboard
|
| 2007-08-27 10:21:27,505 DEBUG [org.apache.catalina.connector.CoyoteAdapter] Requested cookie session id is 3A0BF35C49C69D2B5A2ED7B741588E44
|
| 2007-08-27 10:21:27,505 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Security checking request GET /portal/auth/dashboard
|
| 2007-08-27 10:21:27,505 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] We have cached auth type FORM for principal GenericPrincipal[SIM\boudrel(Authenticated,User,(...))]
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Authenticated]' against GET /auth/dashboard --> true
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Secure]' against GET /auth/dashboard --> false
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Secure+Authenticated]' against GET /auth/dashboard --> false
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Authenticated]' against GET /auth/dashboard --> true
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Secure]' against GET /auth/dashboard --> false
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[Secure+Authenticated]' against GET /auth/dashboard --> false
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Calling hasUserDataPermission()
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] User dataconstraint has no restrictions
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Calling authenticate()
|
|
|
|
|
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] Already authenticated 'SIM\boudrel'
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Calling accessControl()
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.realm.RealmBase] Username SIM\boudrel has role Authenticated
|
| 2007-08-27 10:21:27,506 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Successfully passed all security constraints
|
| 2007-08-27 10:21:27,531 DEBUG [org.apache.jk.core.MsgContext] COMMIT
|
| 2007-08-27 10:21:27,531 DEBUG [org.apache.jk.common.JkInputStream] COMMIT sending headers org.apache.coyote.Response@547c9a === MimeHeaders ===Pragma = No-cacheCache-Control = no-cacheExpires = Wed, 31 Dec 1969 19:00:00 ESTX-Powered-By = Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
|
|
The response headers are these :
anonymous wrote : Date: Mon, 27 Aug 2007 14:34:44 GMT
| Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.8b DAV/2 mod_jk/1.2.23
| Pragma: No-cache
| Cache-Control: no-cache
| Expires: Wed, 31 Dec 1969 19:00:00 EST
| X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
| Content-Length: 964
| Keep-Alive: timeout=5, max=100
| Connection: Keep-Alive
| Content-Type: text/html;charset=utf-8
|
| 403 Forbidden
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078367#4078367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078367
18Â years, 8Â months
[JBoss Seam] - Re: login-required and no-conversation-view-id causing infin
by tynor
Jacob,
Thanks for diagnosing this. We've been running into a similar (the same?) issue with our Seam 1.2.1-GA based app. In our case, we get infinite exceptions after a POST after a session timeout due to a setting on the page pointed to by our no-converstation-id page. We have:
| <page no-conversation-view-id="/home/xhtml" login-required="true">
| ...
| <page view-id="/home.xhtml">
| <restrict>#{(not empty authenticator.currentClient)}</restrict>
| </page>
| ...
| <page view-id="/handleAuthorizationException.xhtml" conversation-required="false">
| <action if="#{empty authenticator.currentClient}" execute="/ChooseClient.xhtml"/>
| <action if="#{not empty authenticator.currentClient}" execute="/error.xhtml"/>
| </page>
| ...
| <exception class="org.jboss.seam.security.AuthorizationException">
| <redirect view-id="/handleAuthorizationException.xhtml">
| <message>#{(empty authenticator.currentClient) ? 'You must select a client before accessing any other page' : 'You do not have permission to do this'}</message>
| </redirect>
| </exception>
|
|
but after a session timeout, clicking a list or button gets us a looping:
| 10:25:05,062 ERROR [SeamPhaseListener] swallowing exception
| org.jboss.seam.RequiredException: In attribute requires non-null value: clientFu
| ndHome.currentClient
| at org.jboss.seam.Component.getValueToInject(Component.java:1919)
| at org.jboss.seam.Component.injectAttributes(Component.java:1368)
| ...
|
If I remove the no-converstation-view-id as Jacob did, I don't get the recursive/looping exceptions. Is there another way to fix?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078365#4078365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078365
18Â years, 8Â months