[JBoss Seam] - Re: IllegalArgumentException when pre-loading SFSB instance
by asookazian
when I click the Run button on the JSF:
<h:commandButton id="searchButton" value="Run" action="#{columnsBean.viewRoles}">
the wrong method is being exec'd on the SFSB based on the output in the server.log. It's calling the getChoices() method in the SFSB when I click Run button.
Why does this happen? seems like a bug. I will try with a fresh JBoss extraction...
2007-09-11 10:42:14,796 INFO [org.jboss.seam.example.booking.ColumnsBean] Retrieving all possible selections
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] after phase: PROCESS_VALIDATIONS(3)
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.afterPhase
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.validation
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-09-11 10:42:14,796 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.validationFailed
| 2007-09-11 10:42:14,796 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-icefaces].[Blocking Servlet]] Servlet.service() for servlet Blocking Servlet threw exception
| java.lang.IllegalArgumentException: Value binding '#{columnsBean.choices}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /testDatatable.xhtml][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: _id1][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: _id7][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: document][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: container][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: content][Class: com.icesoft.faces.component.UIXhtmlComponent,Id: _id15][Class: javax.faces.component.html.HtmlForm,Id: _id16][Class: javax.faces.component.html.HtmlPanelGrid,Id: roles_grid][Class: javax.faces.component.html.HtmlPanelGrid,Id: select_grid][Class: javax.faces.component.html.HtmlSelectManyCheckbox,Id: allRoles][Class: javax.faces.component.UISelectItems,Id: _id23]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of typ!
e : null
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083135#4083135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083135
18 years, 7 months
[JBoss Seam] - selectItems and noSelectionLabel
by hager
hello,
I have some problems with the noSelectionLabel attribute,
I want to make a research by collaborator's type.
collaborateur's type is a String
for example : when i choose the type "interne" from the selectOneMenu, i obtain all collaborators which have intern type.
my problem is, when i put the noSelectionLabel attribute, the research is wrong, but when i remove it, i have the appropriate collaborators.
but i have to use the noSelectionLabel attribute.
in page.xhtml
<ui:define name="label">#{msgCollaborateur.type}</ui:define>
| <h:selectOneMenu id="selectOneType" value="#{collaborateurList.collaborateur.type}">
| <s:selectItems value="#{collaborateurHome.typeCollaborateurKeys}" var="typeCollaborateurIterator" label="#{collaborateurHome.typeCollaborateurMap[typeCollaborateurIterator]}"
| id="selectType"
| noSelectionLabel="all Types"/>
| </h:selectOneMenu>
in collaborateurHome.java:
| package com.fitnetapplication.resources.model;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
| import java.util.List;
| import java.util.Arrays;
|
| @Name("collaborateurList")
| public class CollaborateurList extends EntityQuery {
|
| @In(required=false)
| Societe currentSociete;
|
|
|
| private static final String[] RESTRICTIONS = {
| "lower(collaborateur.type) like concat(lower(#{collaborateurList.collaborateur.type}),'%')",
| "lower(collaborateur.nom) like concat(lower(#{collaborateurList.collaborateur.nom}),'%')",
| "lower(collaborateur.prenom1) like concat(lower(#{collaborateurList.collaborateur.prenom1}),'%')",
| };
|
| private Collaborateur collaborateur = new Collaborateur();
|
| @Override
| public String getEjbql() {
|
| if(currentSociete != null){
| return "select collaborateur from Collaborateur collaborateur where collaborateur.societe = #{currentSociete}";
| }
| return "select collaborateur from Collaborateur collaborateur";
|
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public Collaborateur getCollaborateur() {
| return collaborateur;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
|
| }
|
|
| @Override public List<Collaborateur> getResultList()
| {
| List<Collaborateur> a=super.getResultList();
| System.out.println("EJBQL = " + super.getRenderedEjbql());
| return a;
| }
|
|
| }
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083131#4083131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083131
18 years, 7 months
[JBoss Seam] - <s:selectItems and noSelectionLabel
by hager
hello,
I have some problems with the noSelectionLabel attribute,
I want to make a research by collaborator's type.
collaborateur's type is a String
for example : when i choose the type "interne" from the selectOneMenu, i obtain all collaborators which have intern type.
my problem is, when i put the noSelectionLabel attribute, the research is wrong, but when i remove it, i have the appropriate collaborators.
but i have to use the noSelectionLabel attribute.
in page.xhtml
<ui:define name="label">#{msgCollaborateur.type}</ui:define>
| <h:selectOneMenu id="selectOneType" value="#{collaborateurList.collaborateur.type}">
| <s:selectItems value="#{collaborateurHome.typeCollaborateurKeys}" var="typeCollaborateurIterator" label="#{collaborateurHome.typeCollaborateurMap[typeCollaborateurIterator]}"
| id="selectType"
| noSelectionLabel="all Types"/>
| </h:selectOneMenu>
in collaborateurHome.java:
| package com.fitnetapplication.resources.model;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
| import java.util.List;
| import java.util.Arrays;
|
| @Name("collaborateurList")
| public class CollaborateurList extends EntityQuery {
|
| @In(required=false)
| Societe currentSociete;
|
|
|
| private static final String[] RESTRICTIONS = {
| "lower(collaborateur.type) like concat(lower(#{collaborateurList.collaborateur.type}),'%')",
| "lower(collaborateur.nom) like concat(lower(#{collaborateurList.collaborateur.nom}),'%')",
| "lower(collaborateur.prenom1) like concat(lower(#{collaborateurList.collaborateur.prenom1}),'%')",
| };
|
| private Collaborateur collaborateur = new Collaborateur();
|
| @Override
| public String getEjbql() {
|
| if(currentSociete != null){
| return "select collaborateur from Collaborateur collaborateur where collaborateur.societe = #{currentSociete}";
| }
| return "select collaborateur from Collaborateur collaborateur";
|
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public Collaborateur getCollaborateur() {
| return collaborateur;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
|
| }
|
|
| @Override public List<Collaborateur> getResultList()
| {
| List<Collaborateur> a=super.getResultList();
| System.out.println("EJBQL = " + super.getRenderedEjbql());
| return a;
| }
|
|
| }
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083129#4083129
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083129
18 years, 7 months
[JBoss Seam] - <s:selectItems and noSelectionLabel
by hager
hello,
I have some problems with the noSelectionLabel attribute,
I want to make a research by collaborator's type.
collaborateur's type is a String
for example : when i choose the type "interne" from the selectOneMenu, i obtain all collaborators which have intern type.
my problem is, when i put the noSelectionLabel attribute, the research is wrong, but when i remove it, i have the appropriate collaborators.
but i have to use the noSelectionLabel attribute.
in page.xhtml
<ui:define name="label">#{msgCollaborateur.type}</ui:define>
| <h:selectOneMenu id="selectOneType" value="#{collaborateurList.collaborateur.type}">
| <s:selectItems value="#{collaborateurHome.typeCollaborateurKeys}" var="typeCollaborateurIterator" label="#{collaborateurHome.typeCollaborateurMap[typeCollaborateurIterator]}"
| id="selectType"
| noSelectionLabel="all Types"/>
| </h:selectOneMenu>
in collaborateurHome.java:
| package com.fitnetapplication.resources.model;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
| import java.util.List;
| import java.util.Arrays;
|
| @Name("collaborateurList")
| public class CollaborateurList extends EntityQuery {
|
| @In(required=false)
| Societe currentSociete;
|
|
|
| private static final String[] RESTRICTIONS = {
| "lower(collaborateur.type) like concat(lower(#{collaborateurList.collaborateur.type}),'%')",
| "lower(collaborateur.nom) like concat(lower(#{collaborateurList.collaborateur.nom}),'%')",
| "lower(collaborateur.prenom1) like concat(lower(#{collaborateurList.collaborateur.prenom1}),'%')",
| };
|
| private Collaborateur collaborateur = new Collaborateur();
|
| @Override
| public String getEjbql() {
|
| if(currentSociete != null){
| return "select collaborateur from Collaborateur collaborateur where collaborateur.societe = #{currentSociete}";
| }
| return "select collaborateur from Collaborateur collaborateur";
|
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public Collaborateur getCollaborateur() {
| return collaborateur;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
|
| }
|
|
| @Override public List<Collaborateur> getResultList()
| {
| List<Collaborateur> a=super.getResultList();
| System.out.println("EJBQL = " + super.getRenderedEjbql());
| return a;
| }
|
|
| }
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083128#4083128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083128
18 years, 7 months