Where to report MyFaces 1.1.5 (major) bug? (problem with facet tag)

2007-03-01 Thread Lisa

Using a facet tag inside a datatable for a column header has been broken
(worked before, now does not).  I searched the wiki but did not see a place
I could post a bug.

If you do something like this:








you get a duplicate ID error.  the f:facet tag seems to be the culprit.

The page displays properly on load but if you come back to the page, there
will be an exception thrown citing duplicate ID's.  Notice there are no use
of id's.  The duplicate ID problem is due to MyFaces generated id's.

not sure how to fix this but you would be wise to not upgrade to 1.1.5 just
yet until this is fixed.
-- 
View this message in context: 
http://www.nabble.com/Where-to-report-MyFaces-1.1.5-%28major%29-bug--%28problem-with-facet-tag%29-tf3329824.html#a9258785
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-03-01 Thread Lisa

I am using 1.1.5 latest release.  Seems to be something new in 1.1.5 as a
previous snapshot of 1.1.5 we were using did not cause the problem.

the duplicate id being reported is generated by the system.  others are
beginning to see the bug as well.  I believe it is a problem with MyFaces
and not a problem with any individual project or problem.

L


grantsmith wrote:
> 
> Also, please provide more information regarding the version on myfaces
> you're using (did you build from the current svn head ?). From previous
> posts, it appears you have been using myfaces successfully ? Did this
> occur
> recently ? What changed in your setup, etc... that will help others to
> diagnose your issue.
> 
> On 2/28/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
>>
>> Are you generating any components programmically?
>>
>> The situation you describe sounds like this
>>
>> 1) first time -- construct some components, all unique ids
>> 2) second time -- start with components from first time, and add more
>> copies of them.
>>
>> At this point, my suggestion would be to narrow down the problem to
>> the minimal page necessary to reproduce the problem, then post the
>> relevent page code.
>>
>>
>> On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> >
>> > I removed all included files.  Also if it displays properly the first
>> time
>> > (indicating no duplicate id's) why would it fail the second time I try
>> the
>> > page?
>> >
>> > L
>> >
>> >
>> > Mike Kienenberger wrote:
>> > >
>> > > Is the id specified in an included file?   Is the included file
>> > > wrapped in an f:subView so that multiple includes of it don't
>> > > conflict?
>> > >
>> > > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> > >>
>> > >> I checked everywhere, even grep'd through everything and there is no
>> > >> conflict.  Any ideas would be appreciated.
>> > >>
>> > >> thanks
>> > >>
>> > >> L
>> > >>
>> > >>
>> > >>
>> > >> is_maximum wrote:
>> > >> >
>> > >> > Hi Lisa
>> > >> > it seems there are two components that have the same id. check for
>> id
>> > >> > attribute you set for components in your pages (all pages) and
>> find
>> > >> > duplicated id.
>> > >> > it conflicts with this: idSummaryForm:idSummaryTable:_id79
>> > >> >
>> > >> > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> > >> >>
>> > >> >>
>> > >> >> In my application, when I click the first time on a page, it
>> displays.
>> > >> >> When I click a second time I get this never before seen error.
>> > >> >>
>> > >> >> ---
>> > >> >> Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
>> > >> >> handleRenderException
>> > >> >> SEVERE: Error Rendering View[/web/summary.xhtml]
>> > >> >> java.lang.IllegalStateException: Client-id : _id79 is duplicated
>> in
>> > >> the
>> > >> >> faces tr
>> > >> >> ee. Component : idSummaryForm:idSummaryTable:_id79,
>> > >> >> path: {Component-Path : [Class:
>> > >> javax.faces.component.UIViewRoot,ViewId:
>> > >> >> /web/g
>> > >> >> ro/PtManageGroups_Summary.xhtml][Class:
>> > >> >> org.apache.myfaces.custom.document.Docum
>> > >> >> ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id:
>> > >> >> idSummaryForm]
>> > >> >> [Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id:
>> > >> idTable]
>> > >> >> [Class: javax.faces.component.UIColumn,Id: _id79]
>> > >> >> [Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
>> > >> >> at
>> > >> >>
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> > >> >> ateIds(JspStateManagerImpl.java:329)
>> > >> >> at
>> > >> >>
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> > >> >> --
>> > >> >> View this message in context:
>> > >> >>
>> > >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
>> > >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> > >> >>
>> > >> >>
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Regards,
>> > >> > Mohammad
>> > >> >
>> > >> >
>> > >>
>> > >> --
>> > >> View this message in context:
>> > >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9208680
>> > >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> > >>
>> > >>
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9222357
>> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 
> 
> -- 
> Grant Smith
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9258413
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-03-01 Thread Lisa

no, the bug or problem is with myfaces.  the duplicate id being reported is
generated by the system.  not sure what to do except request that myfaces be
fixed.

L


Mike Kienenberger wrote:
> 
> Are you generating any components programmically?
> 
> The situation you describe sounds like this
> 
> 1) first time -- construct some components, all unique ids
> 2) second time -- start with components from first time, and add more
> copies of them.
> 
> At this point, my suggestion would be to narrow down the problem to
> the minimal page necessary to reproduce the problem, then post the
> relevent page code.
> 
> 
> On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>> I removed all included files.  Also if it displays properly the first
>> time
>> (indicating no duplicate id's) why would it fail the second time I try
>> the
>> page?
>>
>> L
>>
>>
>> Mike Kienenberger wrote:
>> >
>> > Is the id specified in an included file?   Is the included file
>> > wrapped in an f:subView so that multiple includes of it don't
>> > conflict?
>> >
>> > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I checked everywhere, even grep'd through everything and there is no
>> >> conflict.  Any ideas would be appreciated.
>> >>
>> >> thanks
>> >>
>> >> L
>> >>
>> >>
>> >>
>> >> is_maximum wrote:
>> >> >
>> >> > Hi Lisa
>> >> > it seems there are two components that have the same id. check for
>> id
>> >> > attribute you set for components in your pages (all pages) and find
>> >> > duplicated id.
>> >> > it conflicts with this: idSummaryForm:idSummaryTable:_id79
>> >> >
>> >> > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> In my application, when I click the first time on a page, it
>> displays.
>> >> >> When I click a second time I get this never before seen error.
>> >> >>
>> >> >> ---
>> >> >> Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
>> >> >> handleRenderException
>> >> >> SEVERE: Error Rendering View[/web/summary.xhtml]
>> >> >> java.lang.IllegalStateException: Client-id : _id79 is duplicated in
>> >> the
>> >> >> faces tr
>> >> >> ee. Component : idSummaryForm:idSummaryTable:_id79,
>> >> >> path: {Component-Path : [Class:
>> >> javax.faces.component.UIViewRoot,ViewId:
>> >> >> /web/g
>> >> >> ro/PtManageGroups_Summary.xhtml][Class:
>> >> >> org.apache.myfaces.custom.document.Docum
>> >> >> ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id:
>> >> >> idSummaryForm]
>> >> >> [Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id:
>> >> idTable]
>> >> >> [Class: javax.faces.component.UIColumn,Id: _id79]
>> >> >> [Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
>> >> >> at
>> >> >>
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> >> ateIds(JspStateManagerImpl.java:329)
>> >> >> at
>> >> >>
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
>> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > Regards,
>> >> > Mohammad
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9208680
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9222357
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9258365
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-03-01 Thread Lisa

The duplicate ID's are reported on facelets generated id's so it is a
facelets bug.  I see this when I use the facet tag.

L


Mike Kienenberger wrote:
> 
> Is the id specified in an included file?   Is the included file
> wrapped in an f:subView so that multiple includes of it don't
> conflict?
> 
> On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>> I checked everywhere, even grep'd through everything and there is no
>> conflict.  Any ideas would be appreciated.
>>
>> thanks
>>
>> L
>>
>>
>>
>> is_maximum wrote:
>> >
>> > Hi Lisa
>> > it seems there are two components that have the same id. check for id
>> > attribute you set for components in your pages (all pages) and find
>> > duplicated id.
>> > it conflicts with this: idSummaryForm:idSummaryTable:_id79
>> >
>> > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> In my application, when I click the first time on a page, it displays.
>> >> When I click a second time I get this never before seen error.
>> >>
>> >> ---
>> >> Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
>> >> handleRenderException
>> >> SEVERE: Error Rendering View[/web/summary.xhtml]
>> >> java.lang.IllegalStateException: Client-id : _id79 is duplicated in
>> the
>> >> faces tr
>> >> ee. Component : idSummaryForm:idSummaryTable:_id79,
>> >> path: {Component-Path : [Class:
>> javax.faces.component.UIViewRoot,ViewId:
>> >> /web/g
>> >> ro/PtManageGroups_Summary.xhtml][Class:
>> >> org.apache.myfaces.custom.document.Docum
>> >> ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id:
>> >> idSummaryForm]
>> >> [Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id:
>> idTable]
>> >> [Class: javax.faces.component.UIColumn,Id: _id79]
>> >> [Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
>> >> at
>> >> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> ateIds(JspStateManagerImpl.java:329)
>> >> at
>> >> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards,
>> > Mohammad
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9208680
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9258363
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-03-01 Thread Lisa

I found the culprit.

It is the facet tag (no id's) I think there is a bug in MyFaces 1.1.5.

This was working before but now has problems.  It has nothing to do with
duplicate id's that the user provides but ID's that MyFaces generates.




Shane Petroff wrote:
> 
> Lisa wrote:
>> I checked everywhere, even grep'd through everything and there is no
>> conflict.  Any ideas would be appreciated.
>>   
> I thought I was the only one seeing misidentified 'duplicate ids' (I 
> don't use facelets though, so this could be worthless advice). 
> Invariably for me, 'duplicate id' has been a red herring. It seems that 
> this can happen when there is some malformed EL squirreled away 
> somewhere. But to be honest, I haven't really noticed enough of a 
> pattern to be terribly certain.
> 
> -- 
> Shane
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9258284
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-02-28 Thread Lisa

no, ehcache.  I think there is a serious bug with JSF or something.

thanks


L



Titi Wangsa wrote:
> 
> perhaps you are using oscache?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9222536
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-02-28 Thread Lisa

I removed all included files.  Also if it displays properly the first time
(indicating no duplicate id's) why would it fail the second time I try the
page?

L


Mike Kienenberger wrote:
> 
> Is the id specified in an included file?   Is the included file
> wrapped in an f:subView so that multiple includes of it don't
> conflict?
> 
> On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>> I checked everywhere, even grep'd through everything and there is no
>> conflict.  Any ideas would be appreciated.
>>
>> thanks
>>
>> L
>>
>>
>>
>> is_maximum wrote:
>> >
>> > Hi Lisa
>> > it seems there are two components that have the same id. check for id
>> > attribute you set for components in your pages (all pages) and find
>> > duplicated id.
>> > it conflicts with this: idSummaryForm:idSummaryTable:_id79
>> >
>> > On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> In my application, when I click the first time on a page, it displays.
>> >> When I click a second time I get this never before seen error.
>> >>
>> >> ---
>> >> Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
>> >> handleRenderException
>> >> SEVERE: Error Rendering View[/web/summary.xhtml]
>> >> java.lang.IllegalStateException: Client-id : _id79 is duplicated in
>> the
>> >> faces tr
>> >> ee. Component : idSummaryForm:idSummaryTable:_id79,
>> >> path: {Component-Path : [Class:
>> javax.faces.component.UIViewRoot,ViewId:
>> >> /web/g
>> >> ro/PtManageGroups_Summary.xhtml][Class:
>> >> org.apache.myfaces.custom.document.Docum
>> >> ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id:
>> >> idSummaryForm]
>> >> [Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id:
>> idTable]
>> >> [Class: javax.faces.component.UIColumn,Id: _id79]
>> >> [Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
>> >> at
>> >> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> ateIds(JspStateManagerImpl.java:329)
>> >> at
>> >> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards,
>> > Mohammad
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9208680
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9222357
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-02-28 Thread Lisa

I checked everywhere, even grep'd through everything and there is no
conflict.  Any ideas would be appreciated.

thanks

L



is_maximum wrote:
> 
> Hi Lisa
> it seems there are two components that have the same id. check for id
> attribute you set for components in your pages (all pages) and find
> duplicated id.
> it conflicts with this: idSummaryForm:idSummaryTable:_id79
> 
> On 2/28/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>>
>> In my application, when I click the first time on a page, it displays.
>> When I click a second time I get this never before seen error.
>>
>> ---
>> Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
>> handleRenderException
>> SEVERE: Error Rendering View[/web/summary.xhtml]
>> java.lang.IllegalStateException: Client-id : _id79 is duplicated in the
>> faces tr
>> ee. Component : idSummaryForm:idSummaryTable:_id79,
>> path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId:
>> /web/g
>> ro/PtManageGroups_Summary.xhtml][Class:
>> org.apache.myfaces.custom.document.Docum
>> ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id:
>> idSummaryForm]
>> [Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id: idTable]
>> [Class: javax.faces.component.UIColumn,Id: _id79]
>> [Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
>> at
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> ateIds(JspStateManagerImpl.java:329)
>> at
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
>> --
>> View this message in context:
>> http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Regards,
> Mohammad
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9208680
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Never before seen exception (facelets.FaceletViewHandler handleRenderException) - ??

2007-02-27 Thread Lisa

In my application, when I click the first time on a page, it displays.  
When I click a second time I get this never before seen error.

---
Feb 28, 2007 12:19:31 AM com.sun.facelets.FaceletViewHandler
handleRenderException
SEVERE: Error Rendering View[/web/summary.xhtml]
java.lang.IllegalStateException: Client-id : _id79 is duplicated in the
faces tr
ee. Component : idSummaryForm:idSummaryTable:_id79,
 path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId:
/web/g
ro/PtManageGroups_Summary.xhtml][Class:
org.apache.myfaces.custom.document.Docum
ent,Id: _id12][Class: javax.faces.component.html.HtmlForm,Id: idSummaryForm]
[Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id: idTable]
[Class: javax.faces.component.UIColumn,Id: _id79]
[Class: javax.faces.component.html.HtmlOutputText,Id: _id79]}
at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
ateIds(JspStateManagerImpl.java:329)
at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplic
-- 
View this message in context: 
http://www.nabble.com/Never-before-seen-exception-%28facelets.FaceletViewHandler-handleRenderException%29--tf3307206.html#a9199115
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-15 Thread Lisa

This is super helpful and will look into it.  Ideally what I am looking for
is to pass a parameter along with each  (bound?)

Thanks


L



fastbob wrote:
> 
> Lisa,
> Something I found helpful for passing parameters to beans from JSF is the
> following link:  http://balusc.xs4all.nl/srv/dev-jep-com.html
> http://balusc.xs4all.nl/srv/dev-jep-com.html 
> 
> fastbob
> 
> 
> Lisa wrote:
>> 
>> We need to build a pulldowns (select list boxes) on the front end (select
>> lists, check boxes etc) and do not want to write a getter for each one. 
>> We simply want a generic method that we call throughout the application
>> called "getList(String s).
>> 
>> String s is a key into a types table that, when used for the query will
>> return everything needed in the list.
>> 
>> I thought this would be the simplest approach instead of having to write
>> a method that sets a string and passes it to a function that builds
>> List.
>> 
>> It would be better to simply have the String s in the XHTML, that calls 1
>> method (used throughout the app) that will build and return the
>> List based on the string (param) in the XHTML.
>> 
>> at first look it seems like  would work but I can not seem to
>> get this to work to pass any params to my backing bean.
>> 
>> 
>> L
>> 
>> 
>> 
>> Simon Kitching-3 wrote:
>>> 
>>> I don't think you're going to be able to do this; it isn't natural JSF 
>>> style. JSF el expressions don't support parameters.
>>> 
>>> You should look at other approaches to resolve whatever your problem is.
>>> 
>>> Regards,
>>> 
>>> Simon
>>> 
>>> Lisa wrote:
>>>> 
>>>> I looked at the docs on this tag  but there were no examples
>>>> on how
>>>> to pass a String param to the getters in the value="#{bean.getMethod}"
>>>> 
>>>> I want to pass a string to getMethod(String s) listed above.  If you
>>>> have
>>>> any specific examples on how to do this, it would be greatly
>>>> appreciated.
>>>> 
>>>> 
>>>> L
>>>> 
>>>> 
>>>> 
>>>> Lisa wrote:
>>>>> I want to build a SelectItem list by calling a method in my backing
>>>>> bean,
>>>>> but I want to be able to pass the backing bean a String (from the
>>>>> XHTML).
>>>>>
>>>>>
>>>>> ---
>>>>> This is what I currently have:
>>>>>
>>>>> >>>> rendered="#{carBean.listMode}"
>>>>> id="idSelectVehicleType"
>>>>> value="#{carBean.vehicleType}"
>>>>> size="1">
>>>>>
>>>>> >>>> value="#{carBean.vehicleTypeList}"/>
>>>>> 
>>>>>
>>>>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>>>>>
>>>>> ---
>>>>> So I want to change the method signature to accept a String like so:
>>>>>
>>>>>   CarBean.getVehicleTypeList(String s)
>>>>>
>>>>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String
>>>>> s).
>>>>>
>>>>> Is this possible?
>>>>>   value="#{carBean.vehicleTypeList("myString")}"
>>>>>
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>> Lisa
>>>>>
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8991742
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa

Where/ how is "map" defined?

thanks


L



krg9263 wrote:
> 
> 
> Not sure if this will work with
> 
>  
>   but you could try it this way. I have done this with a commandLink.
> 
>  action="go_Test" actionListener="#{testList.execute}">
> 
> 
> 
> Inside bean.
> 
> public void execute(ActionEvent event) {
> queryTable = (String) map.get("queryTableParam");
> //then call  whatever you need to do
> this.go();
> 
> }
> 
> 
> 
> 
> 
> Lisa wrote:
>> I tried the following but could not get it to work:
>>
>>   
>> 
>> 
>> 
>> 
>>
>> And in the BB to retrieve the codeType I have the following method that
>> is
>> called:
>>
>> private String getCodeType()
>> {
>> String codeType = (String)FacesContext.getCurrentInstance()
>>
>> .getExternalContext().getRequestParameterMap().get("codeType");
>>
>>
>> return codeType;
>> }
>>
>> ---
>> When I look at the value for "codeType" it is always null.  getCodeType
>> is
>> called by 
>>
>>public List getSelectList() {
>>  // query from types table here and pass codeType (call to
>> getCodeType()
>> which uses faces context
>> // to get a param set in the XHTML.
>>} 
>>
>>
>>
>>
>>
>>
>> sahil wrote:
>>   
>>> you can use the  tag to pass a parameter in jsf.
>>>
>>> although I havent tried it in jsf, but i use it in jboss-seam. I think
>>> it
>>> will work.
>>>
>>>
>>> Lisa wrote:
>>> 
>>>> I want to build a SelectItem list by calling a method in my backing
>>>> bean,
>>>> but I want to be able to pass the backing bean a String (from the
>>>> XHTML).
>>>>
>>>>
>>>> ---
>>>> This is what I currently have:
>>>>
>>>> >>> rendered="#{carBean.listMode}"
>>>> id="idSelectVehicleType"
>>>> value="#{carBean.vehicleType}"
>>>> size="1">
>>>>
>>>> >>> value="#{carBean.vehicleTypeList}"/>
>>>> 
>>>>
>>>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>>>>
>>>> ---
>>>> So I want to change the method signature to accept a String like so:
>>>>
>>>>   CarBean.getVehicleTypeList(String s)
>>>>
>>>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).
>>>>
>>>> Is this possible?
>>>>   value="#{carBean.vehicleTypeList("myString")}"
>>>>
>>>>
>>>> thanks
>>>>
>>>>
>>>> Lisa
>>>>
>>>>   
>>> 
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8954785
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa

Actually the data to build the select list is stored in a database.  We have
a function that when passed a column value (the code type) will return a
List.  So the only thing I need to accomplish is to get this
String (the codeType) to the method from the XHTML (do not want to put in
the backing bean).

thanks

L




Simon Kitching-3 wrote:
> 
> Ok, I see what you are trying to do.
> 
> I believe what you want to be able to specify that a particular 
> f:selectItems tag gets its data from one part of your reference data and 
> a different f:selectItems tag gets its data from a different part of 
> your reference data without having to write custom methods to access the 
> various reference data parts.
> 
> If this is the case then f:param is definitely not what you are looking
> for.
> 
> JSF el expressions support properties that are of type Map. So if
>#{carBean.refdata}
> is an object of type Map then
>#{carBean.refdata.vehicleTypes}
> will call
>carBean.getRefdata().get("vehicleTypes");
> 
> In other words, if you store your reference data into a real map, or 
> alternately write a custom class that implements the Map interface, then 
> you should be able to do what you want.
> 
> If this isn't sufficient for you for some reason then you *can* persuade 
>   MyFaces to allow functions in EL expressions. However the code will be 
> MyFaces-specific. In short, you need to write a class that implements 
> javax.servlet.jsp.el.FunctionMapper, then subclass 
> org.apache.myfaces.el.ValueBindingImpl to register an instance of your 
> custom FunctionMapper. Much better to avoid that if you can.
> 
> Regards,
> 
> Simon
> 
> Lisa wrote:
>> We need to build a pulldowns (select list boxes) on the front end (select
>> lists, check boxes etc) and do not want to write a getter for each one. 
>> We
>> simply want a generic method that we call throughout the application
>> called
>> "getList(String s).
>> 
>> String s is a key into a types table that, when used for the query will
>> return everything needed in the list.
>> 
>> I thought this would be the simplest approach instead of having to write
>> a
>> method that sets a string and passes it to a function that builds
>> List.
>> 
>> It would be better to simply have the String s in the XHTML, that calls 1
>> method (used throughout the app) that will build and return the
>> List based on the string (param) in the XHTML.
>> 
>> at first look it seems like  would work but I can not seem to
>> get
>> this to work to pass any params to my backing bean.
>> 
>> 
>> L
>> 
>> 
>> 
>> Simon Kitching-3 wrote:
>>> I don't think you're going to be able to do this; it isn't natural JSF 
>>> style. JSF el expressions don't support parameters.
>>>
>>> You should look at other approaches to resolve whatever your problem is.
>>>
>>> Regards,
>>>
>>> Simon
>>>
>>> Lisa wrote:
>>>> I looked at the docs on this tag  but there were no examples
>>>> on
>>>> how
>>>> to pass a String param to the getters in the value="#{bean.getMethod}"
>>>>
>>>> I want to pass a string to getMethod(String s) listed above.  If you
>>>> have
>>>> any specific examples on how to do this, it would be greatly
>>>> appreciated.
>>>>
>>>>
>>>> L
>>>>
>>>>
>>>>
>>>> Lisa wrote:
>>>>> I want to build a SelectItem list by calling a method in my backing
>>>>> bean,
>>>>> but I want to be able to pass the backing bean a String (from the
>>>>> XHTML).
>>>>>
>>>>>
>>>>> ---
>>>>> This is what I currently have:
>>>>>
>>>>> >>>> rendered="#{carBean.listMode}"
>>>>> id="idSelectVehicleType"
>>>>> value="#{carBean.vehicleType}"
>>>>> size="1">
>>>>>
>>>>> >>>> value="#{carBean.vehicleTypeList}"/>
>>>>> 
>>>>>
>>>>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>>>>>
>>>>> ---
>>>>> So I want to change the method signature to accept a String like so:
>>>>>
>>>>>   CarBean.getVehicleTypeList(String s)
>>>>>
>>>>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String
>>>>> s).
>>>>>
>>>>> Is this possible?
>>>>>   value="#{carBean.vehicleTypeList("myString")}"
>>>>>
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>> Lisa
>>>>>
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8954761
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa

I tried the following but could not get it to work:

 





And in the BB to retrieve the codeType I have the following method that is
called:

private String getCodeType()
{
String codeType = (String)FacesContext.getCurrentInstance()
   
.getExternalContext().getRequestParameterMap().get("codeType");


return codeType;
}

---
When I look at the value for "codeType" it is always null.  getCodeType is
called by

   public List getSelectList() {
 // query from types table here and pass codeType (call to getCodeType()
which uses faces context
// to get a param set in the XHTML.
   } 



Simon Kitching-3 wrote:
> 
> I don't think you're going to be able to do this; it isn't natural JSF 
> style. JSF el expressions don't support parameters.
> 
> You should look at other approaches to resolve whatever your problem is.
> 
> Regards,
> 
> Simon
> 
> Lisa wrote:
>> 
>> I looked at the docs on this tag  but there were no examples on
>> how
>> to pass a String param to the getters in the value="#{bean.getMethod}"
>> 
>> I want to pass a string to getMethod(String s) listed above.  If you have
>> any specific examples on how to do this, it would be greatly appreciated.
>> 
>> 
>> L
>> 
>> 
>> 
>> Lisa wrote:
>>> I want to build a SelectItem list by calling a method in my backing
>>> bean,
>>> but I want to be able to pass the backing bean a String (from the
>>> XHTML).
>>>
>>>
>>> ---
>>> This is what I currently have:
>>>
>>> >> rendered="#{carBean.listMode}"
>>> id="idSelectVehicleType"
>>> value="#{carBean.vehicleType}"
>>> size="1">
>>>
>>> >> value="#{carBean.vehicleTypeList}"/>
>>> 
>>>
>>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>>>
>>> ---
>>> So I want to change the method signature to accept a String like so:
>>>
>>>   CarBean.getVehicleTypeList(String s)
>>>
>>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).
>>>
>>> Is this possible?
>>>   value="#{carBean.vehicleTypeList("myString")}"
>>>
>>>
>>> thanks
>>>
>>>
>>> Lisa
>>>
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8953541
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa

I tried the following but could not get it to work:

  





And in the BB to retrieve the codeType I have the following method that is
called:

private String getCodeType()
{
String codeType = (String)FacesContext.getCurrentInstance()
   
.getExternalContext().getRequestParameterMap().get("codeType");


return codeType;
}

---
When I look at the value for "codeType" it is always null.  getCodeType is
called by 

   public List getSelectList() {
 // query from types table here and pass codeType (call to getCodeType()
which uses faces context
// to get a param set in the XHTML.
   } 






sahil wrote:
> 
> you can use the  tag to pass a parameter in jsf.
> 
> although I havent tried it in jsf, but i use it in jboss-seam. I think it
> will work.
> 
> 
> Lisa wrote:
>> 
>> I want to build a SelectItem list by calling a method in my backing bean,
>> but I want to be able to pass the backing bean a String (from the XHTML).
>> 
>> 
>> ---
>> This is what I currently have:
>> 
>> > rendered="#{carBean.listMode}"
>> id="idSelectVehicleType"
>> value="#{carBean.vehicleType}"
>> size="1">
>> 
>> > value="#{carBean.vehicleTypeList}"/>
>> 
>> 
>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>> 
>> ---
>> So I want to change the method signature to accept a String like so:
>> 
>>   CarBean.getVehicleTypeList(String s)
>> 
>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).
>> 
>> Is this possible?
>>   value="#{carBean.vehicleTypeList("myString")}"
>> 
>> 
>> thanks
>> 
>> 
>> Lisa
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8953454
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa

We need to build a pulldowns (select list boxes) on the front end (select
lists, check boxes etc) and do not want to write a getter for each one.  We
simply want a generic method that we call throughout the application called
"getList(String s).

String s is a key into a types table that, when used for the query will
return everything needed in the list.

I thought this would be the simplest approach instead of having to write a
method that sets a string and passes it to a function that builds
List.

It would be better to simply have the String s in the XHTML, that calls 1
method (used throughout the app) that will build and return the
List based on the string (param) in the XHTML.

at first look it seems like  would work but I can not seem to get
this to work to pass any params to my backing bean.


L



Simon Kitching-3 wrote:
> 
> I don't think you're going to be able to do this; it isn't natural JSF 
> style. JSF el expressions don't support parameters.
> 
> You should look at other approaches to resolve whatever your problem is.
> 
> Regards,
> 
> Simon
> 
> Lisa wrote:
>> 
>> I looked at the docs on this tag  but there were no examples on
>> how
>> to pass a String param to the getters in the value="#{bean.getMethod}"
>> 
>> I want to pass a string to getMethod(String s) listed above.  If you have
>> any specific examples on how to do this, it would be greatly appreciated.
>> 
>> 
>> L
>> 
>> 
>> 
>> Lisa wrote:
>>> I want to build a SelectItem list by calling a method in my backing
>>> bean,
>>> but I want to be able to pass the backing bean a String (from the
>>> XHTML).
>>>
>>>
>>> ---
>>> This is what I currently have:
>>>
>>> >> rendered="#{carBean.listMode}"
>>> id="idSelectVehicleType"
>>> value="#{carBean.vehicleType}"
>>> size="1">
>>>
>>> >> value="#{carBean.vehicleTypeList}"/>
>>> 
>>>
>>> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
>>>
>>> ---
>>> So I want to change the method signature to accept a String like so:
>>>
>>>   CarBean.getVehicleTypeList(String s)
>>>
>>> and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).
>>>
>>> Is this possible?
>>>   value="#{carBean.vehicleTypeList("myString")}"
>>>
>>>
>>> thanks
>>>
>>>
>>> Lisa
>>>
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8953310
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-13 Thread Lisa


I looked at the docs on this tag  but there were no examples on how
to pass a String param to the getters in the value="#{bean.getMethod}"

I want to pass a string to getMethod(String s) listed above.  If you have
any specific examples on how to do this, it would be greatly appreciated.


L



Lisa wrote:
> 
> I want to build a SelectItem list by calling a method in my backing bean,
> but I want to be able to pass the backing bean a String (from the XHTML).
> 
> 
> ---
> This is what I currently have:
> 
>  rendered="#{carBean.listMode}"
> id="idSelectVehicleType"
> value="#{carBean.vehicleType}"
> size="1">
> 
>  value="#{carBean.vehicleTypeList}"/>
> 
> 
> where vehicleTypeList is a method in CarBean.getVehicleTypeList()
> 
> ---
> So I want to change the method signature to accept a String like so:
> 
>   CarBean.getVehicleTypeList(String s)
> 
> and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).
> 
> Is this possible?
>   value="#{carBean.vehicleTypeList("myString")}"
> 
> 
> thanks
> 
> 
> Lisa
> 

-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8952115
Sent from the MyFaces - Users mailing list archive at Nabble.com.



selectList - how to pass a parameter to backing bean method from XHTML?

2007-02-12 Thread Lisa

I want to build a SelectItem list by calling a method in my backing bean, but
I want to be able to pass the backing bean a String (from the XHTML).


---
This is what I currently have:






where vehicleTypeList is a method in CarBean.getVehicleTypeList()

---
So I want to change the method signature to accept a String like so:

  CarBean.getVehicleTypeList(String s)

and in the XHTML pass String s to CarBean.getVehicleTypeList(String s).

Is this possible?
  value="#{carBean.vehicleTypeList("myString")}"


thanks


Lisa
-- 
View this message in context: 
http://www.nabble.com/selectList---how-to-pass-a-parameter-to-backing-bean-method-from-XHTML--tf3218841.html#a8939143
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: and image of button - how not to hard code

2007-02-12 Thread Lisa

But this requires hard coding of the path to spacer.gif.  What we are trying
to do is implement skins so that the user can change the look and feel of
the web page and may decide to choose bigger buttons which may require a
change to spacer.gif(?).  Not really sure.  will experiment with this and
see what happens.

thanks for the help.

L


Cooper, Stephen-2 wrote:
> 
> Here's an idea:
>  Define a CSS class, say 'delete'
> .delete {
>   background-image: url('path-to-image');
>   background-repeat: none;
>   background-position: center;
> }
> 
> Next, 
> Make your command link have the class of 'delete', and put a 1x1
> transparent gif image, sized to the correct size, inside the commandLink
> e.g.  spacer.gif 
> 
> Now, depending on which CSS you include, or if the CSS is actually a
> JSP, you can include different images for the delete image.  E.g. a
> trash can or an X.
> 
> Good luck!
> Coop
> (p.s. I made the JSF stuff up on the fly, so the syntax may be wrong.
> The CSS I took from my existing JSP based application)
> 
> -Original Message-
> From: Lisa [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 08, 2007 11:21 PM
> To: users@myfaces.apache.org
> Subject: Re:  and image of button - how not to hard code
> 
> 
> anyone have any ideas on this one?  How can an image be configured as a
> resource in one location and referred to by  the
> application so that it is hardcoded inonly one place.
> 
> Is there any way to specify the img file location in a CSS and refer to
> it
> in the  
> thanks
> 
> L
> 
> 
> 
> Lisa wrote:
>> 
>> I have a commandLink below that has a reference to a hard coded path
> to
>> button image.  Is there a way to simply specify a resource, where that
>> resource has the hard coded path to the button?
>> 
>> If so, where are resources like this typically configured?
>> 
>> Is there a better way to write the  below so that the 3
>> hard coded paths are gone?
>> 
>> thanks
>> 
>> ---
>> > actionListener="#{myBean.addData}"
>> id="btnAdd"
>>
>> onmouseover="BtnAddImg.src='../../images/AddButtonBlue.gif'; return
> true;"
>>
>> onmouseout="BtnAddImg.src='../../images/AddButtonSilver.gif'; return
>> true;"
>> >
>>
> ../../images/Pt-Add-Button-Silver.gif 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/%3Ct%3AcommandLink%3E-and-image-of-button---how-no
> t-to-hard-code-tf3157766.html#a8881008
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Ct%3AcommandLink%3E-and-image-of-button---how-not-to-hard-code-tf3157766.html#a8939041
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: and image of button - how not to hard code

2007-02-08 Thread Lisa

anyone have any ideas on this one?  How can an image be configured as a
resource in one location and referred to by  
> I have a commandLink below that has a reference to a hard coded path to
> button image.  Is there a way to simply specify a resource, where that
> resource has the hard coded path to the button?
> 
> If so, where are resources like this typically configured?
> 
> Is there a better way to write the  below so that the 3
> hard coded paths are gone?
> 
> thanks
> 
> ---
>  actionListener="#{myBean.addData}"
> id="btnAdd"
>
> onmouseover="BtnAddImg.src='../../images/AddButtonBlue.gif'; return true;"
>
> onmouseout="BtnAddImg.src='../../images/AddButtonSilver.gif'; return
> true;"
> >
>  ../../images/Pt-Add-Button-Silver.gif 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Ct%3AcommandLink%3E-and-image-of-button---how-not-to-hard-code-tf3157766.html#a8881008
Sent from the MyFaces - Users mailing list archive at Nabble.com.



managed-bean - request scope question

2007-02-08 Thread Lisa

As I understand it a managed-bean that is request scope will get instantiated
each time (a request is submitted) and then destroyed (or sent for garbage
collection) after the response.

I put some print statements in the no arg constructor and see that it is
instantiated (and all setters called with Spring injection) the first time
the page is requested, but then when I hit other buttons on the page
(subsequent requests), I do not see the bean re-instantiated (and setters
called) etc.

any ideas?  I have seen some beans that get instantiated on every request,
but the few that I am working with don't.  I have checked my config file and
it is indeed in "request" scope.

It acts like it is in session scope or something.  I should see the no-arg
constructor called each time for a request.

thanks


L
-- 
View this message in context: 
http://www.nabble.com/managed-bean---request-scope-question-tf3198755.html#a8880992
Sent from the MyFaces - Users mailing list archive at Nabble.com.



JSF and Spring 2.0

2007-02-08 Thread Lisa

Currently we are using JSF IoC container but need some features in Spring 2.0
IoC.  Will  continue to work if we switch to Spring 2.0 to
manage the backing beans at a request scope level?

thanks

L
-- 
View this message in context: 
http://www.nabble.com/JSF-%3Ct%3AsaveState%3E-and-Spring-2.0-tf3195654.html#a8873081
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Detecting which phase being processed in backing bean

2007-02-06 Thread Lisa

Is there a way to detect which phase is currently being executed inside the
backing bean.  Having trouble with things and would simply like to see the
status of things at the beginning and end of each of the six JSF phases.


thanks


L
-- 
View this message in context: 
http://www.nabble.com/Detecting-which-phase-being-processed-in-backing-bean-tf3183519.html#a8835525
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: When does saveState occur?

2007-02-06 Thread Lisa

The  looks like this:



---
JSF config file (for this managed bean) looks like this:

---
   
address
com.disney.bb.address
request

---

Will write a test case so I can actually see the values during during
instantiation (constructor), during setters and just after the setters.

thanks

L



Simon Kitching-3 wrote:
> 
> Lisa wrote:
>> I'm not seeing that the values are restored at the beginning.  I must
>> have
>> something wrong.
>> 
>> I have a BB that has 3 setters called after instantiation.  I need the
>> saveState restore to happen before these setters are called but it looks
>> like the values are being restored much later.
>> 
>> Is there a way to have the state restored before the setters are called?
> 
> The t:saveState bean does its work in the restore-view phase. It will 
> therefore definitely happen before any value-binding expressions on JSF 
> components are evaluated.
> 
> If you are seeing normal setters called during the "update model" phase 
> but t:saveState hasn't executed to restore the saved data then you have 
> something set up wrong - ie t:saveState is not being processed at all, 
> or is updating some variable other than the one you are expecting.
> 
> Are you definitely setting the value attribute to a 
> value-binding-expression, ie
>
> not
>
> ?
> 
> Regards,
> 
> Simon
> 
> 

-- 
View this message in context: 
http://www.nabble.com/When-does-saveState-occur--tf3177625.html#a8835162
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: When does saveState occur?

2007-02-06 Thread Lisa

no, just Java types, String, boolean.  Other objects needed are singletons
managed/injected by Spring.

thanks

L


Werner Punz-2 wrote:
> 
> Lisa schrieb:
>> I'm not seeing that the values are restored at the beginning.  I must
>> have
>> something wrong.
>> 
>> I have a BB that has 3 setters called after instantiation.  I need the
>> saveState restore to happen before these setters are called but it looks
>> like the values are being restored much later.
>> 
>> Is there a way to have the state restored before the setters are called?
>> 
>> thanks
>> 
>> L
>> 
> Lisa is there something in your referenced bean in t:saveState which is
> not serializable, complex values which are put into savestate are
> serialized.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/When-does-saveState-occur--tf3177625.html#a8835075
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: JSF lifecyle - managed-bean

2007-02-06 Thread Lisa

I have been to the Spring website but am a little lost on how to convert from
JSF managed-bean (what we have implemented now) to a Spring facility.  any
pointers to documentation would be appreciated.

thanks


L



Martin Marinschek wrote:
> 
> From my experience: don't use jsf-spring-library, use Spring 2.0 directly
> instead.
> 
> Jsf-spring is known to cause class-loader issues in some containers, e.g.
> Websphere.
> 
> In Spring 2.0, you can define managed beans with session and request-scope
> perfectly!
> 
> regards,
> 
> Martin
> 
> On 2/5/07, Beelen, Marco <[EMAIL PROTECTED]> wrote:
>>
>> Hello Lisa,
>>
>> I'm solving that problem by implementing the InitializingBean-interface
>> of Spring on my managed bean and use the jsf-spring-library (
>> http://jsf-spring.sourceforge.net/ ) to make sure that the method is
>> being called:
>>
>> My faces-context.xml contains:
>>
>> 
>> com.sun.facelets.FaceletViewHandler
>>
>>
>> org.springframework.web.jsf.DelegatingVariableResolve
>> r
>> 
>>
>> And in the web.xml I added:
>>
>> 
>> 
>>
>> de.mindmatters.faces.spring.context.ContextLoaderListener
>> 
>> 
>>
>>
>> With kind regards,
>> Marco
>>
>>
>> -Original Message-
>> From: Lisa [mailto:[EMAIL PROTECTED]
>> Sent: maandag 5 februari 2007 6:44
>> To: users@myfaces.apache.org
>> Subject: JSF lifecyle - managed-bean
>>
>>
>> Is there a way to automatically call an init() method after all setters
>> have
>> been called on a managed-bean?  I am looking for something I can put in
>> the
>> .xml config file or an interface that I can extend.
>>
>> Spring has this facility.  We are using Spring for most of the framework
>> but
>> using JSF managed-bean facility for all backing beans.
>>
>>
>> thanks
>>
>>
>> L
>> --
>> View this message in context:
>> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
>> 8
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>> --
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
>> and in Japan, as Banyu - direct contact information for affiliates is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received this
>> message in error, please notify us immediately by reply e-mail and then
>> delete it from your system.
>>
>>
>> --
>>
> 
> 
> 
> -- 
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8829877
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: When does saveState occur?

2007-02-05 Thread Lisa

I'm not seeing that the values are restored at the beginning.  I must have
something wrong.

I have a BB that has 3 setters called after instantiation.  I need the
saveState restore to happen before these setters are called but it looks
like the values are being restored much later.

Is there a way to have the state restored before the setters are called?

thanks

L


Werner Punz wrote:
> 
> Lisa schrieb:
>> If I have  in my bean.  On a managed bean, when does
>> saveState
>> (restoring of values) actually occur?
>> 
>> 1.  before the setters listed in the managed-bean?
>> 2.  Immediately after the setters in the managed bean?
>> 3.  Some other time?
>> 
> Pretty much at the and of the lifecycle.
> 
> the restore happens at the beginning.
> So the values are first restored, then the request values are applied
> after that all the work is done in the other phase, then it is saved
> again.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/When-does-saveState-occur--tf3177625.html#a8820377
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Confusion with

2007-02-05 Thread Lisa

Confusion with 

I have inherited some code that does not work and it makes heavy use of 
.  I can find little documentation on this that tells me at a
very
low level what is going on (exactly when setters/getters are called)

If I have an  inside a 

thanks



 ../../images/Save-Button-Silver.gif 






-- 
View this message in context: 
http://www.nabble.com/Confusion-with-%3Cf%3AsetProperty%3E-tf3177940.html#a8818381
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: JSF lifecyle - managed-bean

2007-02-05 Thread Lisa

We are using Spring in other parts of the framework but not on our Backing
Beans.  This would take some rework to use Spring on the front-end beans. 
Also upgrading to Spring 2.0 would take some work as well and we are already
behind.

I am aware that you can do this in Spring but could not find an easy way to
do it in JSF.

Thanks


L



Beelen, Marco wrote:
> 
> Hello Lisa,
> 
> I'm solving that problem by implementing the InitializingBean-interface
> of Spring on my managed bean and use the jsf-spring-library (
> http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> being called:
> 
> My faces-context.xml contains:
> 
> 
>   com.sun.facelets.FaceletViewHandler
> 
>   
> org.springframework.web.jsf.DelegatingVariableResolve
> r
> 
>   
> And in the web.xml I added: 
> 
> 
>   
>   
> de.mindmatters.faces.spring.context.ContextLoaderListener
>   
> 
> 
> 
> With kind regards,
>   Marco
> 
> 
> -Original Message-
> From: Lisa [mailto:[EMAIL PROTECTED] 
> Sent: maandag 5 februari 2007 6:44
> To: users@myfaces.apache.org
> Subject: JSF lifecyle - managed-bean
> 
> 
> Is there a way to automatically call an init() method after all setters
> have
> been called on a managed-bean?  I am looking for something I can put in
> the
> .xml config file or an interface that I can extend.
> 
> Spring has this facility.  We are using Spring for most of the framework
> but
> using JSF managed-bean facility for all backing beans.
> 
> 
> thanks
> 
> 
> L
> -- 
> View this message in context:
> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> 8
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 
> 
> --
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> and in Japan, as Banyu - direct contact information for affiliates is 
> available at http://www.merck.com/contact/contacts.html) that may be 
> confidential, proprietary copyrighted and/or legally privileged. It is 
> intended solely for the use of the individual or entity named on this 
> message. If you are not the intended recipient, and have received this 
> message in error, please notify us immediately by reply e-mail and then 
> delete it from your system.
> 
> --
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8817399
Sent from the MyFaces - Users mailing list archive at Nabble.com.



When does saveState occur?

2007-02-05 Thread Lisa

If I have  in my bean.  On a managed bean, when does saveState
(restoring of values) actually occur?

1.  before the setters listed in the managed-bean?
2.  Immediately after the setters in the managed bean?
3.  Some other time?

thanks


L
-- 
View this message in context: 
http://www.nabble.com/When-does-saveState-occur--tf3177625.html#a8817361
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: JSF lifecyle - managed-bean

2007-02-04 Thread Lisa

I have had Shale in mind for some time now and found some reference to this
feature while googling, but unfortunately in this release we can not make
any major improvements (and integrate Shale), but this is yet another reason
I can put on my list so that management will allow time.

thanks


L


craigmcc wrote:
> 
> On 2/4/07, Lisa <[EMAIL PROTECTED]> wrote:
>>
>>
>> Is there a way to automatically call an init() method after all setters
>> have
>> been called on a managed-bean?  I am looking for something I can put in
>> the
>> .xml config file or an interface that I can extend.
>>
>> Spring has this facility.  We are using Spring for most of the framework
>> but
>> using JSF managed-bean facility for all backing beans.
> 
> 
> The "view controller" feature of the Shale framework[1] supports this use
> case.  The init() callback is called after the view has been restored (and
> after any managed property setters have been called), but before the main
> part of the lifecycle proceeds.  If you want to initialize things only
> when
> processing a postback, and not on a get, use the preprocess() callback
> instead.  There are also prerender() and destroy() callbacks, for pulling
> data you need to render from your model, and cleaning up after rendering,
> respectively.
> 
> thanks
>>
>>
>> L
>> --
>> View this message in context:
>> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> Craig McClanahan
> 
> [1] http://shale.apache.org/shale-view/index.html
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8802245
Sent from the MyFaces - Users mailing list archive at Nabble.com.



JSF lifecyle - managed-bean

2007-02-04 Thread Lisa

Is there a way to automatically call an init() method after all setters have
been called on a managed-bean?  I am looking for something I can put in the
.xml config file or an interface that I can extend.

Spring has this facility.  We are using Spring for most of the framework but
using JSF managed-bean facility for all backing beans.


thanks


L
-- 
View this message in context: 
http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
Sent from the MyFaces - Users mailing list archive at Nabble.com.



ActionListener gets executed but Action does not

2007-02-04 Thread Lisa

I have a button that is rendered based on a boolean variable.  The button (a
save button) gets rendered on the page.  I enter information into the form
and click the [Save] button.

I then get an exception in my browser:

---
javax.servlet.ServletException: Error calling action method of component
with id idMainAddressForm:btnSave
javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)

org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)

root cause

javax.faces.FacesException: Error calling action method of component with id
idMainAddressForm:btnSave

org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
javax.faces.component.UICommand.broadcast(UICommand.java:106)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)

org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)

org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)

org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)

note 

---

I go to my xhtml file and check the spelling and syntax of the action method
(as well as the backing bean syntax and correctness).  Everything is
correct.  I put print statements at the beginning and end of my
ActionListener and it gets executed completely all the way through.

For the life of me, I can not figure out why the Action method does not get
executed.  It has the correct signature:  public String mainViewAction() {
 }

My xhtml button code looks like this:
---

 ../../images/SaveButton-Silver.gif 


--
any ideas?
-- 
View this message in context: 
http://www.nabble.com/ActionListener-gets-executed-but-Action-does-not-tf3172510.html#a8800759
Sent from the MyFaces - Users mailing list archive at Nabble.com.



and image of button - how not to hard code

2007-02-01 Thread Lisa

I have a commandLink below that has a reference to a hard coded path to
button image.  Is there a way to simply specify a resource, where that
resource has the hard coded path to the button?

If so, where are resources like this typically configured?

Is there a better way to write the  below so that the 3 hard
coded paths are gone?

thanks

---

 ../../images/Pt-Add-Button-Silver.gif 

-- 
View this message in context: 
http://www.nabble.com/%3Ct%3AcommandLink%3E-and-image-of-button---how-not-to-hard-code-tf3157766.html#a8757754
Sent from the MyFaces - Users mailing list archive at Nabble.com.



What is the purpose of

2007-01-16 Thread Lisa

What is the purpose of   will it show every error or any JSF
errors at every phase? or is it for use ONLY by the app developer to put
helpful messages there for the front end to display and use?

I am getting an error during one phase but there are no error messages
displayed using  making me think the latter is true or that
 is not working.  I need to know which.
-- 
View this message in context: 
http://www.nabble.com/What-is-the-purpose-of-%3Ch%3Amessages-%3E-tf3022292.html#a8394821
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Apply Request Phase Error : : facestrace : no debug info

2007-01-15 Thread Lisa

Ok so I have facestrace working and it tells me there is an error in the
"Apply Request Phase" but does not tell me what that error is and there is
no indication in the tomcat log.

I have used  but there is nothing printed out.  What is the
best way to find out what the problem is here.  Not sure why 
does not spit out anything.
-- 
View this message in context: 
http://www.nabble.com/Apply-Request-Phase-Error-%3A-%3Ch%3Amessages-%3E-%3A-facestrace-%3A-no-debug-info-tf3018142.html#a8382086
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Anyone get facestrace working?

2007-01-15 Thread Lisa

OK, got it working.  The last thing I needed was to add the taglib to my
web.xml but I made a mistake there.
all working now.  cool!!



Lisa wrote:
> 
> I came onto a project that has a lot of problems so decided to use
> facestrace to see if I could debug some things. 
> 
> We are using Maven2 so I put the facestrace.jar in our Subversion
> repository.  I see that it gets downloaded to
> $home/.m2/repository/myfaces/facestrace/0.8.1_SNAPSHOT/ and that the jar
> is there.
> 
> I put the tag in an .xhtml file, I put the servlet-mapping in web.xml.
> 
> web.xml now looks like this.
> 
> 
> Faces Servlet
> javax.faces.webapp.FacesServlet
> 1
> 
> 
> 
> 
> 
> Faces Servlet
> *.jsf
> 
> 
> 
> 
> Faces Servlet
> /faces/*
> 
> 
> Now what?
> 
> 
> I am accessing my main web application (login page) like so:
> 
> http://localhost:8080/jspShare/web/startup/Start.jsf
> 
> I put  into Start.jsf but do not see anything.  What I am
> missing?  How is the facestrace info accessed?
> 
> Thanks
> 
> 
> Lisa
> 

-- 
View this message in context: 
http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8380446
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Anyone get facestrace working?

2007-01-15 Thread Lisa

I did all of this (see original post) but have not gotten it to work.  We are
using Facelets/MyFaces and not JSP.

In XHTML files, am including like this:
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:t="http://myfaces.apache.org/tomahawk";
xmlns:ft="http://sourceforge.net/projects/facestrace";>

I created a facestrace.taglib.xml and dropped it into WEB-INF and updated my
web.xml and restarted tomcat but still no luck.  I think I am missing
something simple.  Should something appear on the page or is there another
URL that needs to be referenced with /faces/ in it to see the trace?

thanks for your help

Lisa



yigit darcin-2 wrote:
> 
> Hi,
> 
> if you look at  http://facestrace.sourceforge.net/main/gettingStarted.html
> 
> you just need to add taglib to your page:
> 
> <%@ taglib uri="http://sourceforge.net/projects/facestrace"; prefix="ft"%>
> 
> do servlet mapping as :
>  Faces Servlet
> /faces/*
> 
> 
> and lastly put the facestrace in your form as:
> 
> 
> 
> and make sure facestrace jar is in your lib folder and nothing more.
> 
> for the facelets please look at :
> 
> http://www.jroller.com/page/cagataycivici?entry=facestrace_with_facelets
> 
> Regards,
> 
> Yigit.
> 
> On 1/15/07, Mick Knutson <[EMAIL PROTECTED]> wrote:
>>
>> I have also not gotten it to work with facelets.
>>
>>
>>
>>
>>
>> On 1/15/07, Lisa <[EMAIL PROTECTED] > wrote:
>> >
>> >
>> > I came onto a project that has a lot of problems so decided to use
>> > facestrace
>> > to see if I could debug some things.
>> >
>> > We are using Maven2 so I put the facestrace.jar in our Subversion
>> > repository.  I see that it gets downloaded to
>> > $home/.m2/repository/myfaces/facestrace/0.8.1_SNAPSHOT/ and that the
>> jar
>> > is
>> > there.
>> >
>> > I put the tag in an .xhtml file, I put the servlet-mapping in web.xml.
>> >
>> > web.xml now looks like this.
>> >
>> > 
>> > Faces Servlet
>> > javax.faces.webapp.FacesServlet
>> > 1
>> > 
>> >
>> > 
>> > 
>> > 
>> > Faces Servlet
>> > *.jsf
>> > 
>> >
>> > 
>> > 
>> > Faces Servlet
>> > /faces/*
>> > 
>> >
>> > Now what?
>> >
>> >
>> > I am accessing my main web application (login page) like so:
>> >
>> > http://localhost:8080/jspShare/web/startup/Start.jsf
>> >
>> > I put  into Start.jsf but do not see anything.  What I am
>> > missing?  How is the facestrace info accessed?
>> >
>> > Thanks
>> >
>> >
>> > Lisa
>> > --
>> > View this message in context:
>> http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8378666
>> >
>> > Sent from the MyFaces - Users mailing list archive at
>> Nabble.com<http://nabble.com/>
>> > .
>> >
>> >
>>
>>
>> --
>> Thanks
>>
>> DJ MICK
>>
>> (Mick Knutson)
>> http://www.djmick.com
>> http://www.myspace.com/djmick_dot_com
>> http://www.thumpradio.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8380272
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Anyone get facestrace working?

2007-01-15 Thread Lisa

I came onto a project that has a lot of problems so decided to use facestrace
to see if I could debug some things. 

We are using Maven2 so I put the facestrace.jar in our Subversion
repository.  I see that it gets downloaded to
$home/.m2/repository/myfaces/facestrace/0.8.1_SNAPSHOT/ and that the jar is
there.

I put the tag in an .xhtml file, I put the servlet-mapping in web.xml.

web.xml now looks like this.


Faces Servlet
javax.faces.webapp.FacesServlet
1





Faces Servlet
*.jsf




Faces Servlet
/faces/*


Now what?


I am accessing my main web application (login page) like so:

http://localhost:8080/jspShare/web/startup/Start.jsf

I put  into Start.jsf but do not see anything.  What I am
missing?  How is the facestrace info accessed?

Thanks


Lisa
-- 
View this message in context: 
http://www.nabble.com/Anyone-get-facestrace-working--tf3017036.html#a8378666
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: problems (not working / have tried everything)

2007-01-15 Thread Lisa

I put two methods in my BB that I understand should be called during the
serialization/deserialization process that  invokes.  

I do not see in my Tomcat log that these two methods are being called.  Does
this mean that  is indeed not working in my case?

The methods I put in my BB that the xhtml references (which contains
 are as follows:


private void readObject(ObjectInputStream stream) 
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
System.out.println("--- Deserialization (saveState):
PtGroupAdmin.readObject() ---");
}

private void writeObject(ObjectOutputStream stream) 
throws IOException, ClassNotFoundException {
stream.defaultWriteObject();
System.out.println("--- Serialization (saveState):
PtGroupAdmin.writeObject() ---");
}


The fact that neither of these are called in my BB indicate that
 (for some reason) is not working in my project.  I am sure it
works, but there may be some odd reason (config) it is not working here.

Any help would be appreciated. I inherited this framework and am trying to
find out if it works like people think that it is.  Would putting these two
methods in my BB be in indication that the  and Serrialization
are working correctly or am I on the wrong path?



Simon Kitching-3 wrote:
> 
> SimonSays wrote:
>> So why is it that I read if you use  that the BB must
>> implement
>> Serializable?  So something that is serializable does not necessarily
>> write
>> out a file system file, but can store the file in memory as well?
> 
> There are three options for saving a component tree:
> (a) serialize it and send it to the client browser as a hidden input field
> (b) serialize it and store it into the webserver's http session
> (c) store it into the webserver's http session unserialized.
> 
> For (a) and (b), the object being saved must implement 
> java.io.Serializable, or javax.faces.component.StateHolder.
> 
> Option (c) is easier, but doesn't work with clustering, doesn't support 
> "hot restart" and doesn't allow the webserver to store a user's http 
> session on disk when memory gets short. It is therefore not the default; 
> you need to explicitly enable this mode (and I wouldn't recommend it).
> 
>> 
>> Also if STATE_SAVING_METHOD set to "server" saves a "file" the the
>> HttpSession what does STATE_SAVING_METHOD set to "client" do differently?
> 
> MyFaces never "saves a file". It just places an object (which may be a 
> serialized object [b], or an unserialized one [c]) into the http 
> session. What the webserver does with a user's http session is up to it.
> 
> You may need to read about serialization; it is NOT just about writing 
> data to files on a disk.
> 
>> 
>> how do I tell if the whole object is being serialized (state saved)
>> rather
>> than just some property in a bean?  I may hit the breakpoints but I want
>> to
>> see the actual data somewhere and watch it get restored as well.  I do
>> not
>> believe  is working but do not know why.  I need to know for
>> sure that it is not working before I go and try to find out why.
> 
> I can't think of any easy way to do this. Java serialization is pretty 
> complex, and not the sort of thing I would want to trace through. Maybe 
> you could define your own readObject/writeObject methods that just 
> delegate to the standard implementations to give yourself somewhere to 
> place your breakpoints but I've never needed to do that.
> 
> I assure you that t:saveState does work for many thousands of other 
> people out there (including myself).
> 
> Regards,
> 
> Simon
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Ct%3AsaveState%3E-problems-%28not-working---have-tried-everything%29-tf2963422.html#a8377572
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: commandLink not working ??

2007-01-14 Thread Lisa

I put a  tag at the bottom of the main page and did not see
anything as far as a validation error goes.  The listener and action are
quite simple.  Not sure why it is not hitting it.  It appears that there are
no validation errors and the Listener and Action are not being executed by
the commandLink.  We are using tomahawk 1.5


I also put in immediate="true" in the commandLink which is supposed to
bypass the validation phase, but it will still not hit the Listener or the
action.  The command link works the first time but not the second.  The
commandLink is in a popup section.  The main page code and the popup code
are in the same xhtml file.

   



The chooseGroupListener looks like this:
/**
 * Is executed when a user hits the group hyperlink to select a group.
 * Sets the selected group.
 */
public void chooseGroupListener(ActionEvent event)
{
System.err.println("--- PtGroGroup.chooseGroupListener() ---");
GroGroup o_Group = (GroGroup) Go_Table.getRowData();
o_Group.copyTo(this);
mUserInfo.setGroupId(getGroupId());
}

The Action is in another class and looks like this:
/**
 * This Action is called when a user selects a group from the popup
search results.
 *
 * @return
 */
public String mainScreenAction() throws Exception
{
System.err.println("--- PtGroupAdmin.mainScreenAction() ---");
closePopup();   // close popup if it is open
return mMainScreen;  // string of screen mapped in
faces-config-actions-common.xml (navigation case)
}


I am using  on both classes where both methods are found.  I
never see the println messages in the tomcat log window and the popup window
will not close because it never hits mainScreenAction() - although on the
first round through it works just fine.  It's just that after the second
popup, it will not close again and I must exit the application.






Lisa wrote:
> 
> I have a popup page that displays a list of rows from a table (using
> dataTable).  Each row contains a column that is a commandLink.  When
> clicked it goes to the backend bean Listener and using UITable sets the
> current object selected and then goes to an Action which sets to false a
> rendered flag that should close the popup.
> 
> The first time the page loads, I can do a search and the results popup.  I
> click on the hyperlink and the actionListener and the action get invoked
> properly.  The property gets set and the popup closes.
> 
> However on the second time I hit the commandLink after getting the popup,
> it will never hit the actionListener or the action method in the BB.  I am
> using  
> Why would this work the first time but not the second or subsequent times? 
> puzzleing.  I have tried everything to no avail.  The actionListener is a
> method in one BB and the action is a method in another BB.  Both have
> scope as set by  
> 
> --- The whole example is too complex to post here but the commandLink is
> simple
> 
>
> 
> 
> 
> 
> 
>  actionListener="#{ptGroup.chooseGroupListener}"
> action="#{ptGroupAdmin.mainScreenAction}"
> id="idCommandLinkGroupName">
> 
> 
> 
> 
> ---
> Since the actionListener or action, never get invoked the second time
> around, the popup stays there, the page behind the popup is never updated. 
> Weird that it works the first time, but not second.
> 
> 
> Simon
> --
> 

-- 
View this message in context: 
http://www.nabble.com/commandLink-not-workingtf2970681.html#a8367575
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: problems (not working / have tried everything)

2007-01-14 Thread Lisa

I am sure this is working and it mostly works for me, but I have one
situation where it appears to work then stops working for some reason.  I
simply can not figure this out.


Simon Kitching-3 wrote:
> 
> SimonSays wrote:
>> So why is it that I read if you use  that the BB must
>> implement
>> Serializable?  So something that is serializable does not necessarily
>> write
>> out a file system file, but can store the file in memory as well?
> 
> There are three options for saving a component tree:
> (a) serialize it and send it to the client browser as a hidden input field
> (b) serialize it and store it into the webserver's http session
> (c) store it into the webserver's http session unserialized.
> 
> For (a) and (b), the object being saved must implement 
> java.io.Serializable, or javax.faces.component.StateHolder.
> 
> Option (c) is easier, but doesn't work with clustering, doesn't support 
> "hot restart" and doesn't allow the webserver to store a user's http 
> session on disk when memory gets short. It is therefore not the default; 
> you need to explicitly enable this mode (and I wouldn't recommend it).
> 
>> 
>> Also if STATE_SAVING_METHOD set to "server" saves a "file" the the
>> HttpSession what does STATE_SAVING_METHOD set to "client" do differently?
> 
> MyFaces never "saves a file". It just places an object (which may be a 
> serialized object [b], or an unserialized one [c]) into the http 
> session. What the webserver does with a user's http session is up to it.
> 
> You may need to read about serialization; it is NOT just about writing 
> data to files on a disk.
> 
>> 
>> how do I tell if the whole object is being serialized (state saved)
>> rather
>> than just some property in a bean?  I may hit the breakpoints but I want
>> to
>> see the actual data somewhere and watch it get restored as well.  I do
>> not
>> believe  is working but do not know why.  I need to know for
>> sure that it is not working before I go and try to find out why.
> 
> I can't think of any easy way to do this. Java serialization is pretty 
> complex, and not the sort of thing I would want to trace through. Maybe 
> you could define your own readObject/writeObject methods that just 
> delegate to the standard implementations to give yourself somewhere to 
> place your breakpoints but I've never needed to do that.
> 
> I assure you that t:saveState does work for many thousands of other 
> people out there (including myself).
> 
> Regards,
> 
> Simon
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3Ct%3AsaveState%3E-problems-%28not-working---have-tried-everything%29-tf2963422.html#a8367352
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Finding a component with a specific id

2005-10-25 Thread Kirchgessner, Lisa
Have you tried putting the colSelector after the datatable?  It sounds
like the view does not yet contain the table. I thought myFaces had
similar issues with the DataScroller in ealier versions (maybe still
do).  Maybe take a look on how they handled?

Of course, just a guess.

Good luck

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 25, 2005 12:07 AM
To: MyFaces Discussion
Subject: Finding a component with a specific id


Hi,

 From a custom renderer I need to be able to find a component with a 
specific id.

Page:
   

   
  ..
   

 From the renderer for the o:colSelector I've tried:
   UIComponent table =
facesContext.getViewRoot().findComponent(tableId);
   UIComponent table = component.findComponent(tableId);
   UIComponent table = component.findComponent(":" + tableId); but had
no luck.

The table is enclosed in a subview named "body", so the id actually gets

output as "body:table1". I've tried all the above with that string too, 
and no luck.

Any ideas how I should locate that table component by id??
[And BTW, is it possible for a component in a naming container to have 
an id that is *not* prefixed by its NamingContainer parent's id?]


On a related note, looking at the source for UIComponent.findComponent, 
I see it calls _ComponentUtils.findComponent which is as follows.

 static UIComponent findComponent(UIComponent findBase, String id)
 {
 if (idsAreEqual(id,findBase))
 {
 return findBase;
 }

 for (Iterator it = findBase.getFacetsAndChildren();
   it.hasNext(); )
 {
 UIComponent childOrFacet = (UIComponent)it.next();
 if (!(childOrFacet instanceof NamingContainer))
 {
 UIComponent find = findComponent(childOrFacet, id);
 if (find != null) return find;
 }
 else if (idsAreEqual(id,childOrFacet))
 {
 return childOrFacet;
 }
 }

 return null;
 }

What's the point of that "instanceof NamingContainer"? Why doesn't the 
search recurse into NamingContainer children of findBase?

Thanks,

Simon


x:inputCalendar issue with August/September

2005-08-04 Thread Kirchgessner, Lisa
Title: Message



Looks like 
additional problems with x:inputCalendar.  I have found that whenever a 
date for the months of August or September is selected, regardless of the year, 
subsequent visits do not show the calendar days and the current month is 
undefined.
 
Has anyone else 
found this problem?
 
Best 
Regards,
Lisa
 

The 
electronic mail message you have received and any files transmitted with it are 
privileged & confidential and solely for the intended addressee(s)’s 
attention.  The message and any files transmitted are draft versions unless 
explicitly stated as otherwise.   Do not divulge, copy, forward, 
or use the contents, attachments, or information without permission of Fannie 
Mae.  Information contained in this message is provided solely for the 
purpose stated in the message or its attachment(s) and must not be disclosed to 
any third party or used for any other purpose without consent of Fannie 
Mae.  If you have received this message and/or any files transmitted with 
it in error, please delete them from your system, destroy any hard copies of 
them, and contact the sender.
 


Rendering Not Correct on First Visit to Page

2005-08-04 Thread Kirchgessner, Lisa
Title: Message




Hello,
 
I 
am attempting to dynamically render components on a page during first visit 
(using request-scope beans), specifically datatable components (rendering via 
value-binding), as well optionally addMessage for a h:message component. The 
datatable rendering appears to pick up the default rendering when bean first 
created. As well, any message added during processing is not 
displayed.Background:When page first accessed, I'm trying to build a 
datatable based on current dates. When there is no data, I'm attempting to 
display a message and not render the datatable. Tracing indicates that 
isRendered is false. However, the page is displayed with the Table rendered and 
no message displayed. I use x:Savestate (myFaces) for subsequent requests, so 
all is fine then.Can anyone help?Best 
Regards,
Lisa Blue-in-the-Faces
 
 

The 
electronic mail message you have received and any files transmitted with it are 
privileged & confidential and solely for the intended addressee(s)’s 
attention.  The message and any files transmitted are draft versions unless 
explicitly stated as otherwise.   Do not divulge, copy, forward, 
or use the contents, attachments, or information without permission of Fannie 
Mae.  Information contained in this message is provided solely for the 
purpose stated in the message or its attachment(s) and must not be disclosed to 
any third party or used for any other purpose without consent of Fannie 
Mae.  If you have received this message and/or any files transmitted with 
it in error, please delete them from your system, destroy any hard copies of 
them, and contact the sender.