You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ould sid'ahmed <no...@emn.fr> on 2006/08/04 09:36:29 UTC

to stop subscribing

Hello,
how I can stop my inscription with the myfaces user
think's

RE: SelectOneMenu

Posted by sj...@stradefi.com.
Yes you are right; I do not need to separate each String as I get the id directly.
Sorry,
Thanks for your help
Sophie

-----Message d'origine-----
De : Gerald Müllan [mailto:bierbrauen@gmail.com] 
Envoyé : lundi 11 septembre 2006 13:39
À : MyFaces Discussion; sjarlier@stradefi.com
Objet : Re: SelectOneMenu

relationFn will hold the value of the id. So if the entity has the id
23, relationFn results in 23.

Sorry, i have permuted the arguments; id comes first then the label
(description).

You can also concatenate the outputted String (string to display + " "
+ string to display), i don´t see a need for two arguments of display
strings here.

cheers,

Gerald

On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Thanks a lot. So that means that the returned selected item will be the id
> of entity in this case? In my example MyClass.relationFn will have the type
> of the id of entity?
>
> And if I want to display more than one string is it possible to do something
> like this:
>
> SelectItem item = new SelectItem (string to display, string to display, id
> of entity)
>
> ?
>
> Thanks again
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: lundi 11 septembre 2006 12:25
> Ŕ: MyFaces Discussion; sjarlier@stradefi.com
> Objet: Re: SelectOneMenu
>
> Sure; If i understand your problem the right way, you only need to
> create the List of SelectItems this way:
>
> selectItemList = new ArrayList<SelectItem>();
>
> for (iterate over list of entities you want to transform to selectItems)
> {
>       SelectItem item = new SelectItem(string to display, id of entity);
>
>       selectItemList .add(item);
> }
>
> The value of the selectOneMenu in the backend will then include the id
> of the entity.
>
> cheers,
>
> Gerald
>
> On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Hello everybody!
> >
> > I am programming some JSF JSP pages with Eclipse JBoss and I get into
> > troubles. Here is my problem:
> >
> > I need to display a list as follow:
> >
> > M. Smith - Professor
> > Mrs Smith - Student
> > M. Martin - Student
> >
> > For the moment, I am doing as follow:
> >
> > I have a table of relations statut-person.
> > For each existing relation I get the name and the statut label (in the
> > application language).
> > I concatenate both (statut and name) in a String and store it in a list.
> > I display this list with a SelectOneMenu:
> > <h:selectOneMenu id="stpers" style="width:200px"
> > value="#{MyClass.relationFn}">
> > <f:selectItems value="#{MyClass.functionsPersToDisplay}" />
> > </h:selectOneMenu>
> >
> > So when I get the selected item, I get again a String that I need to parse
> > to get back the function, the name and thus the relation.
> >
> > Is there another way, easier, where I could get the relation id directly?
> > The selected item would returns an id but these id will not be displayed
> > And I would display the corresponding values for this id (statut and name
> of
> > the person). Using a hashtable maybe? but then is it possible with a
> > selectOneMenu?
> >
> > Thanks for your help.
> > Best
> > Sophie
> >
> >
>
>
> --
> Gerald Müllan
> Schelleingasse 2/11
> 1040 Vienna, Austria
> 0043 699 11772506
> gerald.muellan@gmail.com
>
>


-- 
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
gerald.muellan@gmail.com


Re: SelectOneMenu

Posted by Gerald Müllan <bi...@gmail.com>.
relationFn will hold the value of the id. So if the entity has the id
23, relationFn results in 23.

Sorry, i have permuted the arguments; id comes first then the label
(description).

You can also concatenate the outputted String (string to display + " "
+ string to display), i don´t see a need for two arguments of display
strings here.

cheers,

Gerald

On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Thanks a lot. So that means that the returned selected item will be the id
> of entity in this case? In my example MyClass.relationFn will have the type
> of the id of entity?
>
> And if I want to display more than one string is it possible to do something
> like this:
>
> SelectItem item = new SelectItem (string to display, string to display, id
> of entity)
>
> ?
>
> Thanks again
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: lundi 11 septembre 2006 12:25
> Ŕ: MyFaces Discussion; sjarlier@stradefi.com
> Objet: Re: SelectOneMenu
>
> Sure; If i understand your problem the right way, you only need to
> create the List of SelectItems this way:
>
> selectItemList = new ArrayList<SelectItem>();
>
> for (iterate over list of entities you want to transform to selectItems)
> {
>       SelectItem item = new SelectItem(string to display, id of entity);
>
>       selectItemList .add(item);
> }
>
> The value of the selectOneMenu in the backend will then include the id
> of the entity.
>
> cheers,
>
> Gerald
>
> On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Hello everybody!
> >
> > I am programming some JSF JSP pages with Eclipse JBoss and I get into
> > troubles. Here is my problem:
> >
> > I need to display a list as follow:
> >
> > M. Smith - Professor
> > Mrs Smith - Student
> > M. Martin - Student
> >
> > For the moment, I am doing as follow:
> >
> > I have a table of relations statut-person.
> > For each existing relation I get the name and the statut label (in the
> > application language).
> > I concatenate both (statut and name) in a String and store it in a list.
> > I display this list with a SelectOneMenu:
> > <h:selectOneMenu id="stpers" style="width:200px"
> > value="#{MyClass.relationFn}">
> > <f:selectItems value="#{MyClass.functionsPersToDisplay}" />
> > </h:selectOneMenu>
> >
> > So when I get the selected item, I get again a String that I need to parse
> > to get back the function, the name and thus the relation.
> >
> > Is there another way, easier, where I could get the relation id directly?
> > The selected item would returns an id but these id will not be displayed
> > And I would display the corresponding values for this id (statut and name
> of
> > the person). Using a hashtable maybe? but then is it possible with a
> > selectOneMenu?
> >
> > Thanks for your help.
> > Best
> > Sophie
> >
> >
>
>
> --
> Gerald Müllan
> Schelleingasse 2/11
> 1040 Vienna, Austria
> 0043 699 11772506
> gerald.muellan@gmail.com
>
>


-- 
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
gerald.muellan@gmail.com

Re: SelectOneMenu

Posted by Martin Marinschek <ma...@gmail.com>.
There is a validation-check in selectOneMenu to disallow id's which
are not in the selectItem-list.

regards,

Martin

On 9/11/06, Thorbjørn Ravn Andersen <th...@gmail.com> wrote:
> Gerald Müllan skrev  den 11-09-2006 12:25:
> >
> > The value of the selectOneMenu in the backend will then include the id
> > of the entity.
>
> Just being curious.
>
> Will an malicious attempt to set the id to a value NOT in the list given
> (by handcrafting a response) be allowed to update the property in the
> bean, or will it be rejected as being invalid?
>
> --
>   Thorbjørn
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: SelectOneMenu

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Gerald Müllan skrev  den 11-09-2006 12:25:
>
> The value of the selectOneMenu in the backend will then include the id
> of the entity.

Just being curious.

Will an malicious attempt to set the id to a value NOT in the list given 
(by handcrafting a response) be allowed to update the property in the 
bean, or will it be rejected as being invalid?

-- 
  Thorbjørn

RE: SelectOneMenu

Posted by sj...@stradefi.com.
Thanks a lot. So that means that the returned selected item will be the id
of entity in this case? In my example MyClass.relationFn will have the type
of the id of entity?

And if I want to display more than one string is it possible to do something
like this:

SelectItem item = new SelectItem (string to display, string to display, id
of entity) 

?

Thanks again
Sophie

-----Message d'origine-----
De : Gerald Müllan [mailto:bierbrauen@gmail.com] 
Envoyé : lundi 11 septembre 2006 12:25
À : MyFaces Discussion; sjarlier@stradefi.com
Objet : Re: SelectOneMenu

Sure; If i understand your problem the right way, you only need to
create the List of SelectItems this way:

selectItemList = new ArrayList<SelectItem>();

for (iterate over list of entities you want to transform to selectItems)
{
      SelectItem item = new SelectItem(string to display, id of entity);

      selectItemList .add(item);
}

The value of the selectOneMenu in the backend will then include the id
of the entity.

cheers,

Gerald

On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hello everybody!
>
> I am programming some JSF JSP pages with Eclipse JBoss and I get into
> troubles. Here is my problem:
>
> I need to display a list as follow:
>
> M. Smith - Professor
> Mrs Smith - Student
> M. Martin - Student
>
> For the moment, I am doing as follow:
>
> I have a table of relations statut-person.
> For each existing relation I get the name and the statut label (in the
> application language).
> I concatenate both (statut and name) in a String and store it in a list.
> I display this list with a SelectOneMenu:
> <h:selectOneMenu id="stpers" style="width:200px"
> value="#{MyClass.relationFn}">
> <f:selectItems value="#{MyClass.functionsPersToDisplay}" />
> </h:selectOneMenu>
>
> So when I get the selected item, I get again a String that I need to parse
> to get back the function, the name and thus the relation.
>
> Is there another way, easier, where I could get the relation id directly?
> The selected item would returns an id but these id will not be displayed
> And I would display the corresponding values for this id (statut and name
of
> the person). Using a hashtable maybe? but then is it possible with a
> selectOneMenu?
>
> Thanks for your help.
> Best
> Sophie
>
>


-- 
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
gerald.muellan@gmail.com


Re: selectOneRadio

Posted by Bruno Aranda <br...@gmail.com>.
You can disable a SelectItem by using its method setDisabled(boolean),
so the user select it. Cheers,

Bruno

On 10/2/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Thanks a lot. I found my error. I did not have the correct value in my
> Motive4.
>
> Just another question as well: is it possible to disable a selectOneMenu but
> let the user see what there is in the list? I do not want the user to change
> his selection but I want him to be able to see all items of the list...
>
> Thanks
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: lundi 2 octobre 2006 09:10
> Ŕ: MyFaces Discussion; sjarlier@stradefi.com
> Objet: Re: selectOneRadio
>
> Hi,
>
> if this still doesn`t work, just post the managed bean code here.
>
> cheers,
>
> Gerald
>
> On 10/1/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Hi!
> >
> > I am using a selectOneRadio list displayed on my jsp page but I would like
> > only to display this list with a default selected value. For example I
> would
> > like to display the following list:
> >
> >   Motive1
> >   Motive2
> >   Motive3
> > X Motive4
> >   Motive5
> >
> > And I want Motive4 to be selected and not be able to change this
> selection.
> > I was thinking to give the value Motive4 to Myclass.absenceMotive but then
> > nothing is selected in my page, what can I do to do that?
> >
> > <h:selectOneRadio value="#{Myclass.absenceMotive}" layout="pageDirection"
> > disabled="true"
> > <f:selectItems value="#{Myclass.absenceMotives}" />
> > </h:selectOneRadio>
> >
> > Thanks
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>

RE: selectOneRadio

Posted by sj...@stradefi.com.
Thanks a lot. I found my error. I did not have the correct value in my
Motive4. 

Just another question as well: is it possible to disable a selectOneMenu but
let the user see what there is in the list? I do not want the user to change
his selection but I want him to be able to see all items of the list...

Thanks
Sophie

-----Message d'origine-----
De : Gerald Müllan [mailto:bierbrauen@gmail.com] 
Envoyé : lundi 2 octobre 2006 09:10
À : MyFaces Discussion; sjarlier@stradefi.com
Objet : Re: selectOneRadio

Hi,

if this still doesn`t work, just post the managed bean code here.

cheers,

Gerald

On 10/1/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hi!
>
> I am using a selectOneRadio list displayed on my jsp page but I would like
> only to display this list with a default selected value. For example I
would
> like to display the following list:
>
>   Motive1
>   Motive2
>   Motive3
> X Motive4
>   Motive5
>
> And I want Motive4 to be selected and not be able to change this
selection.
> I was thinking to give the value Motive4 to Myclass.absenceMotive but then
> nothing is selected in my page, what can I do to do that?
>
> <h:selectOneRadio value="#{Myclass.absenceMotive}" layout="pageDirection"
> disabled="true"
> <f:selectItems value="#{Myclass.absenceMotives}" />
> </h:selectOneRadio>
>
> Thanks
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: selectOneRadio

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

if this still doesn`t work, just post the managed bean code here.

cheers,

Gerald

On 10/1/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hi!
>
> I am using a selectOneRadio list displayed on my jsp page but I would like
> only to display this list with a default selected value. For example I would
> like to display the following list:
>
>   Motive1
>   Motive2
>   Motive3
> X Motive4
>   Motive5
>
> And I want Motive4 to be selected and not be able to change this selection.
> I was thinking to give the value Motive4 to Myclass.absenceMotive but then
> nothing is selected in my page, what can I do to do that?
>
> <h:selectOneRadio value="#{Myclass.absenceMotive}" layout="pageDirection"
> disabled="true"
> <f:selectItems value="#{Myclass.absenceMotives}" />
> </h:selectOneRadio>
>
> Thanks
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

selectOneRadio

Posted by sj...@stradefi.com.
Hi!

I am using a selectOneRadio list displayed on my jsp page but I would like
only to display this list with a default selected value. For example I would
like to display the following list:

  Motive1
  Motive2
  Motive3
X Motive4
  Motive5

And I want Motive4 to be selected and not be able to change this selection.
I was thinking to give the value Motive4 to Myclass.absenceMotive but then
nothing is selected in my page, what can I do to do that?

<h:selectOneRadio value="#{Myclass.absenceMotive}" layout="pageDirection"
disabled="true"
<f:selectItems value="#{Myclass.absenceMotives}" />
</h:selectOneRadio>

Thanks


Re: RichList and SelectBooleanCheckbox

Posted by Gerald Müllan <bi...@gmail.com>.
Just try to delete all myfaces jars, maybe you are playing round with
very old ones.

And get the ones from the latest release:

http://myfaces.apache.org/download.html

In a few days the newest release is getting out.

regards,

Gerald

RE: RichList and SelectBooleanCheckbox

Posted by sj...@stradefi.com.
Here are the libs I am using:

 



If I remove myfaces-api or/and myfaces-impl my program will not build
anymore. Should I remove these two libraries and tomahawk and add
myfaces-all.jar? If yes where can I find this myfaces-all.jar?

 

Thanks,

Sophie

 

-----Message d'origine-----
De : Martin Marinschek [mailto:martin.marinschek@gmail.com] 
Envoyé : mardi 12 septembre 2006 14:35
À : MyFaces Discussion; sjarlier@stradefi.com
Objet : Re: RichList and SelectBooleanCheckbox

 

It looks as if you'd have several versions of MyFaces-jars around, and

some class gets loaded from a different class-loader and this is why

you get a ClassCast-exception.

 

Did you clean out everything?

 

Tried to get rid of the MyFaces jars included in JBoss?

 

regards,

 

Martin

 

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:

> I tried to add this to my web.xml:

> 

> <filter>

>         <filter-name>MyFacesExtensionsFilter</filter-name>

> 

>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte

> r-class>

>         <init-param>

>             <param-name>maxFileSize</param-name>

>             <param-value>20m</param-value>

>         </init-param>

>     </filter>

>     <filter-mapping>

>         <filter-name>MyFacesExtensionsFilter</filter-name>

>         <url-pattern>/faces/*</url-pattern>

>     </filter-mapping>

> 

> But I am still getting the same error (I apparently don't need these

> filters, the problem comes from somewhere else I guess):

> 

> ERROR

>
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco].

> [jsp]] Servlet.service() for servlet jsp threw exception

> java.lang.ClassCastException: org.apache.myfaces.config.MyfacesConfig

>         at

>
org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.jav

> a:45)

>         at

>
org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator

> (HtmlRendererUtils.java:462)

>         at

>
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeBegin(HtmlTabl

> eRendererBase.java:71)

>         at

>
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeBegin(HtmlTabl

> eRenderer.java:38)

>         at

>
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)

>         at javax.faces.component.UIData.encodeBegin(UIData.java:360)

>         at

>
javax.faces.component.html.HtmlDataTable.encodeBegin(HtmlDataTable.java:36)

>         at

>
org.apache.myfaces.component.html.ext.HtmlDataTableHack.encodeBegin(HtmlData

> TableHack.java:126)

>         at

>
org.apache.myfaces.component.html.ext.HtmlDataTable.encodeBegin(HtmlDataTabl

> e.java:312)

>         at

> javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)

>         at

> javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)

>         at

>
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTag

> Base.java:55)

>         at org.apache.jsp.jsp. EF.

>
EF_005fEmployee_005fProceduresAccess_jsp._jspx_meth_t_dataTable_0(org.apache

> .jsp.jsp. EF. EF_005fEmployee_005fProceduresAccess_jsp:1616)

>         at org.apache.jsp.jsp.EF.

> EF_005fEmployee_005fProceduresAccess_jsp._jspService(org.apache.jsp.jsp.
EF.

> EF_005fEmployee_005fProceduresAccess_jsp:512)

>         at

> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

>         at

>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3

> 22)

>         at

> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

>         at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

> FilterChain.java:252)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

> ain.java:173)

>         at

>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.

> java:672)

>         at

>
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis

> patcher.java:463)

>         at

>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch

> er.java:398)

>         at

>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher

> .java:301)

>         at

>
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl

> etExternalContextImpl.java:415)

>         at

>
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand

> lerImpl.java:234)

>         at

>
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)

>         at

>
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)

>         at

> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)

>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)

>         at

>
org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServl

> et.java:49)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

> FilterChain.java:252)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

> ain.java:173)

>         at

>
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF

> ilter.java:122)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

> FilterChain.java:202)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

> ain.java:173)

>         at

>
org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFil

> ter.java:73)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

> FilterChain.java:202)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

> ain.java:173)

>         at

>
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja

> va:81)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

> FilterChain.java:202)

>         at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

> ain.java:173)

>         at

>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

> va:213)

>         at

>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja

> va:178)

>         at

>
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal

> ve.java:39)

>         at

>
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci

> ationValve.java:159)

>         at

>
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:

> 59)

>         at

>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126

> )

>         at

>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105

> )

>         at

>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java

> :107)

>         at

>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

>         at

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

>         at

>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne

> ction(Http11Protocol.java:744)

>         at

>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav

> a:527)

>         at

>
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre

> ad.java:112)

>         at java.lang.Thread.run(Thread.java:595)

> 

> That does not help me much this errors log :-(

> 

> Thanks,

> Sophie

> 

> 

> -----Message d'origine-----

> De: Gerald Müllan [mailto:bierbrauen@gmail.com]

> Envoyé: mardi 12 septembre 2006 14:07

> À: sjarlier@stradefi.com; MyFaces Discussion

> Objet: Re: RichList and SelectBooleanCheckbox

> 

> If you only use standard components you shouldn`t need it. But if it

> comes down to stuff which needs serving of resources then extensions

> filter is obligatory.

> 

> If you have configured it the common way:

> 

> http://myfaces.apache.org/tomahawk/extensionsFilter.html

> 

> There should be no problem.

> 

> But it sounds that there is still some problem with your web.xml.

> 

> Any deeper infos coming from the exception?

> 

> cheers,

> 

> Gerald

> 

> On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:

> > Thanks again. For sure MyClass is declared.

> > But if I want to use tomahawk do I need something like this in my
web.xml:

> >

> > <filter-mapping>

> > <filter-name>MyFacesExtensionsFilter</filter-name>

> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>

> > </filter-mapping>

> >

> > I keep having the error: org.apache.myfaces.config.MyfacesConfig

> > Is it possible that tomahawk is not compatible with the program I am
using

> > Alfresco with JBoss?

> >

> > Thanks,

> > Sophie

> >

> > -----Message d'origine-----

> > De: Gerald Müllan [mailto:bierbrauen@gmail.com]

> > Envoyé: mardi 12 septembre 2006 12:45

> > À: MyFaces Discussion; sjarlier@stradefi.com

> > Objet: Re: RichList and SelectBooleanCheckbox

> >

> > Hi,

> >

> > sure, MyClass has to be declared as a managed bean in your

> faces-config.xml.

> >

> > The t:updateActionListener should be used as follows:

> >

> > <t:updateActionListener property="#{managedBean.itemId}"

> > value="#{item.id}"/>

> >

> > Just use it inside a commandLink like:

> >

> > <h:commandLink value="someText" action="#{managedBean.goNextPage}">

> >      <t:updateActionListener property="#{managedBean.itemId}"

> > value="#{item.id}"/>

> > </h:commandLink>

> >

> > With the help of this component, you know (via the id) in the backend

> > which entry was clicked on. You can also use an ActionListener to

> > accomplish this task.

> >

> > cheers,

> >

> > Gerald

> >

> > On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:

> > > Hi!

> > >

> > > Thanks for your help.

> > > I tried to use this dataTable tag as follow:

> > >

> > > <t:dataTable    value="#{MyClass.listToDisplay}"

> > >                                          var="item">

> > >

> > >         <f:facet name="Name">

> > >                   <f:verbatim>&amp;#160;</f:verbatim>

> > >         </f:facet>

> > >         <h:column>

> > >                           <h:outputText value="#{item.name}"/>

> > >         </h:column>

> > >         <h:column>

> > >                 <h:outputText value="#{item.firstname}"/>

> > >         </h:column>

> > > </t:dataTable>

> > >

> > > But I am getting this error: javax.faces.FacesException:

> > > org.apache.myfaces.config.MyfacesConfig

> > >

> > > Do I need to declare a bean or something in my xml configuration files

> to

> > > use it?

> > >

> > > And thus this t:updateActionListener will allow me to set a property
of

> > the

> > > current item? For exemple if I have a list of person and this person
has

> a

> > > property Boolean authorized then this authorized for this precise
person

> > > will be set to true for example?

> > >

> > > Thanks

> > > Sophie

> > >

> > > -----Message d'origine-----

> > > De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]

> > > Envoyé: lundi 11 septembre 2006 21:25

> > > À: MyFaces Discussion

> > > Objet: Re: RichList and SelectBooleanCheckbox

> > >

> > > sjarlier@stradefi.com skrev  den 11-09-2006 17:02:

> > > > The problem I have now is that I would like the user to select some

> > > persons

> > > > in this list and getting the list of selected persons in my program.
I

> > was

> > > > thinking of putting a SelectBooleanCheckbox in front of each row of

> this

> > > > table but then I cannot get back the node associated to the
checkbox.

> If

> > I

> > > > am doing something like this:

> > > >

> > > > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"

> > > >

> > > > Then this checkbox will be checked if r.personAuthorized is true but
I

> > > will

> > > > not get the value of this checkbox in my nodes when leaving this
page

> > no?

> > > >

> > > >

> > > If you were using a h:dataTable I would suggest using the

> > > t:updateActionListener tag which allows you to set a property where
the

> > > variable is available from the loop.

> > >

> > > Maybe it will work inside your package too?

> > >

> > > --

> > >   THorbjørn

> > >

> > >

> >

> >

> > --

> > http://www.irian.at

> >

> > Your JSF powerhouse -

> > JSF Consulting, Development and

> > Courses in English and German

> >

> > Professional Support for Apache MyFaces

> >

> >

> 

> 

> --

> http://www.irian.at

> 

> Your JSF powerhouse -

> JSF Consulting, Development and

> Courses in English and German

> 

> Professional Support for Apache MyFaces

> 

> 

 

 

-- 

 

http://www.irian.at

 

Your JSF powerhouse -

JSF Consulting, Development and

Courses in English and German

 

Professional Support for Apache MyFaces


Re: RichList and SelectBooleanCheckbox

Posted by Martin Marinschek <ma...@gmail.com>.
It looks as if you'd have several versions of MyFaces-jars around, and
some class gets loaded from a different class-loader and this is why
you get a ClassCast-exception.

Did you clean out everything?

Tried to get rid of the MyFaces jars included in JBoss?

regards,

Martin

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> I tried to add this to my web.xml:
>
> <filter>
>         <filter-name>MyFacesExtensionsFilter</filter-name>
>
> <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte
> r-class>
>         <init-param>
>             <param-name>maxFileSize</param-name>
>             <param-value>20m</param-value>
>         </init-param>
>     </filter>
>     <filter-mapping>
>         <filter-name>MyFacesExtensionsFilter</filter-name>
>         <url-pattern>/faces/*</url-pattern>
>     </filter-mapping>
>
> But I am still getting the same error (I apparently don't need these
> filters, the problem comes from somewhere else I guess):
>
> ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco].
> [jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException: org.apache.myfaces.config.MyfacesConfig
>         at
> org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.jav
> a:45)
>         at
> org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator
> (HtmlRendererUtils.java:462)
>         at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeBegin(HtmlTabl
> eRendererBase.java:71)
>         at
> org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeBegin(HtmlTabl
> eRenderer.java:38)
>         at
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
>         at javax.faces.component.UIData.encodeBegin(UIData.java:360)
>         at
> javax.faces.component.html.HtmlDataTable.encodeBegin(HtmlDataTable.java:36)
>         at
> org.apache.myfaces.component.html.ext.HtmlDataTableHack.encodeBegin(HtmlData
> TableHack.java:126)
>         at
> org.apache.myfaces.component.html.ext.HtmlDataTable.encodeBegin(HtmlDataTabl
> e.java:312)
>         at
> javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
>         at
> javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)
>         at
> org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTag
> Base.java:55)
>         at org.apache.jsp.jsp. EF.
> EF_005fEmployee_005fProceduresAccess_jsp._jspx_meth_t_dataTable_0(org.apache
> .jsp.jsp. EF. EF_005fEmployee_005fProceduresAccess_jsp:1616)
>         at org.apache.jsp.jsp.EF.
> EF_005fEmployee_005fProceduresAccess_jsp._jspService(org.apache.jsp.jsp. EF.
> EF_005fEmployee_005fProceduresAccess_jsp:512)
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 22)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
>         at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:672)
>         at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
> patcher.java:463)
>         at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
> er.java:398)
>         at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
> .java:301)
>         at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
> etExternalContextImpl.java:415)
>         at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
> lerImpl.java:234)
>         at
> org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
>         at
> org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
>         at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
>         at
> org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServl
> et.java:49)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
>         at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
> ilter.java:122)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
>         at
> org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFil
> ter.java:73)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
>         at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> va:81)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:178)
>         at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
> ve.java:39)
>         at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
> ationValve.java:159)
>         at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
> 59)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> )
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> )
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:744)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
>         at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
> ad.java:112)
>         at java.lang.Thread.run(Thread.java:595)
>
> That does not help me much this errors log :-(
>
> Thanks,
> Sophie
>
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: mardi 12 septembre 2006 14:07
> À: sjarlier@stradefi.com; MyFaces Discussion
> Objet: Re: RichList and SelectBooleanCheckbox
>
> If you only use standard components you shouldn`t need it. But if it
> comes down to stuff which needs serving of resources then extensions
> filter is obligatory.
>
> If you have configured it the common way:
>
> http://myfaces.apache.org/tomahawk/extensionsFilter.html
>
> There should be no problem.
>
> But it sounds that there is still some problem with your web.xml.
>
> Any deeper infos coming from the exception?
>
> cheers,
>
> Gerald
>
> On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Thanks again. For sure MyClass is declared.
> > But if I want to use tomahawk do I need something like this in my web.xml:
> >
> > <filter-mapping>
> > <filter-name>MyFacesExtensionsFilter</filter-name>
> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> > </filter-mapping>
> >
> > I keep having the error: org.apache.myfaces.config.MyfacesConfig
> > Is it possible that tomahawk is not compatible with the program I am using
> > Alfresco with JBoss?
> >
> > Thanks,
> > Sophie
> >
> > -----Message d'origine-----
> > De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> > Envoyé: mardi 12 septembre 2006 12:45
> > À: MyFaces Discussion; sjarlier@stradefi.com
> > Objet: Re: RichList and SelectBooleanCheckbox
> >
> > Hi,
> >
> > sure, MyClass has to be declared as a managed bean in your
> faces-config.xml.
> >
> > The t:updateActionListener should be used as follows:
> >
> > <t:updateActionListener property="#{managedBean.itemId}"
> > value="#{item.id}"/>
> >
> > Just use it inside a commandLink like:
> >
> > <h:commandLink value="someText" action="#{managedBean.goNextPage}">
> >      <t:updateActionListener property="#{managedBean.itemId}"
> > value="#{item.id}"/>
> > </h:commandLink>
> >
> > With the help of this component, you know (via the id) in the backend
> > which entry was clicked on. You can also use an ActionListener to
> > accomplish this task.
> >
> > cheers,
> >
> > Gerald
> >
> > On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > > Hi!
> > >
> > > Thanks for your help.
> > > I tried to use this dataTable tag as follow:
> > >
> > > <t:dataTable    value="#{MyClass.listToDisplay}"
> > >                                          var="item">
> > >
> > >         <f:facet name="Name">
> > >                   <f:verbatim>&amp;#160;</f:verbatim>
> > >         </f:facet>
> > >         <h:column>
> > >                           <h:outputText value="#{item.name}"/>
> > >         </h:column>
> > >         <h:column>
> > >                 <h:outputText value="#{item.firstname}"/>
> > >         </h:column>
> > > </t:dataTable>
> > >
> > > But I am getting this error: javax.faces.FacesException:
> > > org.apache.myfaces.config.MyfacesConfig
> > >
> > > Do I need to declare a bean or something in my xml configuration files
> to
> > > use it?
> > >
> > > And thus this t:updateActionListener will allow me to set a property of
> > the
> > > current item? For exemple if I have a list of person and this person has
> a
> > > property Boolean authorized then this authorized for this precise person
> > > will be set to true for example?
> > >
> > > Thanks
> > > Sophie
> > >
> > > -----Message d'origine-----
> > > De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]
> > > Envoyé: lundi 11 septembre 2006 21:25
> > > À: MyFaces Discussion
> > > Objet: Re: RichList and SelectBooleanCheckbox
> > >
> > > sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> > > > The problem I have now is that I would like the user to select some
> > > persons
> > > > in this list and getting the list of selected persons in my program. I
> > was
> > > > thinking of putting a SelectBooleanCheckbox in front of each row of
> this
> > > > table but then I cannot get back the node associated to the checkbox.
> If
> > I
> > > > am doing something like this:
> > > >
> > > > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> > > >
> > > > Then this checkbox will be checked if r.personAuthorized is true but I
> > > will
> > > > not get the value of this checkbox in my nodes when leaving this page
> > no?
> > > >
> > > >
> > > If you were using a h:dataTable I would suggest using the
> > > t:updateActionListener tag which allows you to set a property where the
> > > variable is available from the loop.
> > >
> > > Maybe it will work inside your package too?
> > >
> > > --
> > >   THorbjørn
> > >
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

RE: RichList and SelectBooleanCheckbox

Posted by sj...@stradefi.com.
I tried to add this to my web.xml:

<filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
 
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte
r-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/*</url-pattern>
    </filter-mapping>

But I am still getting the same error (I apparently don't need these
filters, the problem comes from somewhere else I guess):

ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco].
[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.myfaces.config.MyfacesConfig
	at
org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.jav
a:45)
	at
org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator
(HtmlRendererUtils.java:462)
	at
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeBegin(HtmlTabl
eRendererBase.java:71)
	at
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeBegin(HtmlTabl
eRenderer.java:38)
	at
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
	at javax.faces.component.UIData.encodeBegin(UIData.java:360)
	at
javax.faces.component.html.HtmlDataTable.encodeBegin(HtmlDataTable.java:36)
	at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.encodeBegin(HtmlData
TableHack.java:126)
	at
org.apache.myfaces.component.html.ext.HtmlDataTable.encodeBegin(HtmlDataTabl
e.java:312)
	at
javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
	at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)
	at
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTag
Base.java:55)
	at org.apache.jsp.jsp. EF.
EF_005fEmployee_005fProceduresAccess_jsp._jspx_meth_t_dataTable_0(org.apache
.jsp.jsp. EF. EF_005fEmployee_005fProceduresAccess_jsp:1616)
	at org.apache.jsp.jsp.EF.
EF_005fEmployee_005fProceduresAccess_jsp._jspService(org.apache.jsp.jsp. EF.
EF_005fEmployee_005fProceduresAccess_jsp:512)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
22)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
	at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:463)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:398)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:301)
	at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:415)
	at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:234)
	at
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
	at
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
	at
org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServl
et.java:49)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:122)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFil
ter.java:73)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:81)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
ve.java:39)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.java:159)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
59)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
	at java.lang.Thread.run(Thread.java:595)

That does not help me much this errors log :-(

Thanks,
Sophie


-----Message d'origine-----
De : Gerald Müllan [mailto:bierbrauen@gmail.com] 
Envoyé : mardi 12 septembre 2006 14:07
À : sjarlier@stradefi.com; MyFaces Discussion
Objet : Re: RichList and SelectBooleanCheckbox

If you only use standard components you shouldn`t need it. But if it
comes down to stuff which needs serving of resources then extensions
filter is obligatory.

If you have configured it the common way:

http://myfaces.apache.org/tomahawk/extensionsFilter.html

There should be no problem.

But it sounds that there is still some problem with your web.xml.

Any deeper infos coming from the exception?

cheers,

Gerald

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Thanks again. For sure MyClass is declared.
> But if I want to use tomahawk do I need something like this in my web.xml:
>
> <filter-mapping>
> <filter-name>MyFacesExtensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> I keep having the error: org.apache.myfaces.config.MyfacesConfig
> Is it possible that tomahawk is not compatible with the program I am using
> Alfresco with JBoss?
>
> Thanks,
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: mardi 12 septembre 2006 12:45
> À: MyFaces Discussion; sjarlier@stradefi.com
> Objet: Re: RichList and SelectBooleanCheckbox
>
> Hi,
>
> sure, MyClass has to be declared as a managed bean in your
faces-config.xml.
>
> The t:updateActionListener should be used as follows:
>
> <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
>
> Just use it inside a commandLink like:
>
> <h:commandLink value="someText" action="#{managedBean.goNextPage}">
>      <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
> </h:commandLink>
>
> With the help of this component, you know (via the id) in the backend
> which entry was clicked on. You can also use an ActionListener to
> accomplish this task.
>
> cheers,
>
> Gerald
>
> On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Hi!
> >
> > Thanks for your help.
> > I tried to use this dataTable tag as follow:
> >
> > <t:dataTable    value="#{MyClass.listToDisplay}"
> >                                          var="item">
> >
> >         <f:facet name="Name">
> >                   <f:verbatim>&amp;#160;</f:verbatim>
> >         </f:facet>
> >         <h:column>
> >                           <h:outputText value="#{item.name}"/>
> >         </h:column>
> >         <h:column>
> >                 <h:outputText value="#{item.firstname}"/>
> >         </h:column>
> > </t:dataTable>
> >
> > But I am getting this error: javax.faces.FacesException:
> > org.apache.myfaces.config.MyfacesConfig
> >
> > Do I need to declare a bean or something in my xml configuration files
to
> > use it?
> >
> > And thus this t:updateActionListener will allow me to set a property of
> the
> > current item? For exemple if I have a list of person and this person has
a
> > property Boolean authorized then this authorized for this precise person
> > will be set to true for example?
> >
> > Thanks
> > Sophie
> >
> > -----Message d'origine-----
> > De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]
> > Envoyé: lundi 11 septembre 2006 21:25
> > À: MyFaces Discussion
> > Objet: Re: RichList and SelectBooleanCheckbox
> >
> > sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> > > The problem I have now is that I would like the user to select some
> > persons
> > > in this list and getting the list of selected persons in my program. I
> was
> > > thinking of putting a SelectBooleanCheckbox in front of each row of
this
> > > table but then I cannot get back the node associated to the checkbox.
If
> I
> > > am doing something like this:
> > >
> > > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> > >
> > > Then this checkbox will be checked if r.personAuthorized is true but I
> > will
> > > not get the value of this checkbox in my nodes when leaving this page
> no?
> > >
> > >
> > If you were using a h:dataTable I would suggest using the
> > t:updateActionListener tag which allows you to set a property where the
> > variable is available from the loop.
> >
> > Maybe it will work inside your package too?
> >
> > --
> >   THorbjørn
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: RichList and SelectBooleanCheckbox

Posted by Gerald Müllan <bi...@gmail.com>.
If you only use standard components you shouldn`t need it. But if it
comes down to stuff which needs serving of resources then extensions
filter is obligatory.

If you have configured it the common way:

http://myfaces.apache.org/tomahawk/extensionsFilter.html

There should be no problem.

But it sounds that there is still some problem with your web.xml.

Any deeper infos coming from the exception?

cheers,

Gerald

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Thanks again. For sure MyClass is declared.
> But if I want to use tomahawk do I need something like this in my web.xml:
>
> <filter-mapping>
> <filter-name>MyFacesExtensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> I keep having the error: org.apache.myfaces.config.MyfacesConfig
> Is it possible that tomahawk is not compatible with the program I am using
> Alfresco with JBoss?
>
> Thanks,
> Sophie
>
> -----Message d'origine-----
> De: Gerald Müllan [mailto:bierbrauen@gmail.com]
> Envoyé: mardi 12 septembre 2006 12:45
> À: MyFaces Discussion; sjarlier@stradefi.com
> Objet: Re: RichList and SelectBooleanCheckbox
>
> Hi,
>
> sure, MyClass has to be declared as a managed bean in your faces-config.xml.
>
> The t:updateActionListener should be used as follows:
>
> <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
>
> Just use it inside a commandLink like:
>
> <h:commandLink value="someText" action="#{managedBean.goNextPage}">
>      <t:updateActionListener property="#{managedBean.itemId}"
> value="#{item.id}"/>
> </h:commandLink>
>
> With the help of this component, you know (via the id) in the backend
> which entry was clicked on. You can also use an ActionListener to
> accomplish this task.
>
> cheers,
>
> Gerald
>
> On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> > Hi!
> >
> > Thanks for your help.
> > I tried to use this dataTable tag as follow:
> >
> > <t:dataTable    value="#{MyClass.listToDisplay}"
> >                                          var="item">
> >
> >         <f:facet name="Name">
> >                   <f:verbatim>&amp;#160;</f:verbatim>
> >         </f:facet>
> >         <h:column>
> >                           <h:outputText value="#{item.name}"/>
> >         </h:column>
> >         <h:column>
> >                 <h:outputText value="#{item.firstname}"/>
> >         </h:column>
> > </t:dataTable>
> >
> > But I am getting this error: javax.faces.FacesException:
> > org.apache.myfaces.config.MyfacesConfig
> >
> > Do I need to declare a bean or something in my xml configuration files to
> > use it?
> >
> > And thus this t:updateActionListener will allow me to set a property of
> the
> > current item? For exemple if I have a list of person and this person has a
> > property Boolean authorized then this authorized for this precise person
> > will be set to true for example?
> >
> > Thanks
> > Sophie
> >
> > -----Message d'origine-----
> > De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]
> > Envoyé: lundi 11 septembre 2006 21:25
> > À: MyFaces Discussion
> > Objet: Re: RichList and SelectBooleanCheckbox
> >
> > sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> > > The problem I have now is that I would like the user to select some
> > persons
> > > in this list and getting the list of selected persons in my program. I
> was
> > > thinking of putting a SelectBooleanCheckbox in front of each row of this
> > > table but then I cannot get back the node associated to the checkbox. If
> I
> > > am doing something like this:
> > >
> > > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> > >
> > > Then this checkbox will be checked if r.personAuthorized is true but I
> > will
> > > not get the value of this checkbox in my nodes when leaving this page
> no?
> > >
> > >
> > If you were using a h:dataTable I would suggest using the
> > t:updateActionListener tag which allows you to set a property where the
> > variable is available from the loop.
> >
> > Maybe it will work inside your package too?
> >
> > --
> >   THorbjørn
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

RE: RichList and SelectBooleanCheckbox

Posted by sj...@stradefi.com.
Thanks again. For sure MyClass is declared.
But if I want to use tomahawk do I need something like this in my web.xml:

<filter-mapping> 
<filter-name>MyFacesExtensionsFilter</filter-name> 
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern> 
</filter-mapping>

I keep having the error: org.apache.myfaces.config.MyfacesConfig
Is it possible that tomahawk is not compatible with the program I am using
Alfresco with JBoss?

Thanks,
Sophie

-----Message d'origine-----
De : Gerald Müllan [mailto:bierbrauen@gmail.com] 
Envoyé : mardi 12 septembre 2006 12:45
À : MyFaces Discussion; sjarlier@stradefi.com
Objet : Re: RichList and SelectBooleanCheckbox

Hi,

sure, MyClass has to be declared as a managed bean in your faces-config.xml.

The t:updateActionListener should be used as follows:

<t:updateActionListener property="#{managedBean.itemId}"
value="#{item.id}"/>

Just use it inside a commandLink like:

<h:commandLink value="someText" action="#{managedBean.goNextPage}">
     <t:updateActionListener property="#{managedBean.itemId}"
value="#{item.id}"/>
</h:commandLink>

With the help of this component, you know (via the id) in the backend
which entry was clicked on. You can also use an ActionListener to
accomplish this task.

cheers,

Gerald

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hi!
>
> Thanks for your help.
> I tried to use this dataTable tag as follow:
>
> <t:dataTable    value="#{MyClass.listToDisplay}"
>                                          var="item">
>
>         <f:facet name="Name">
>                   <f:verbatim>&amp;#160;</f:verbatim>
>         </f:facet>
>         <h:column>
>                           <h:outputText value="#{item.name}"/>
>         </h:column>
>         <h:column>
>                 <h:outputText value="#{item.firstname}"/>
>         </h:column>
> </t:dataTable>
>
> But I am getting this error: javax.faces.FacesException:
> org.apache.myfaces.config.MyfacesConfig
>
> Do I need to declare a bean or something in my xml configuration files to
> use it?
>
> And thus this t:updateActionListener will allow me to set a property of
the
> current item? For exemple if I have a list of person and this person has a
> property Boolean authorized then this authorized for this precise person
> will be set to true for example?
>
> Thanks
> Sophie
>
> -----Message d'origine-----
> De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]
> Envoyé: lundi 11 septembre 2006 21:25
> À: MyFaces Discussion
> Objet: Re: RichList and SelectBooleanCheckbox
>
> sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> > The problem I have now is that I would like the user to select some
> persons
> > in this list and getting the list of selected persons in my program. I
was
> > thinking of putting a SelectBooleanCheckbox in front of each row of this
> > table but then I cannot get back the node associated to the checkbox. If
I
> > am doing something like this:
> >
> > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> >
> > Then this checkbox will be checked if r.personAuthorized is true but I
> will
> > not get the value of this checkbox in my nodes when leaving this page
no?
> >
> >
> If you were using a h:dataTable I would suggest using the
> t:updateActionListener tag which allows you to set a property where the
> variable is available from the loop.
>
> Maybe it will work inside your package too?
>
> --
>   THorbjørn
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: RichList and SelectBooleanCheckbox

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

sure, MyClass has to be declared as a managed bean in your faces-config.xml.

The t:updateActionListener should be used as follows:

<t:updateActionListener property="#{managedBean.itemId}" value="#{item.id}"/>

Just use it inside a commandLink like:

<h:commandLink value="someText" action="#{managedBean.goNextPage}">
     <t:updateActionListener property="#{managedBean.itemId}"
value="#{item.id}"/>
</h:commandLink>

With the help of this component, you know (via the id) in the backend
which entry was clicked on. You can also use an ActionListener to
accomplish this task.

cheers,

Gerald

On 9/12/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hi!
>
> Thanks for your help.
> I tried to use this dataTable tag as follow:
>
> <t:dataTable    value="#{MyClass.listToDisplay}"
>                                          var="item">
>
>         <f:facet name="Name">
>                   <f:verbatim>&amp;#160;</f:verbatim>
>         </f:facet>
>         <h:column>
>                           <h:outputText value="#{item.name}"/>
>         </h:column>
>         <h:column>
>                 <h:outputText value="#{item.firstname}"/>
>         </h:column>
> </t:dataTable>
>
> But I am getting this error: javax.faces.FacesException:
> org.apache.myfaces.config.MyfacesConfig
>
> Do I need to declare a bean or something in my xml configuration files to
> use it?
>
> And thus this t:updateActionListener will allow me to set a property of the
> current item? For exemple if I have a list of person and this person has a
> property Boolean authorized then this authorized for this precise person
> will be set to true for example?
>
> Thanks
> Sophie
>
> -----Message d'origine-----
> De: Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com]
> Envoyé: lundi 11 septembre 2006 21:25
> À: MyFaces Discussion
> Objet: Re: RichList and SelectBooleanCheckbox
>
> sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> > The problem I have now is that I would like the user to select some
> persons
> > in this list and getting the list of selected persons in my program. I was
> > thinking of putting a SelectBooleanCheckbox in front of each row of this
> > table but then I cannot get back the node associated to the checkbox. If I
> > am doing something like this:
> >
> > H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
> >
> > Then this checkbox will be checked if r.personAuthorized is true but I
> will
> > not get the value of this checkbox in my nodes when leaving this page no?
> >
> >
> If you were using a h:dataTable I would suggest using the
> t:updateActionListener tag which allows you to set a property where the
> variable is available from the loop.
>
> Maybe it will work inside your package too?
>
> --
>   THorbjørn
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

RE: RichList and SelectBooleanCheckbox

Posted by sj...@stradefi.com.
Hi!

Thanks for your help.
I tried to use this dataTable tag as follow:

<t:dataTable 	value="#{MyClass.listToDisplay}" 
					 var="item">
    	
    	<f:facet name="Name">
		  <f:verbatim>&amp;#160;</f:verbatim>
    	</f:facet>
    	<h:column>
			  <h:outputText value="#{item.name}"/>
    	</h:column>
    	<h:column>
        	<h:outputText value="#{item.firstname}"/>
    	</h:column>
</t:dataTable>

But I am getting this error: javax.faces.FacesException:
org.apache.myfaces.config.MyfacesConfig

Do I need to declare a bean or something in my xml configuration files to
use it?

And thus this t:updateActionListener will allow me to set a property of the
current item? For exemple if I have a list of person and this person has a
property Boolean authorized then this authorized for this precise person
will be set to true for example?

Thanks
Sophie

-----Message d'origine-----
De : Thorbjørn Ravn Andersen [mailto:thunderaxiom@gmail.com] 
Envoyé : lundi 11 septembre 2006 21:25
À : MyFaces Discussion
Objet : Re: RichList and SelectBooleanCheckbox

sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> The problem I have now is that I would like the user to select some
persons
> in this list and getting the list of selected persons in my program. I was
> thinking of putting a SelectBooleanCheckbox in front of each row of this
> table but then I cannot get back the node associated to the checkbox. If I
> am doing something like this:
>
> H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
>
> Then this checkbox will be checked if r.personAuthorized is true but I
will
> not get the value of this checkbox in my nodes when leaving this page no?
>
>   
If you were using a h:dataTable I would suggest using the 
t:updateActionListener tag which allows you to set a property where the 
variable is available from the loop.

Maybe it will work inside your package too?

-- 
  THorbjørn


Re: RichList and SelectBooleanCheckbox

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
sjarlier@stradefi.com skrev  den 11-09-2006 17:02:
> The problem I have now is that I would like the user to select some persons
> in this list and getting the list of selected persons in my program. I was
> thinking of putting a SelectBooleanCheckbox in front of each row of this
> table but then I cannot get back the node associated to the checkbox. If I
> am doing something like this:
>
> H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"
>
> Then this checkbox will be checked if r.personAuthorized is true but I will
> not get the value of this checkbox in my nodes when leaving this page no?
>
>   
If you were using a h:dataTable I would suggest using the 
t:updateActionListener tag which allows you to set a property where the 
variable is available from the loop.

Maybe it will work inside your package too?

-- 
  THorbjørn

RichList and SelectBooleanCheckbox

Posted by sj...@stradefi.com.
Hi!

I am using the opensource software Alfresco and I am using their tag a:
richList. I don't know if there is similar tag in JSF or other languages but
here the goal is:

I have a MapNode (or Hashtable me think) with some properties inside.
This table contains several nodes for example:
Id=Node1, name=person1, age=25, sex=female
Id=Node2, name=person2, age=25, sex=male
...

Then I want to display the table containing all nodes with all of their
properties except the id so I am using a richList as follow:

<a:richList id="personList" [...]
value="#{MyClass.personNodes}" var="r">

<a:column id="col00" width="12%" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink label="Person" value="name" styleClass="header"/>
</f:facet>
<h:outputText id="name" value="#{r.name}" />
</a:column>

<a:column id="col00" width="12%" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink label="Age" value="age" styleClass="header"/>
</f:facet>
<h:outputText id="age" value="#{r.age}" />
</a:column>
...

Then it is possible to click on the column description name "Person" to sort
the names by alphabetical order. 

The problem I have now is that I would like the user to select some persons
in this list and getting the list of selected persons in my program. I was
thinking of putting a SelectBooleanCheckbox in front of each row of this
table but then I cannot get back the node associated to the checkbox. If I
am doing something like this:

H:selectBooleanCheckbox id=ok value="#{r.personAuthorized}"

Then this checkbox will be checked if r.personAuthorized is true but I will
not get the value of this checkbox in my nodes when leaving this page no?

Thanks for your help,
Sophie






Re: SelectOneMenu

Posted by Gerald Müllan <bi...@gmail.com>.
Sure; If i understand your problem the right way, you only need to
create the List of SelectItems this way:

selectItemList = new ArrayList<SelectItem>();

for (iterate over list of entities you want to transform to selectItems)
{
      SelectItem item = new SelectItem(string to display, id of entity);

      selectItemList .add(item);
}

The value of the selectOneMenu in the backend will then include the id
of the entity.

cheers,

Gerald

On 9/11/06, sjarlier@stradefi.com <sj...@stradefi.com> wrote:
> Hello everybody!
>
> I am programming some JSF JSP pages with Eclipse JBoss and I get into
> troubles. Here is my problem:
>
> I need to display a list as follow:
>
> M. Smith - Professor
> Mrs Smith - Student
> M. Martin - Student
>
> For the moment, I am doing as follow:
>
> I have a table of relations statut-person.
> For each existing relation I get the name and the statut label (in the
> application language).
> I concatenate both (statut and name) in a String and store it in a list.
> I display this list with a SelectOneMenu:
> <h:selectOneMenu id="stpers" style="width:200px"
> value="#{MyClass.relationFn}">
> <f:selectItems value="#{MyClass.functionsPersToDisplay}" />
> </h:selectOneMenu>
>
> So when I get the selected item, I get again a String that I need to parse
> to get back the function, the name and thus the relation.
>
> Is there another way, easier, where I could get the relation id directly?
> The selected item would returns an id but these id will not be displayed
> And I would display the corresponding values for this id (statut and name of
> the person). Using a hashtable maybe? but then is it possible with a
> selectOneMenu?
>
> Thanks for your help.
> Best
> Sophie
>
>


-- 
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
gerald.muellan@gmail.com

SelectOneMenu

Posted by sj...@stradefi.com.
Hello everybody!

I am programming some JSF JSP pages with Eclipse JBoss and I get into
troubles. Here is my problem:

I need to display a list as follow:

M. Smith - Professor
Mrs Smith - Student
M. Martin - Student

For the moment, I am doing as follow:

I have a table of relations statut-person.
For each existing relation I get the name and the statut label (in the
application language).
I concatenate both (statut and name) in a String and store it in a list.
I display this list with a SelectOneMenu:
<h:selectOneMenu id="stpers" style="width:200px"
value="#{MyClass.relationFn}"> 
<f:selectItems value="#{MyClass.functionsPersToDisplay}" /> 
</h:selectOneMenu>

So when I get the selected item, I get again a String that I need to parse
to get back the function, the name and thus the relation.

Is there another way, easier, where I could get the relation id directly?
The selected item would returns an id but these id will not be displayed
And I would display the corresponding values for this id (statut and name of
the person). Using a hashtable maybe? but then is it possible with a
selectOneMenu?

Thanks for your help.
Best
Sophie


Re: to stop subscribing

Posted by Philippe Hennes <ph...@atanion.com>.
Hi,

to unsubscribe simply send a message to:
<us...@myfaces.apache.org>

regards
philippe

ould sid'ahmed wrote:
> Hello,
> how I can stop my inscription with the myfaces user
> think's
> 

-- 
Philippe Hennes - Web Developer - Atanion GmbH
Software Development - Bismarckstrasse 13 - 26122 Oldenburg - Germany
phone +49 441 4082321 - mobile +49 173 2432664 - fax +49 441 4082333
mailto:philippe.hennes@atanion.com - http://www.atanion.com