Re: [COMMUNITY] Andrew Robinson - Committer

2007-06-14 Thread Martin Marinschek

Welcome Andrew,

glad to have you aboard, thanks for the support on the user-list - I'm
sure it has always been tremendously helpful for our users...

regards,

Martin

On 6/14/07, Cagatay Civici <[EMAIL PROTECTED]> wrote:

Welcome Andrew,

Cagatay


On 6/14/07, Manfred Geiler <[EMAIL PROTECTED]> wrote:
> Welcome!
>
> --Manfred
>
>
> On 6/14/07, Grant Smith <[EMAIL PROTECTED]> wrote:
> > The Myfaces PMC is proud to announce a new addition to our community.
> >
> > Please welcome Andrew Robinson as the newest MyFaces committer.
> > Andrew has been exceedingly helpful in both the users and dev lists and
is a
> > great value to this project !
> >
> > Thanks Andrew!
> >
> > --
> > Grant Smith
> >
>
>
> --
> 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: Help With Tomahawk and web.xml

2007-06-14 Thread weull

I just tried that, still no dice :(
Any other ideas?
-- 
View this message in context: 
http://www.nabble.com/Help-With-Tomahawk-and-web.xml-tf3925209.html#a11132709
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: Help With Tomahawk and web.xml

2007-06-14 Thread azuritul
I think you should configure your ExtensionFilter so that is filters your
FacesServlet
In this case

MyFacesExtensionsFilter
Faces Servlet



-Original Message-
From: weull [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 15, 2007 8:56 AM
To: users@myfaces.apache.org
Subject: Help With Tomahawk and web.xml


I have the following web.xml (I'm using Spring, MyFaces 1.1.5 and the
jsf-spring integration library) and attempting to use Tomahawk 1.1.6:





http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

com.p21csi.webcore.base


   MyFacesExtensionsFilter
  
org.apache.myfaces.webapp.filter.ExtensionsFilter
 

   Set the size limit for uploaded files.
   Format: 10 - 10 bytes
  10k - 10 KB
  10m - 10 MB
   1g - 1 GB

maxFileSize
20m





MyFacesExtensionsFilter

*.jsp




MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*



 
org.springframework.web.context.ContextLoaderListener

 
  
org.apache.myfaces.webapp.StartupServletContextListener 
 

  
de.mindmatters.faces.spring.context.ContextLoaderListener


 
 WebCore

org.springframework.web.servlet.DispatcherServlet
 1



   WebCore
   *.html


 
  Faces Servlet
 
javax.faces.webapp.FacesServlet
 1
 

 
 Faces Servlet
 *.faces



I'm getting the infamous "ExtensionsFilter not correctly configured..."
exception no matter what I try to do.  Any ideas on what I've done wrong?
-- 
View this message in context:
http://www.nabble.com/Help-With-Tomahawk-and-web.xml-tf3925209.html#a1113155
5
Sent from the MyFaces - Users mailing list archive at Nabble.com.


__ NOD32 2330 (20070615) Information __

This message was checked by NOD32 antivirus system.
http://www.nod32.com.hk




Re: myfaces Too much locking?

2007-06-14 Thread Titi Wangsa

i think it when i have a lot of t:buffer..
most operation to render a page are read-only..
t:buffer seems to be a write operation..
the write operation causes the lock..
is this so?
can anyone confirm this?
the more t:buffer i use the more locks i have, causing a serious
performance penalty.


Help With Tomahawk and web.xml

2007-06-14 Thread weull

I have the following web.xml (I'm using Spring, MyFaces 1.1.5 and the
jsf-spring integration library) and attempting to use Tomahawk 1.1.6:





http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

com.p21csi.webcore.base


   MyFacesExtensionsFilter
  
org.apache.myfaces.webapp.filter.ExtensionsFilter
 

   Set the size limit for uploaded files.
   Format: 10 - 10 bytes
  10k - 10 KB
  10m - 10 MB
   1g - 1 GB

maxFileSize
20m





MyFacesExtensionsFilter

*.jsp




MyFacesExtensionsFilter
/faces/myFacesExtensionResource/*



 
org.springframework.web.context.ContextLoaderListener

 
  
org.apache.myfaces.webapp.StartupServletContextListener
 
 

  
de.mindmatters.faces.spring.context.ContextLoaderListener


 
 WebCore

org.springframework.web.servlet.DispatcherServlet
 1



   WebCore
   *.html


 
  Faces Servlet
   javax.faces.webapp.FacesServlet
 1
 

 
 Faces Servlet
 *.faces



I'm getting the infamous "ExtensionsFilter not correctly configured..."
exception no matter what I try to do.  Any ideas on what I've done wrong?
-- 
View this message in context: 
http://www.nabble.com/Help-With-Tomahawk-and-web.xml-tf3925209.html#a11131555
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Grant Smith

Welcome Danny!

On 6/14/07, Adam Winer <[EMAIL PROTECTED]> wrote:


Great to have you!

-- Adam


On 6/14/07, Cagatay Civici <[EMAIL PROTECTED]> wrote:
> Welcome Danny,
>
> Cagatay
>
>
> On 6/14/07, Manfred Geiler <[EMAIL PROTECTED]> wrote:
> > Welcome!
> >
> > --Manfred
> >
> > On 6/14/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > > Congratulations to Danny Robinson for becoming the newest Myfaces
> committer !
> > >
> > > Danny has provided patches and enhancements to Trinidad and has been
> > > active on the
> > > mailing list to help other users on how to get up to speed with
> Trinidad.
> > >
> > > Thanks Danny, and welcome to the team!
> > >
> > > -Matthias
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > further stuff:
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > mail: matzew-at-apache-dot-org
> > >
> >
> >
> > --
> > http://www.irian.at
> > Your JSF powerhouse - JSF Consulting,
> > Development and Courses in English and
> > German
> >
> > Professional Support for Apache MyFaces
> >
>
>





--
Grant Smith


Re: [Trinidad] Page flow scope and Back button

2007-06-14 Thread Adam Winer

W/regard to that bug:  you might get it to reproduce 100%
of the time by setting org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
to false.  I suspect that the view root caching is covering up
a latent bug somewhere in Trinidad or in your code...

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:

I hear you... that's the nice thing about open source though!

This would be a great enhancement! I'm currently struggling with the back button as well- 
getting an IllegalStateException("Invalid Index") in StateUtils > 
restoreKey(FacesBean.Type type, Object value). It would be nice to have more control on 
component and data restoration when the back button is clicked (possibly in a history 
listener).

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 2:09 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


Ah, OK.  Yeah, it'd be a great enhancement.  It hasn't
happened since we open-sourced because no one's
brought up the idea before.  Why things do or don't
happen at Oracle is another question altogether.

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> A back button detection/management mechanism similar to GWT HistoryListener.
>
> -Original Message-
> From: Adam Winer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 14, 2007 1:35 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] Page flow scope and Back button
>
>
> What's "this"?
>
> -- Adam
>
>
> On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> > I wonder why this was not implemented in trinidad's base classes/interfaces 
in a generic way?
> >
> > -Original Message-
> > From: Adam Winer [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 13, 2007 9:26 PM
> > To: MyFaces Discussion
> > Subject: Re: [Trinidad] Page flow scope and Back button
> >
> >
> > On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
confused about
> > > implementation.  Does it make a difference 'when' in the lifecycle I set 
the variables?
> > >
> > > For example, suppose the user enters the URL for my create page: 
*/create.jsf
> > > Then, there will be no attributes stored on the page.  So, I create them, 
but that occurs
> > > in the render response phase of the page:
> >
> > That's the problem!  It's a gotcha with page flow scope:  if you wait
> > until render response to add something, it gets dropped.  I think
> > there's a logged warning, but I'm not 100% sure of that.
> >
> > The reason for this is that we generate tokens lazily - we don't
> > want to add a pageflowscope token unless absolutely necessary -
> > but if you add it in render response, we've likely already sent the
> > postback URL down to the client.
> >
> > -- Adam
> >
> >
> > >
> > > 
RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", Boolean.FALSE);
> > > Boolean [] createdArr = new Boolean[ 1 ];
> > > createdArr[ 0 ] = Boolean.FALSE;
> > > 
RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", createdArr);
> > >
> > > Then, when the user presses 'save' on the page, then the save method 
runs, in which I update the
> > > variables:
> > >
> > > RequestContext context = RequestContext.getCurrentInstance();
> > > context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> > > Boolean [] createdArr = (Boolean []) 
context.getPageFlowScope().get("createdArr");
> > > createdArr[ 0 ] = Boolean.TRUE;
> > >
> > > When I press the 'back' button, then neither of these attributes exist on 
the page--it's as though
> > > the user had re-entered the page URL.
> > >
> > > So, I think I'm missing an important piece--how do I make sure the page 
attributes are stored on
> > > the page to begin with?  or is there no way to do that?
> > >
> > > Thanks again for your help,
> > >
> > > --David
> > >
> > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > >
> > > > Sure, what you do is:
> > > > - Store a token - Integer, String, enum, anything you want, that 
indicates
> > > > what page you're on, just like you're doing now.  As you know, this 
will be
> > > > restore when the back button is hit.
> > > >
> > > > - In addition to storing that token right on the pageFlowScope, also 
set it
> > > > into a one-element array on the pageFlowScope - but don't create a new 
array
> > > > each time, just keep writing into that first element.
> > > >
> > > > The one-element array will *not* be restored to its prior state, because
> > > > it's still the same instance.  Consequently, when you go back a page, 
you'll
> > > > see that the token directly on the page won't match the token within the
> > > > array.  Back button detected!
> > > >
> > > > You could encapsulate this strategy into a reusable object if desired.
> > > >
> > > > -- Adam
> > > >
> > > >
> > > >
> > > > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Thanks, that clarifies th

Re: [COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Adam Winer

Great to have you!

-- Adam


On 6/14/07, Cagatay Civici <[EMAIL PROTECTED]> wrote:

Welcome Danny,

Cagatay


On 6/14/07, Manfred Geiler <[EMAIL PROTECTED]> wrote:
> Welcome!
>
> --Manfred
>
> On 6/14/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> > Congratulations to Danny Robinson for becoming the newest Myfaces
committer !
> >
> > Danny has provided patches and enhancements to Trinidad and has been
> > active on the
> > mailing list to help other users on how to get up to speed with
Trinidad.
> >
> > Thanks Danny, and welcome to the team!
> >
> > -Matthias
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > mail: matzew-at-apache-dot-org
> >
>
>
> --
> http://www.irian.at
> Your JSF powerhouse - JSF Consulting,
> Development and Courses in English and
> German
>
> Professional Support for Apache MyFaces
>




Re: [COMMUNITY] Andrew Robinson - Committer

2007-06-14 Thread Cagatay Civici

Welcome Andrew,

Cagatay

On 6/14/07, Manfred Geiler <[EMAIL PROTECTED]> wrote:


Welcome!

--Manfred


On 6/14/07, Grant Smith <[EMAIL PROTECTED]> wrote:
> The Myfaces PMC is proud to announce a new addition to our community.
>
> Please welcome Andrew Robinson as the newest MyFaces committer.
> Andrew has been exceedingly helpful in both the users and dev lists and
is a
> great value to this project !
>
> Thanks Andrew!
>
> --
> Grant Smith
>


--
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces



Re: [COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Cagatay Civici

Welcome Danny,

Cagatay

On 6/14/07, Manfred Geiler <[EMAIL PROTECTED]> wrote:


Welcome!

--Manfred

On 6/14/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> Congratulations to Danny Robinson for becoming the newest Myfaces
committer !
>
> Danny has provided patches and enhancements to Trinidad and has been
> active on the
> mailing list to help other users on how to get up to speed with
Trinidad.
>
> Thanks Danny, and welcome to the team!
>
> -Matthias
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>


--
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces



Re: [COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Manfred Geiler

Welcome!

--Manfred

On 6/14/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:

Congratulations to Danny Robinson for becoming the newest Myfaces committer !

Danny has provided patches and enhancements to Trinidad and has been
active on the
mailing list to help other users on how to get up to speed with Trinidad.

Thanks Danny, and welcome to the team!

-Matthias

--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org




--
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces


Re: [COMMUNITY] Andrew Robinson - Committer

2007-06-14 Thread Manfred Geiler

Welcome!

--Manfred


On 6/14/07, Grant Smith <[EMAIL PROTECTED]> wrote:

The Myfaces PMC is proud to announce a new addition to our community.

Please welcome Andrew Robinson as the newest MyFaces committer.
Andrew has been exceedingly helpful in both the users and dev lists and is a
great value to this project !

Thanks Andrew!

--
Grant Smith




--
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces


Re: [COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Martin Marinschek

Welcome Danny!

regards,

Martin

On 6/14/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:

Congratulations to Danny Robinson for becoming the newest Myfaces committer !

Danny has provided patches and enhancements to Trinidad and has been
active on the
mailing list to help other users on how to get up to speed with Trinidad.

Thanks Danny, and welcome to the team!

-Matthias

--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org




--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Matthias Wessendorf

org.apache.myfaces.adf is "old"

org.apache.myfaces.trinidad should be the new namespace


=> org.apache.myfaces.trinidad.CLIENT_STATE_METHOD

-M

On 6/14/07, Stéphane Poirier <[EMAIL PROTECTED]> wrote:

I already got a wierd problem with client-side saving. Mine was solved by
adding this to the application-config part of my web.xml.


org.apache.myfaces.adf.CLIENT_STATE_METHOD

all
  

Does this helps?



On 6/14/07, Adam Winer < [EMAIL PROTECTED]> wrote:
> On 6/14/07, Hans Reip < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I am trying to use trinidad together with other tomahawk and SUN RI
> > components. The view technology is JSP. So I followed the instructions
for
> > installing trinidad from the myFaces page. Some JSP work but others
don't.
> >
> > I get the following message after I submit the form :
> >
> > ### backing-bean method -> start ###
> > 14.06.2007 10:10:00
com.test.twa.reuse.logging.PerformanceLogAdviceAOP
> > invoke
> > INFO: * Running time of method
> >
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerData]
is: 0
> > ms
> > ## return string is: editConsumer ##
> > 14.06.2007 10:10:00
org.apache.myfaces.trinidad.context.RenderingContext
> > attach
> > WARNUNG: Trying to attach RenderingContext to a thread that already had
one.
> > 14.06.2007 10:10:00
com.test.twa.reuse.logging.PerformanceLogAdviceAOP
> > invoke
> > INFO: * Running time of method
> >
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerOverview]
> > is: 0 ms
> >
> > I get this message many times until a StackOverflowError occurs:
> >
> > FATAL: Servlet.service() for servlet Faces Servlet threw exception
> > java.lang.StackOverflowError
> > at
org.apache.catalina.connector.Request.doGetSession(Request.java:2190)
> > at
org.apache.catalina.connector.Request.getSession(Request.java:2031)
> > at
> > org.apache.catalina.connector.RequestFacade.getSession
(RequestFacade.java:832)
> > ...
>
> Can you give us a longer stack trace?  We need to see what
> part of the stack is recursive.
>
> -- Adam
>
>
> > ...
> >
> > Why does this error occur only at some JSPs, and why only when the
> > STATE_SAVING_METHOD is "client"?
> >
> > By the way: if the STATE_SAVING_METHOD is "server" it works so far, but
> > there still is the following warning:
> > ...
> > 14.06.2007 09:59:30
> >
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
> > encodeFinally
> > WARNING: No AdfRenderingContext available
> > ...
> > What does ths warning mean?
> >
> > Thanks in advance
> > Hans
> > --
> > View this message in context:
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a5961
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Stéphane Poirier

I already got a wierd problem with client-side saving. Mine was solved by
adding this to the application-config part of my web.xml.


   org.apache.myfaces.adf.CLIENT_STATE_METHOD
   all
 

Does this helps?


On 6/14/07, Adam Winer <[EMAIL PROTECTED]> wrote:


On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to use trinidad together with other tomahawk and SUN RI
> components. The view technology is JSP. So I followed the instructions
for
> installing trinidad from the myFaces page. Some JSP work but others
don't.
>
> I get the following message after I submit the form :
>
> ### backing-bean method -> start ###
> 14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
> invoke
> INFO: * Running time of method
> [com.test.twa.business.coffeeservice.IConsumerService.getConsumerData]
is: 0
> ms
> ## return string is: editConsumer ##
> 14.06.2007 10:10:00 org.apache.myfaces.trinidad.context.RenderingContext
> attach
> WARNUNG: Trying to attach RenderingContext to a thread that already had
one.
> 14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
> invoke
> INFO: * Running time of method
> [
com.test.twa.business.coffeeservice.IConsumerService.getConsumerOverview]
> is: 0 ms
>
> I get this message many times until a StackOverflowError occurs:
>
> FATAL: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.StackOverflowError
> at org.apache.catalina.connector.Request.doGetSession(
Request.java:2190)
> at org.apache.catalina.connector.Request.getSession(Request.java
:2031)
> at
> org.apache.catalina.connector.RequestFacade.getSession(
RequestFacade.java:832)
> ...

Can you give us a longer stack trace?  We need to see what
part of the stack is recursive.

-- Adam


> ...
>
> Why does this error occur only at some JSPs, and why only when the
> STATE_SAVING_METHOD is "client"?
>
> By the way: if the STATE_SAVING_METHOD is "server" it works so far, but
> there still is the following warning:
> ...
> 14.06.2007 09:59:30
> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
> encodeFinally
> WARNING: No AdfRenderingContext available
> ...
> What does ths warning mean?
>
> Thanks in advance
> Hans
> --
> View this message in context:
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a5961
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



RE: [Trinidad] Page flow scope and Back button

2007-06-14 Thread William Hoover
I hear you... that's the nice thing about open source though!

This would be a great enhancement! I'm currently struggling with the back 
button as well- getting an IllegalStateException("Invalid Index") in StateUtils 
> restoreKey(FacesBean.Type type, Object value). It would be nice to have more 
control on component and data restoration when the back button is clicked 
(possibly in a history listener).

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 2:09 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


Ah, OK.  Yeah, it'd be a great enhancement.  It hasn't
happened since we open-sourced because no one's
brought up the idea before.  Why things do or don't
happen at Oracle is another question altogether.

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> A back button detection/management mechanism similar to GWT HistoryListener.
>
> -Original Message-
> From: Adam Winer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 14, 2007 1:35 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] Page flow scope and Back button
>
>
> What's "this"?
>
> -- Adam
>
>
> On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> > I wonder why this was not implemented in trinidad's base classes/interfaces 
> > in a generic way?
> >
> > -Original Message-
> > From: Adam Winer [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 13, 2007 9:26 PM
> > To: MyFaces Discussion
> > Subject: Re: [Trinidad] Page flow scope and Back button
> >
> >
> > On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
> > > confused about
> > > implementation.  Does it make a difference 'when' in the lifecycle I set 
> > > the variables?
> > >
> > > For example, suppose the user enters the URL for my create page: 
> > > */create.jsf
> > > Then, there will be no attributes stored on the page.  So, I create them, 
> > > but that occurs
> > > in the render response phase of the page:
> >
> > That's the problem!  It's a gotcha with page flow scope:  if you wait
> > until render response to add something, it gets dropped.  I think
> > there's a logged warning, but I'm not 100% sure of that.
> >
> > The reason for this is that we generate tokens lazily - we don't
> > want to add a pageflowscope token unless absolutely necessary -
> > but if you add it in render response, we've likely already sent the
> > postback URL down to the client.
> >
> > -- Adam
> >
> >
> > >
> > > 
> > > RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", 
> > > Boolean.FALSE);
> > > Boolean [] createdArr = new Boolean[ 1 ];
> > > createdArr[ 0 ] = Boolean.FALSE;
> > > 
> > > RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", 
> > > createdArr);
> > >
> > > Then, when the user presses 'save' on the page, then the save method 
> > > runs, in which I update the
> > > variables:
> > >
> > > RequestContext context = RequestContext.getCurrentInstance();
> > > context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> > > Boolean [] createdArr = (Boolean []) 
> > > context.getPageFlowScope().get("createdArr");
> > > createdArr[ 0 ] = Boolean.TRUE;
> > >
> > > When I press the 'back' button, then neither of these attributes exist on 
> > > the page--it's as though
> > > the user had re-entered the page URL.
> > >
> > > So, I think I'm missing an important piece--how do I make sure the page 
> > > attributes are stored on
> > > the page to begin with?  or is there no way to do that?
> > >
> > > Thanks again for your help,
> > >
> > > --David
> > >
> > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > >
> > > > Sure, what you do is:
> > > > - Store a token - Integer, String, enum, anything you want, that 
> > > > indicates
> > > > what page you're on, just like you're doing now.  As you know, this 
> > > > will be
> > > > restore when the back button is hit.
> > > >
> > > > - In addition to storing that token right on the pageFlowScope, also 
> > > > set it
> > > > into a one-element array on the pageFlowScope - but don't create a new 
> > > > array
> > > > each time, just keep writing into that first element.
> > > >
> > > > The one-element array will *not* be restored to its prior state, because
> > > > it's still the same instance.  Consequently, when you go back a page, 
> > > > you'll
> > > > see that the token directly on the page won't match the token within the
> > > > array.  Back button detected!
> > > >
> > > > You could encapsulate this strategy into a reusable object if desired.
> > > >
> > > > -- Adam
> > > >
> > > >
> > > >
> > > > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Thanks, that clarifies the documentation.
> > > > >
> > > > > So, my follow-up question would be: Is there any way that I can 
> > > > > detect in
> > > > > Trinidad that the user
> > > > > has gone from one page to 

[COMMUNITY] Peter Mahoney - Committer

2007-06-14 Thread Grant Smith

The Myfaces PMC is proud to announce a new addition to our community.

Please welcome Peter Mahoney as the newest MyFaces committer.
Peter has been exceedingly helpful in providing patches in JIRA and is a
great value to this project !

Thanks Peter!

--
Grant Smith


[COMMUNITY] Andrew Robinson - Committer

2007-06-14 Thread Grant Smith

The Myfaces PMC is proud to announce a new addition to our community.

Please welcome Andrew Robinson as the newest MyFaces committer.
Andrew has been exceedingly helpful in both the users and dev lists and is a
great value to this project !

Thanks Andrew!

--
Grant Smith


Re: [Trinidad] Page flow scope and Back button

2007-06-14 Thread Adam Winer

Ah, OK.  Yeah, it'd be a great enhancement.  It hasn't
happened since we open-sourced because no one's
brought up the idea before.  Why things do or don't
happen at Oracle is another question altogether.

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:

A back button detection/management mechanism similar to GWT HistoryListener.

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 1:35 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


What's "this"?

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> I wonder why this was not implemented in trinidad's base classes/interfaces 
in a generic way?
>
> -Original Message-
> From: Adam Winer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 13, 2007 9:26 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] Page flow scope and Back button
>
>
> On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
confused about
> > implementation.  Does it make a difference 'when' in the lifecycle I set 
the variables?
> >
> > For example, suppose the user enters the URL for my create page: 
*/create.jsf
> > Then, there will be no attributes stored on the page.  So, I create them, 
but that occurs
> > in the render response phase of the page:
>
> That's the problem!  It's a gotcha with page flow scope:  if you wait
> until render response to add something, it gets dropped.  I think
> there's a logged warning, but I'm not 100% sure of that.
>
> The reason for this is that we generate tokens lazily - we don't
> want to add a pageflowscope token unless absolutely necessary -
> but if you add it in render response, we've likely already sent the
> postback URL down to the client.
>
> -- Adam
>
>
> >
> > 
RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", 
Boolean.FALSE);
> > Boolean [] createdArr = new Boolean[ 1 ];
> > createdArr[ 0 ] = Boolean.FALSE;
> > 
RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", createdArr);
> >
> > Then, when the user presses 'save' on the page, then the save method runs, 
in which I update the
> > variables:
> >
> > RequestContext context = RequestContext.getCurrentInstance();
> > context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> > Boolean [] createdArr = (Boolean []) 
context.getPageFlowScope().get("createdArr");
> > createdArr[ 0 ] = Boolean.TRUE;
> >
> > When I press the 'back' button, then neither of these attributes exist on 
the page--it's as though
> > the user had re-entered the page URL.
> >
> > So, I think I'm missing an important piece--how do I make sure the page 
attributes are stored on
> > the page to begin with?  or is there no way to do that?
> >
> > Thanks again for your help,
> >
> > --David
> >
> > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> >
> > > Sure, what you do is:
> > > - Store a token - Integer, String, enum, anything you want, that indicates
> > > what page you're on, just like you're doing now.  As you know, this will 
be
> > > restore when the back button is hit.
> > >
> > > - In addition to storing that token right on the pageFlowScope, also set 
it
> > > into a one-element array on the pageFlowScope - but don't create a new 
array
> > > each time, just keep writing into that first element.
> > >
> > > The one-element array will *not* be restored to its prior state, because
> > > it's still the same instance.  Consequently, when you go back a page, 
you'll
> > > see that the token directly on the page won't match the token within the
> > > array.  Back button detected!
> > >
> > > You could encapsulate this strategy into a reusable object if desired.
> > >
> > > -- Adam
> > >
> > >
> > >
> > > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Thanks, that clarifies the documentation.
> > > >
> > > > So, my follow-up question would be: Is there any way that I can detect 
in
> > > > Trinidad that the user
> > > > has gone from one page to the next one and then back again?
> > > >
> > > > Thank you for your help,
> > > >
> > > > --David
> > > >
> > > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > On 6/8/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > > > Hi *,
> > > > > >
> > > > > > I'm a little uncertain about how the pageFlowScope interacts with 
the
> > > > browser's Back button.
> > > > > The
> > > > > > documentation states:
> > > > > >
> > > > > >   "...clicking the Back button will automatically reset the page 
flow
> > > > scope to its original
> > > > > > state."
> > > > > >
> > > > > > Which 'original state' is this referring to?
> > > > > >
> > > > > > For example, suppose I have this situation:
> > > > > >
> > > > > > I have a wizard application.  On the first page of the wizard, the
> > > > user should enter a
> > > > > username
> > > > > > and password and then proceed to the next page of the wizard.
> >

Re: [Trinidad] PPR and Dialog

2007-06-14 Thread Adam Winer

Definitely not intended.  I rarely test with server state
saving - I'll have to have a look.

-- Adam



On 6/14/07, Felix Gonschorek <[EMAIL PROTECTED]> wrote:

Hi,

this topic helped me, since i could find out, that partially updating a
component after dialog return is possible.

but:

returnListener="${backingBean.returnFromDialog}"
(void returnFromDialog(ReturnEvent e))

does only get called, when i use javax.faces.STATE_SAVING_METHOD=client
when i activate serverside state saving, the returnListener method in my
backing bean is not called. is that intended? trinidad 1.0.1-SNAPSHOT

thx & regards
felix

Srinath K schrieb:
> Sorry for a Wrong tip. viewRoot doesn't render anything and hence it
> cannot be added as a partial target. One simple solution could be wrap
> all your contents with a  panelGrouplayout component and add it to the
> partial target.
> You can use the binding attribute to get the instance of the
> panelGroupLayout or any other component in your managed bean
>
> 
> ..
> 
>
> in your managed bean
>
> CorePanelGroupLayout panel; and a getter and setter for the same.
>
> -Thanks,
> Srinath K
>
>
>
> On 5/2/07, *Luka Surija * <[EMAIL PROTECTED]
> > wrote:
>
> Hi,
> tnx for the tip, but it doesn't work.
>
> here is my code:
>
> --- Managed bean  "DialogMB"
> public void returnContactDetail(ReturnEvent event){
>
> RequestContext.getCurrentInstance
> ().addPartialTarget(FacesContext.getCurrentInstance().getViewRoot());
> }
>
>
> --- Close button on Dialog 
> public void closeContactDetail(ActionEvent event){
> RequestContext.getCurrentInstance
> ().returnFromDialog(null,null);
> }
>
> --- JSF code ---
>  useWindow="true" returnListener="#{DialogMB.returnContactDetail }" />
>
>
> after closing the Dialog the page is not refreshed and in server log I
> get this exception:
>
> ava.lang.NullPointerException
> at
> 
org.apache.myfaces.trinidadinternal.context.RequestContextImpl._getNearestPPRTarget
> (RequestContextImpl.java:697)
> at
> 
org.apache.myfaces.trinidadinternal.context.RequestContextImpl.addPartialTarget(RequestContextImpl.java:448)
> at
> com.iytim.yachtpool.web.DialogMB.returnContactDetail (DialogMB.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
> at
> com.sun.el.MethodExpressionImpl.invoke (MethodExpressionImpl.java:283)
> at
> 
com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
> at
> 
com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
> at
> 
org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1183)
> at
> 
org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:162)
> at
> 
org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:110)
> at
> 
org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:190)
> at
> javax.faces.component.UIViewRoot.broadcastEvents (UIViewRoot.java:448)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
> at
> 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
> at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
> at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java
> :244)
> at
> 
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
> at
> 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
> :304)
> at
> 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
> at
> 
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java
> :326)
> at
> 
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
> at
> 
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java
> :213)
> at
> 
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
> at
> 

[Trinidad] PPR and Dialog

2007-06-14 Thread Felix Gonschorek

Hi,

this topic helped me, since i could find out, that partially updating a 
component after dialog return is possible.


but:

returnListener="${backingBean.returnFromDialog}"
(void returnFromDialog(ReturnEvent e))

does only get called, when i use javax.faces.STATE_SAVING_METHOD=client
when i activate serverside state saving, the returnListener method in my 
backing bean is not called. is that intended? trinidad 1.0.1-SNAPSHOT


thx & regards
felix

Srinath K schrieb:
Sorry for a Wrong tip. viewRoot doesn't render anything and hence it 
cannot be added as a partial target. One simple solution could be wrap 
all your contents with a  panelGrouplayout component and add it to the 
partial target.
You can use the binding attribute to get the instance of the 
panelGroupLayout or any other component in your managed bean



..


in your managed bean

CorePanelGroupLayout panel; and a getter and setter for the same.

-Thanks,
Srinath K



On 5/2/07, *Luka Surija * <[EMAIL PROTECTED] 
> wrote:


Hi,
tnx for the tip, but it doesn't work.

here is my code:

--- Managed bean  "DialogMB"
public void returnContactDetail(ReturnEvent event){

RequestContext.getCurrentInstance
().addPartialTarget(FacesContext.getCurrentInstance().getViewRoot());
}


--- Close button on Dialog 
public void closeContactDetail(ActionEvent event){
RequestContext.getCurrentInstance
().returnFromDialog(null,null);
}

--- JSF code ---



after closing the Dialog the page is not refreshed and in server log I
get this exception:

ava.lang.NullPointerException
at

org.apache.myfaces.trinidadinternal.context.RequestContextImpl._getNearestPPRTarget
(RequestContextImpl.java:697)
at

org.apache.myfaces.trinidadinternal.context.RequestContextImpl.addPartialTarget(RequestContextImpl.java:448)
at
com.iytim.yachtpool.web.DialogMB.returnContactDetail (DialogMB.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at
com.sun.el.MethodExpressionImpl.invoke (MethodExpressionImpl.java:283)
at
com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at
com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at

org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1183)
at

org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:162)
at

org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:110)
at
org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:190)
at
javax.faces.component.UIViewRoot.broadcastEvents (UIViewRoot.java:448)
at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at

com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java
:244)
at

org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
:304)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at

org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java
:326)
at

org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
at

org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java
:213)
at

org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
  

RE: [Trinidad] Page flow scope and Back button

2007-06-14 Thread William Hoover
A back button detection/management mechanism similar to GWT HistoryListener.

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 1:35 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


What's "this"?

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:
> I wonder why this was not implemented in trinidad's base classes/interfaces 
> in a generic way?
>
> -Original Message-
> From: Adam Winer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 13, 2007 9:26 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] Page flow scope and Back button
>
>
> On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
> > confused about
> > implementation.  Does it make a difference 'when' in the lifecycle I set 
> > the variables?
> >
> > For example, suppose the user enters the URL for my create page: 
> > */create.jsf
> > Then, there will be no attributes stored on the page.  So, I create them, 
> > but that occurs
> > in the render response phase of the page:
>
> That's the problem!  It's a gotcha with page flow scope:  if you wait
> until render response to add something, it gets dropped.  I think
> there's a logged warning, but I'm not 100% sure of that.
>
> The reason for this is that we generate tokens lazily - we don't
> want to add a pageflowscope token unless absolutely necessary -
> but if you add it in render response, we've likely already sent the
> postback URL down to the client.
>
> -- Adam
>
>
> >
> > 
> > RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", 
> > Boolean.FALSE);
> > Boolean [] createdArr = new Boolean[ 1 ];
> > createdArr[ 0 ] = Boolean.FALSE;
> > 
> > RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", 
> > createdArr);
> >
> > Then, when the user presses 'save' on the page, then the save method runs, 
> > in which I update the
> > variables:
> >
> > RequestContext context = RequestContext.getCurrentInstance();
> > context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> > Boolean [] createdArr = (Boolean []) 
> > context.getPageFlowScope().get("createdArr");
> > createdArr[ 0 ] = Boolean.TRUE;
> >
> > When I press the 'back' button, then neither of these attributes exist on 
> > the page--it's as though
> > the user had re-entered the page URL.
> >
> > So, I think I'm missing an important piece--how do I make sure the page 
> > attributes are stored on
> > the page to begin with?  or is there no way to do that?
> >
> > Thanks again for your help,
> >
> > --David
> >
> > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> >
> > > Sure, what you do is:
> > > - Store a token - Integer, String, enum, anything you want, that indicates
> > > what page you're on, just like you're doing now.  As you know, this will 
> > > be
> > > restore when the back button is hit.
> > >
> > > - In addition to storing that token right on the pageFlowScope, also set 
> > > it
> > > into a one-element array on the pageFlowScope - but don't create a new 
> > > array
> > > each time, just keep writing into that first element.
> > >
> > > The one-element array will *not* be restored to its prior state, because
> > > it's still the same instance.  Consequently, when you go back a page, 
> > > you'll
> > > see that the token directly on the page won't match the token within the
> > > array.  Back button detected!
> > >
> > > You could encapsulate this strategy into a reusable object if desired.
> > >
> > > -- Adam
> > >
> > >
> > >
> > > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Thanks, that clarifies the documentation.
> > > >
> > > > So, my follow-up question would be: Is there any way that I can detect 
> > > > in
> > > > Trinidad that the user
> > > > has gone from one page to the next one and then back again?
> > > >
> > > > Thank you for your help,
> > > >
> > > > --David
> > > >
> > > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > On 6/8/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > > > Hi *,
> > > > > >
> > > > > > I'm a little uncertain about how the pageFlowScope interacts with 
> > > > > > the
> > > > browser's Back button.
> > > > > The
> > > > > > documentation states:
> > > > > >
> > > > > >   "...clicking the Back button will automatically reset the page 
> > > > > > flow
> > > > scope to its original
> > > > > > state."
> > > > > >
> > > > > > Which 'original state' is this referring to?
> > > > > >
> > > > > > For example, suppose I have this situation:
> > > > > >
> > > > > > I have a wizard application.  On the first page of the wizard, the
> > > > user should enter a
> > > > > username
> > > > > > and password and then proceed to the next page of the wizard.
> > > > > >
> > > > > > When the first page of the wizard loads, the username and password
> > > > fields may be entered into.
> > > > > > The page that takes the user

Re: JSF and AJAX without custom components?

2007-06-14 Thread Stan Carney
Yeah, we actually make use of Springs ServletWrappingController class 
when we don't need JSF. i.e. no forms etc...


From a performance standpoint you do have a good point actually. So 
rather than a phase listener that is hit on every single JSF request 
just use a Servlet that mimics FacesServlet but just performs the task 
that you need done when called directly.


Looking at the source code of FacesServlet it seems pretty straight 
forward. What would I have to do to get JSF to complete the RESTORE_VIEW 
phase and stop without a phase listener? Won't I also have problems with 
the pesky javax.faces.ViewState containing the wrong viewId and not 
restoring state?


i.e.
Servlet URL: /path/to/servlet.foo
viewId: /my/page.xhtml


Thanks,
Stan


Werner Punz wrote:

For specialized cases it might be better to use servlets or servlet
filters as callback points.
The problem with phase listeners is they are called every time a request
is triggered.
The + side is, that you do not have to initialize jsf it is
preinitialized for you if you need access to the jsf inastructure

(which in many cases you wont need anyway, especially if you are on ejb3
or spring for providing the backend beans)
The other + side is, phase listeners are deployed more easily as we all
know.

So either way has its ups and downs, but if speed is a concern than
going the servlet route really might be better!



Stan Carney schrieb:
  

Thanks for your response Ernst!

Yeah, I have looked around at pretty much every JSF AJAX framework out
there and it isn't that I'm not impressed. There are definitely some
smart people working to create generic components to be consumed by the
masses. In our current position though I don't think these frameworks
make a lot of sense for us to use. We have an extremely strong UI
developer and we just want to be able to expose his talents, and in our
current circumstance having to use pre-built AJAX components or having
to create our own would severely hamper his abilities.

So anyway I have solved my problem via the following process. It allows
us to interact with JSF, i.e. forms, via AJAX without having to write
components. It has some significant short comings if it was going to be
used for general consumption by the JSF community (i.e. lacking
configuration, you can shoot your foot off easily, etc...) but works for
us. So keeping with good list etiquette I'm posting my solution below
for those, if any, that get a hit on my initial question.


I have created a PhaseListener that runs after the RESTORE_VIEW phase
and checks for the presence of a known parameter. Every parameter on
every request is checked which I'm not a fan of but from what I have
seen most other JSF/AJAX solutions do the same and it appears to run
super fast. If a 'known' parameter exists the PhaseListener instantiates
the class associated with the parameter for processing. In my case all
of these 'processor' classes implement a simple interface with one
method, process(), that takes a CaseInsensitiveMap as an argument. This
map contains the map returned value from the getParameterMap() method on
HttpServletRequest:

HttpServletRequest req = (HttpServletRequest)
event.getFacesContext().getExternalContext().getRequest();
CaseInsensitiveMap map = new CaseInsensitiveMap();
map.putAll(req.getParameterMap());

The process() method then does what it needs to do. Typically finding
components by their ids in the restored view, that are either known by
the class or sent as parameters, and updating their values accordingly.
Then the class composes an XML document that our client side JavaScript
(taconite and/or JQuery) understands and returns this XML string. The
PhaseListener then determines if the returned string contains a
javax.faces.ViewState placeholder we came up with and substitutes the
placeholder with the new ViewState value generated below. If there is no
placeholder, i.e. not interacting with a JSF form, we can omit the
updating of the ViewState value. In that case though we typically do
straight HTTP and bypass JSF completely.

   try {
   UIViewRoot viewRoot = context.getViewRoot();

   StateManager stateMgr =
context.getApplication().getStateManager();
   ComponentSupport.removeTransient(viewRoot);

   SerializedView serializedView =
stateMgr.saveSerializedView(context);

   Object[] savedState = new Object[3];
   Object treeStruct = serializedView.getStructure();
   if (treeStruct != null) {
   if (treeStruct instanceof String) {
   savedState[0] = treeStruct;
   }
   }
   savedState[2] = viewRoot.getViewId();
   String viewState = StateUtils.construct(savedState,
context.getExternalContext());

   return viewState;
   } catch (Exception e) {
   throw new RuntimeException(e);
   }

The PhaseListener writes out the string to the response stream and marks
the response as complete. The client Jav

Re: [Trinidad] how to trigger PPR manually

2007-06-14 Thread Adam Winer

There's no publicly supported way to fire a PPR request now,
but there will be once the XmlHttpRequest code is merged in.

-- Adam



On 6/14/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:

Hi, I'm looking for a method to trigger PPR upon setting certain
conditions on client operations.
I have a multipanel page, where one panel contains an iframe for
rendering a blob through browser plugins.
Users are allowed to swap, minimize and restore panels through js, thus
these operations are purely client-bound.
When the Adobe plugin is involved to manage iframe contents (both on IE
and FF), the iframe area is not refreshed after its panel is restored or
swapped.
Don't ask me why.
Thus I need to force a refresh, and this would be much better if
partial, e.g. concerning only that panel.
How can I trigger it from js ?
Thanks -- Renzo




Re: [Trinidad] Page flow scope and Back button

2007-06-14 Thread Adam Winer

What's "this"?

-- Adam


On 6/14/07, William Hoover <[EMAIL PROTECTED]> wrote:

I wonder why this was not implemented in trinidad's base classes/interfaces in 
a generic way?

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 13, 2007 9:26 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
confused about
> implementation.  Does it make a difference 'when' in the lifecycle I set the 
variables?
>
> For example, suppose the user enters the URL for my create page: */create.jsf
> Then, there will be no attributes stored on the page.  So, I create them, but 
that occurs
> in the render response phase of the page:

That's the problem!  It's a gotcha with page flow scope:  if you wait
until render response to add something, it gets dropped.  I think
there's a logged warning, but I'm not 100% sure of that.

The reason for this is that we generate tokens lazily - we don't
want to add a pageflowscope token unless absolutely necessary -
but if you add it in render response, we've likely already sent the
postback URL down to the client.

-- Adam


>
> RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", 
Boolean.FALSE);
> Boolean [] createdArr = new Boolean[ 1 ];
> createdArr[ 0 ] = Boolean.FALSE;
> RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", 
createdArr);
>
> Then, when the user presses 'save' on the page, then the save method runs, in 
which I update the
> variables:
>
> RequestContext context = RequestContext.getCurrentInstance();
> context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> Boolean [] createdArr = (Boolean []) 
context.getPageFlowScope().get("createdArr");
> createdArr[ 0 ] = Boolean.TRUE;
>
> When I press the 'back' button, then neither of these attributes exist on the 
page--it's as though
> the user had re-entered the page URL.
>
> So, I think I'm missing an important piece--how do I make sure the page 
attributes are stored on
> the page to begin with?  or is there no way to do that?
>
> Thanks again for your help,
>
> --David
>
> --- Adam Winer <[EMAIL PROTECTED]> wrote:
>
> > Sure, what you do is:
> > - Store a token - Integer, String, enum, anything you want, that indicates
> > what page you're on, just like you're doing now.  As you know, this will be
> > restore when the back button is hit.
> >
> > - In addition to storing that token right on the pageFlowScope, also set it
> > into a one-element array on the pageFlowScope - but don't create a new array
> > each time, just keep writing into that first element.
> >
> > The one-element array will *not* be restored to its prior state, because
> > it's still the same instance.  Consequently, when you go back a page, you'll
> > see that the token directly on the page won't match the token within the
> > array.  Back button detected!
> >
> > You could encapsulate this strategy into a reusable object if desired.
> >
> > -- Adam
> >
> >
> >
> > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks, that clarifies the documentation.
> > >
> > > So, my follow-up question would be: Is there any way that I can detect in
> > > Trinidad that the user
> > > has gone from one page to the next one and then back again?
> > >
> > > Thank you for your help,
> > >
> > > --David
> > >
> > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > >
> > > > On 6/8/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > > Hi *,
> > > > >
> > > > > I'm a little uncertain about how the pageFlowScope interacts with the
> > > browser's Back button.
> > > > The
> > > > > documentation states:
> > > > >
> > > > >   "...clicking the Back button will automatically reset the page flow
> > > scope to its original
> > > > > state."
> > > > >
> > > > > Which 'original state' is this referring to?
> > > > >
> > > > > For example, suppose I have this situation:
> > > > >
> > > > > I have a wizard application.  On the first page of the wizard, the
> > > user should enter a
> > > > username
> > > > > and password and then proceed to the next page of the wizard.
> > > > >
> > > > > When the first page of the wizard loads, the username and password
> > > fields may be entered into.
> > > > > The page that takes the user to the first wizard page creates a "mode"
> > > variable in the page
> > > > flow
> > > > > scope and sets it to "create".
> > > > >
> > > > > After entering valid information, the user presses the "next" button
> > > on the wizard.  In
> > > > processing
> > > > > the command button, the code sets the page flow scope variable "mode"
> > > to "wizard".
> > > > >
> > > > > When on the second page of the wizard, the user then presses the
> > > "back" button.  What is the
> > > > value
> > > > > of the "mode" variable in the page flow scope? "create" or "wizard"?
> > > >
> > > > It's "create".

[COMMUNITY] Danny Robinson - Committer

2007-06-14 Thread Matthias Wessendorf

Congratulations to Danny Robinson for becoming the newest Myfaces committer !

Danny has provided patches and enhancements to Trinidad and has been
active on the
mailing list to help other users on how to get up to speed with Trinidad.

Thanks Danny, and welcome to the team!

-Matthias

--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: How to Re-Initialize JSF Backing Bean on Form Submit

2007-06-14 Thread Andrew Robinson

"So when i move back & forth (i.e. navigate) from Current JSF page to Other
page and comeback to Current JSF page it should re-initialize/re-create bean"

That is what request scope is

On 6/14/07, bansi <[EMAIL PROTECTED]> wrote:


The requirement is to have backing bean in session scope.
So when i move back & forth (i.e. navigate) from Current JSF page to Other
page and comeback to Current JSF page it should re-initialize/re-create bean
instance and ofcourse it has to clear of the data on form fields of current
page

I tried doing this in my PhaseListener but it doesnt re-create/re-initialize
the bean instance (i.e. it doesn't call the constructor in the bean)

public void afterPhase(PhaseEvent pe)

{

FacesContext facesContext = pe.getFacesContext();

String viewId = pe.getFacesContext().getViewRoot().getViewId();

String managedBeanName = getManagedBeanNameFromView(viewId);

String BackingBeanName = managedBeanName.substring(0,1).toUpperCase() +
managedBeanName.substring(1,managedBeanName.length());

String tempBeanStr = "new "+BackingBeanName+"()";

FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put"\""+managedBeanName+"\"",
tempBeanStr);

}









Andrew Robinson-5 wrote:
>
> I didn't mean to clear the form, but clear the backing bean properties.
>
> public class MyBean {
>   private MyObject myObject;
>
>   public String save() {
> // EntityManager or hibernate session save here
> // clear the properties:
> clearState();
>   }
>
>   public void onCancel(ActionEvent evt) {
> clearState();
>   }
>
>   private void clearState() {
> myObject = null;
>   }
> }
>
> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote:
>>
>> I figured out that i can do something like this ...
>> In session scope, only one instance of the backing bean will be used
>> during
>> the whole browser session. When you want to recreate the managed bean
>> inside
>> the backing bean during session, then do
>> FacesContext
>>.getCurrentInstance()
>>   .getExternalContext()
>>  .getSessionMap()
>> .put("myBean", new MyBean());
>>
>> BUT i am not sure where to put this snippet of code.
>>
>>
>>
>> bansi wrote:
>> >
>> > Andrew
>> > I totally agree with you on "its the desired behavior of a session bean
>> --
>> > one instance for the
>> > user's session"
>> > But is their a way to recreate the instance of backing bean  in
>> following
>> > situations
>> > 1) Whenever a new record is inserted into database. The reason i
>> mention
>> > this is my backing bean instantiates the pojo and for subsequent save
>> into
>> > database the backing bean holds onto the old instance of pojo having
>> same
>> > identifier (ID) value. This is exactly the reason Hibernate throws
>> > Detached Object Exception passed to Persist
>> >
>> > 2) Whenever i  navigate between JSF pages , i wanna backing bean to be
>> > re-initialized i.e. re-created with new instance
>> >
>> > Please note as suggested by you i am not looking to clear off the
>> fields
>> > on the form whereas i want to recreate the whole backing bean itself
>> >
>> > Any pointers/suggestions highly appreciated
>> >
>> > Regards
>> > Bansi
>> >
>> >
>> > Andrew Robinson-5 wrote:
>> >>
>> >> That is the desired behavior of a session bean -- one instance for the
>> >> user's session. If you want to use session, and have it be able to be
>> >> cleared, then you will want to create a clear action or action
>> >> listener method that clears all of the member variables when executed.
>> >>
>> >> I would instead recommend using conversational scope from JBoss-Seam
>> >> or MyFaces or request scope and use saveState as needed to persist
>> >> values across pages.
>> >>
>> >> -Andrew
>> >>
>> >> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>> We have backing bean defined in "session" scope
>> >>> So whenever we do a submit on JSF Form, it holds onto same backing
>> bean.
>> >>> This is not desirable as
>> >>> -> The Form will have  different set of values each time it does a
>> >>> submit
>> >>> -> The Backing bean has variable defined to instantiate a POJO
>> >>> i.e.private
>> >>> MyPojo pojo = new MyPojo();
>> >>> So every time JSF form submits to the backing bean, it holds onto the
>> >>> same
>> >>> instance of POJO which eventually results in insertion problems into
>> >>> database i.e. having same Identifier (ID) value
>> >>> -> The same problem occurs if i navigate to different page and come
>> back
>> >>> to
>> >>> original page
>> >>>
>> >>> Is their a way to re-initialize the Backing Bean ???
>> >>> --
>> >>> View this message in context:
>> >>>
>> 
http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a0517
>> >>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> 
http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a1042
>> Sent from the M

Re: How to Re-Initialize JSF Backing Bean on Form Submit

2007-06-14 Thread bansi

The requirement is to have backing bean in session scope.
So when i move back & forth (i.e. navigate) from Current JSF page to Other
page and comeback to Current JSF page it should re-initialize/re-create bean
instance and ofcourse it has to clear of the data on form fields of current
page

I tried doing this in my PhaseListener but it doesnt re-create/re-initialize
the bean instance (i.e. it doesn't call the constructor in the bean)

public void afterPhase(PhaseEvent pe)

{ 

FacesContext facesContext = pe.getFacesContext();

String viewId = pe.getFacesContext().getViewRoot().getViewId();

String managedBeanName = getManagedBeanNameFromView(viewId); 

String BackingBeanName = managedBeanName.substring(0,1).toUpperCase() +
managedBeanName.substring(1,managedBeanName.length());

String tempBeanStr = "new "+BackingBeanName+"()";

FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put"\""+managedBeanName+"\"",
tempBeanStr);

}









Andrew Robinson-5 wrote:
> 
> I didn't mean to clear the form, but clear the backing bean properties.
> 
> public class MyBean {
>   private MyObject myObject;
> 
>   public String save() {
> // EntityManager or hibernate session save here
> // clear the properties:
> clearState();
>   }
> 
>   public void onCancel(ActionEvent evt) {
> clearState();
>   }
> 
>   private void clearState() {
> myObject = null;
>   }
> }
> 
> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote:
>>
>> I figured out that i can do something like this ...
>> In session scope, only one instance of the backing bean will be used
>> during
>> the whole browser session. When you want to recreate the managed bean
>> inside
>> the backing bean during session, then do
>> FacesContext
>>.getCurrentInstance()
>>   .getExternalContext()
>>  .getSessionMap()
>> .put("myBean", new MyBean());
>>
>> BUT i am not sure where to put this snippet of code.
>>
>>
>>
>> bansi wrote:
>> >
>> > Andrew
>> > I totally agree with you on "its the desired behavior of a session bean
>> --
>> > one instance for the
>> > user's session"
>> > But is their a way to recreate the instance of backing bean  in
>> following
>> > situations
>> > 1) Whenever a new record is inserted into database. The reason i
>> mention
>> > this is my backing bean instantiates the pojo and for subsequent save
>> into
>> > database the backing bean holds onto the old instance of pojo having
>> same
>> > identifier (ID) value. This is exactly the reason Hibernate throws
>> > Detached Object Exception passed to Persist
>> >
>> > 2) Whenever i  navigate between JSF pages , i wanna backing bean to be
>> > re-initialized i.e. re-created with new instance
>> >
>> > Please note as suggested by you i am not looking to clear off the
>> fields
>> > on the form whereas i want to recreate the whole backing bean itself
>> >
>> > Any pointers/suggestions highly appreciated
>> >
>> > Regards
>> > Bansi
>> >
>> >
>> > Andrew Robinson-5 wrote:
>> >>
>> >> That is the desired behavior of a session bean -- one instance for the
>> >> user's session. If you want to use session, and have it be able to be
>> >> cleared, then you will want to create a clear action or action
>> >> listener method that clears all of the member variables when executed.
>> >>
>> >> I would instead recommend using conversational scope from JBoss-Seam
>> >> or MyFaces or request scope and use saveState as needed to persist
>> >> values across pages.
>> >>
>> >> -Andrew
>> >>
>> >> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>> We have backing bean defined in "session" scope
>> >>> So whenever we do a submit on JSF Form, it holds onto same backing
>> bean.
>> >>> This is not desirable as
>> >>> -> The Form will have  different set of values each time it does a
>> >>> submit
>> >>> -> The Backing bean has variable defined to instantiate a POJO
>> >>> i.e.private
>> >>> MyPojo pojo = new MyPojo();
>> >>> So every time JSF form submits to the backing bean, it holds onto the
>> >>> same
>> >>> instance of POJO which eventually results in insertion problems into
>> >>> database i.e. having same Identifier (ID) value
>> >>> -> The same problem occurs if i navigate to different page and come
>> back
>> >>> to
>> >>> original page
>> >>>
>> >>> Is their a way to re-initialize the Backing Bean ???
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a0517
>> >>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a1042
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a11124339
Sent from the MyFaces - User

RE: [Trinidad] Page flow scope and Back button

2007-06-14 Thread William Hoover
I wonder why this was not implemented in trinidad's base classes/interfaces in 
a generic way?

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 13, 2007 9:26 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page flow scope and Back button


On 6/13/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> Thanks for the tip!  That makes a lot of sense to me, but I'm a little 
> confused about
> implementation.  Does it make a difference 'when' in the lifecycle I set the 
> variables?
>
> For example, suppose the user enters the URL for my create page: */create.jsf
> Then, there will be no attributes stored on the page.  So, I create them, but 
> that occurs
> in the render response phase of the page:

That's the problem!  It's a gotcha with page flow scope:  if you wait
until render response to add something, it gets dropped.  I think
there's a logged warning, but I'm not 100% sure of that.

The reason for this is that we generate tokens lazily - we don't
want to add a pageflowscope token unless absolutely necessary -
but if you add it in render response, we've likely already sent the
postback URL down to the client.

-- Adam


>
> RequestContext.getCurrentInstance().getPageFlowScope().put("createdVar", 
> Boolean.FALSE);
> Boolean [] createdArr = new Boolean[ 1 ];
> createdArr[ 0 ] = Boolean.FALSE;
> RequestContext.getCurrentInstance().getPageFlowScope().put("createdArr", 
> createdArr);
>
> Then, when the user presses 'save' on the page, then the save method runs, in 
> which I update the
> variables:
>
> RequestContext context = RequestContext.getCurrentInstance();
> context.getPageFlowScope().put("createdVar", Boolean.TRUE);
> Boolean [] createdArr = (Boolean []) 
> context.getPageFlowScope().get("createdArr");
> createdArr[ 0 ] = Boolean.TRUE;
>
> When I press the 'back' button, then neither of these attributes exist on the 
> page--it's as though
> the user had re-entered the page URL.
>
> So, I think I'm missing an important piece--how do I make sure the page 
> attributes are stored on
> the page to begin with?  or is there no way to do that?
>
> Thanks again for your help,
>
> --David
>
> --- Adam Winer <[EMAIL PROTECTED]> wrote:
>
> > Sure, what you do is:
> > - Store a token - Integer, String, enum, anything you want, that indicates
> > what page you're on, just like you're doing now.  As you know, this will be
> > restore when the back button is hit.
> >
> > - In addition to storing that token right on the pageFlowScope, also set it
> > into a one-element array on the pageFlowScope - but don't create a new array
> > each time, just keep writing into that first element.
> >
> > The one-element array will *not* be restored to its prior state, because
> > it's still the same instance.  Consequently, when you go back a page, you'll
> > see that the token directly on the page won't match the token within the
> > array.  Back button detected!
> >
> > You could encapsulate this strategy into a reusable object if desired.
> >
> > -- Adam
> >
> >
> >
> > On 6/11/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks, that clarifies the documentation.
> > >
> > > So, my follow-up question would be: Is there any way that I can detect in
> > > Trinidad that the user
> > > has gone from one page to the next one and then back again?
> > >
> > > Thank you for your help,
> > >
> > > --David
> > >
> > > --- Adam Winer <[EMAIL PROTECTED]> wrote:
> > >
> > > > On 6/8/07, D. Cardon <[EMAIL PROTECTED]> wrote:
> > > > > Hi *,
> > > > >
> > > > > I'm a little uncertain about how the pageFlowScope interacts with the
> > > browser's Back button.
> > > > The
> > > > > documentation states:
> > > > >
> > > > >   "...clicking the Back button will automatically reset the page flow
> > > scope to its original
> > > > > state."
> > > > >
> > > > > Which 'original state' is this referring to?
> > > > >
> > > > > For example, suppose I have this situation:
> > > > >
> > > > > I have a wizard application.  On the first page of the wizard, the
> > > user should enter a
> > > > username
> > > > > and password and then proceed to the next page of the wizard.
> > > > >
> > > > > When the first page of the wizard loads, the username and password
> > > fields may be entered into.
> > > > > The page that takes the user to the first wizard page creates a "mode"
> > > variable in the page
> > > > flow
> > > > > scope and sets it to "create".
> > > > >
> > > > > After entering valid information, the user presses the "next" button
> > > on the wizard.  In
> > > > processing
> > > > > the command button, the code sets the page flow scope variable "mode"
> > > to "wizard".
> > > > >
> > > > > When on the second page of the wizard, the user then presses the
> > > "back" button.  What is the
> > > > value
> > > > > of the "mode" variable in the page flow scope? "create" or "wizard"?
> > > >
> > > > It's "create".
> > > >
> > > > -- Adam
> > > >
> > > > >
> > > > > I would like

[Trinidad] how to trigger PPR manually

2007-06-14 Thread Renzo Tomaselli
Hi, I'm looking for a method to trigger PPR upon setting certain 
conditions on client operations.
I have a multipanel page, where one panel contains an iframe for 
rendering a blob through browser plugins.
Users are allowed to swap, minimize and restore panels through js, thus 
these operations are purely client-bound.
When the Adobe plugin is involved to manage iframe contents (both on IE 
and FF), the iframe area is not refreshed after its panel is restored or 
swapped.

Don't ask me why.
Thus I need to force a refresh, and this would be much better if 
partial, e.g. concerning only that panel.

How can I trigger it from js ?
Thanks -- Renzo



Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Adam Winer

On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:


Hi,

I am trying to use trinidad together with other tomahawk and SUN RI
components. The view technology is JSP. So I followed the instructions for
installing trinidad from the myFaces page. Some JSP work but others don't.

I get the following message after I submit the form :

### backing-bean method -> start ###
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerData] is: 0
ms
## return string is: editConsumer ##
14.06.2007 10:10:00 org.apache.myfaces.trinidad.context.RenderingContext
attach
WARNUNG: Trying to attach RenderingContext to a thread that already had one.
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerOverview]
is: 0 ms

I get this message many times until a StackOverflowError occurs:

FATAL: Servlet.service() for servlet Faces Servlet threw exception
java.lang.StackOverflowError
at org.apache.catalina.connector.Request.doGetSession(Request.java:2190)
at org.apache.catalina.connector.Request.getSession(Request.java:2031)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:832)
...


Can you give us a longer stack trace?  We need to see what
part of the stack is recursive.

-- Adam



...

Why does this error occur only at some JSPs, and why only when the
STATE_SAVING_METHOD is "client"?

By the way: if the STATE_SAVING_METHOD is "server" it works so far, but
there still is the following warning:
...
14.06.2007 09:59:30
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
encodeFinally
WARNING: No AdfRenderingContext available
...
What does ths warning mean?

Thanks in advance
Hans
--
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a5961
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: in trinidad-1.0.0 don't work in IE6

2007-06-14 Thread Adam Winer

Going forward, hopefully we'll be better about getting
the actual version number into the URL for the Javascript,
at which point caching won't be an issue (except for
people using SNAPSHOTs).

-- Adam


On 6/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi,

Thanks, it was a caching problem. After I cleared the browser cache,
It works fine.

--Robert



-Ursprüngliche Nachricht-
Von: Adam Winer [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 13. Juni 2007 02:30
An: MyFaces Discussion
Betreff: Re:  in trinidad-1.0.0 don't work in IE6

I can't reproduce a problem in IE7 with the latest, 1.0.1-SNAPSHOT code.  I 
don't happen to have IE6 handy, though I doubt there'd be a difference between 
the two.  Have you tried clearing the browser cache?

-- Adam


On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
> I have a Project with MyFaces 1.1.3,
> adf-faces-XXX-incubator-m1-SNAPSHOT und Spring.
> I tryed the selectManyShuttle-Component and it worked fine. Last week
> I made a upgrade From adf-faces-XXX-incubator-m1-SNAPSHOT to
> trinidad-1.0.0.
> It was all fine and the application
> Worked fine, but after the upgrade I recognized that the
>  Component Not worked in IE6, only in Firefox
> 2.0.
> The IE6 show me an JavaScript-Error "can't find trShuttleProxy".
> What's wrong?
>
> Regards,
> Robert Reiz
> (24/7-IT-Services)



Re: [Tobago] Multiple defaultCommands in the same Tobago Page

2007-06-14 Thread Volker Weber

Which version of tobago? Or what is in line 1199 in tobago.js?

This solution is not compatible with input suggest, because there is
already a keyup handler.

for the inputs in the sheet this could work, just the setup is more complicated.

omit the "page:" in the init fuction call, but add the sheetId and
iterate the rows
e.g.

function initOnEnter(sheetId, inputId, actionId) {
  var row = 0;
  var input = Tobago.element(sheetId + ":" + row + ":" + inputId);
  while (input) {
input.actionId = actionId;
Tobago.addEventListener(input, "keyup", "submitOnEnter(event)");
row++;
input = Tobago.element(sheetId + ":" + row + ":" + inputId);
  }
}

change the submitAction part in the submitOnEnter function to

 if (keyCode == 13) {
   var input = Tobago.element(event);
   var idPrefix = input.id.substring(0, input.id.lastIndexOf(":") + 1);
   Tobago.submitAction(idPrefix +  input.actionId);
 }

if your sheet is loaded via ajax or has paging/sorting enabled you
must invoke the init function via tc:out escape=false.
Also the initial value for row needs  to passed to the init function then.


Regards,
   Volker



2007/6/14, Madan Narra <[EMAIL PROTECTED]>:

Hi Volker ..

Placed the same code as specified by you in previous mails...

When working in FF with FireBug in it, saw this error

uncaught exception: [Exception... "Could not convert JavaScript argument"
nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame ::
http://localhost:8080/XXX/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
:: anonymous :: line 1199"  data: no]

Line 0
And one more thing,

The First Textbox has an inputSuggest feature and the seacond textbox as
described in previous mail is a column in sheet with multiple textboxs and
has an renderPartially set to it.

Will your solution work for my case ?

Regards,
Madan N


Re: dataTable - only show first 10 results

2007-06-14 Thread Andrew Robinson

Why not limit the number of rows bound to the DataModel in the backing
bean? Then have an action listener on the show all button that changes
the method to return the data without the limit.

private boolean limitRows = true;
private List data;
public boolean isLimitRows() { return this.limitRows; }
public void setLimitRows(boolean limitRows) { this.limitRows = limitRows; }
public List getData() {
 if (limitRows) {
   return data.subList(0, Math.max(10, data.size()));
 } else {
   return data;
 }
}


 
   
 
   
 
 
   
 
   
 
 
 ...



On 6/14/07, geirgp <[EMAIL PROTECTED]> wrote:


I'm totally new to JavaScript and JSF, so I'm seeking a bit of advise here..

I want to hide all but the first 10 rows in a dataTable and have a link
(javascript) "Show all" that reveals the hidden rows when clicked.

Any ideas?

Thanks in advance
--
View this message in context: 
http://www.nabble.com/dataTable---only-show-first-10-results-tf3921795.html#a11120357
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: Is problem with myfaces ?

2007-06-14 Thread Andrew Robinson

Use either myfaces-impl & myfaces-api OR jsf-api and jsf-impl, but
*never* a combination of myfaces and jsf.

On 6/13/07, sandipp <[EMAIL PROTECTED]> wrote:


Hi ,

Thanks for the response.

Here I am registering my bean as,

 
  loginFormBean
  com.LoginForm
  request
 

As you said keep only one jar out of jsf & myfaces.
But my another project working fine when I kept both jars.(actually I need
both jars because if I remove one of jars then some of functionalities
inside my application not working)

So can you please suggest in this.What might be wrong.

Thanks
Sandip


Andrew Robinson-5 wrote:
>
> "Base is null" means that the base object of the EL expression is
> null. In this case, #{loginFormBean} is evaluating to null. So the
> variable resolver is not finding "loginFormBean" in any of the JSF
> contexts and is not auto-creating it.
>
> Could you post how you register this bean?
>
> Also, as for jars make sure you don't have jsf-api, jsf-impl as you
> mentioned, but also make sure myfaces-api and myfaces-impl are the
> only myfaces jars in your classpath.
>
> Also make sure you have this in your web.xml:
>
>   
> 
>   org.apache.myfaces.webapp.StartupServletContextListener
> 
>   
>
>
> On 5/28/07, Sandip Patil <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> I am facing some strange problem while working with JSF.
>> I have created one project which is running fine.If I create another
>> project
>> with another name(but same src/JSP's files) its giving me below error
>>
>> I am getting error as,Base is null Error.
>>
>> I am trying to login my application by entering username & password &
>> then
>> click on login button.
>>
>> But its showing me error as,
>>
>> javax.servlet.ServletException: Base is null: loginFormBean
>> javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
>> 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
>>
>> where loginFormBean is name of my Bean in faces-config to accept username
>> &
>> password values from client side.
>> 
--
>>
>>
>> I am using JDK1.5,Tomcat 5.5,Exadel
>>
>> Also I have jar files in my lib folder as,
>> jsf-api.jar,jsf-impl.jar,myfaces-api.jar,myfaces-impl.jar,tomahawk.jar
>>
>>
>> If I remove jsf-api.jar,jsf-impl.jar these jar files its not showing Base
>> is
>> null error.
>>
>> But It is creating another problem.
>> I have edit link ,If i remove above two jar files then I have to double
>> clik
>> that edit link then & then only edit page is opening.(It is not opening
>> in
>> one click)
>> Similar case happening for buttons.I need to double click buttons.
>>
>> But if above( jsf-api.jar,jsf-impl.jar ) jar files there then its showing
>> Base is null error.
>> 

>>
>> Then I ,removed myfaces-api.jar,myfaces-impl.jar with
>> myfaces-api-1.1.5.jar,myfaces-impl-1.1.5.jar.
>> I removed jsf-api.jar,jsf-impl.jar files.
>> Now Base is null error is not coming.Also I do not need to double click
>> on
>> edit link,buttons.
>>
>> But to access menus I need to double click on menus.
>>
>> Can anybody help me in this "Base is null" error.What need to do ?
>>
>> Thanks
>> Sandip
>>
>>
>>
>>
>>  
>> Park yourself in front of a world of choices in alternative vehicles.
>> Visit the Yahoo! Auto Green Center.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/Is-problem-with-myfaces---tf3842605.html#a3958
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Tobago] Multiple defaultCommands in the same Tobago Page

2007-06-14 Thread Madan Narra

Hi Volker ..

Placed the same code as specified by you in previous mails...

When working in FF with FireBug in it, saw this error

uncaught exception: [Exception... "Could not convert JavaScript argument"
nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame ::
http://localhost:8080/XXX/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js::
anonymous :: line 1199"  data: no]

Line 0
And one more thing,

The First Textbox has an inputSuggest feature and the seacond textbox as
described in previous mail is a column in sheet with multiple textboxs and
has an renderPartially set to it.

Will your solution work for my case ?

Regards,
Madan N


Re: [Tomahawk] Overriding inputCalendar tag validation error messages

2007-06-14 Thread jnordstrom
Found out how to do it.  For conversion errors put this is the MessageBundle.properties file:org.apache.myfaces.calendar.CONVERSION=My Conversion Errororg.apache.myfaces.calendar.CONVERSION_detail=My Detail Conversion ErrorFor 'value missing' errors putjavax.faces.component.UIInput.REQUIRED=Please enter a valueJakob
---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]



AW: panelNavigation2

2007-06-14 Thread Koester, Ralf
Hi,
 
is there anything special to consider when using panelNavigation2 together with 
struts tiles?
 
I have two views which I always use to edit a reportconfiguration and then 
display a report.
klicking in the navigation loads a certain report into the 
editReportConfiguration.tiles view and then a commandbutton
loads this report into the showReport.tiles view. 
At this time the navigationPanel2 looses its state and the opened 
navigationitem closes.
 
I have tried to use setActiveOnViewIds in the debugger - then it works fine, 
but the problem is that I
can't set this for every navigationentry, because I use the same views on all 
navigationItems.
 
Any idea?
 
Best regards,

Ralf

-Ursprüngliche Nachricht-
Von: Koester, Ralf 
Gesendet: Mittwoch, 13. Juni 2007 17:48
An: MyFaces Discussion
Betreff: panelNavigation2


Hi,
 
i am using the Tomahawk(1.1.6 - before 1.1.5) panelNavigation2.
My problem is that it looses its state when I navigate from one view to another.
 
Best regards,
 
Ralf
 
 



Re: SelectOneMenu and null value

2007-06-14 Thread David Delbecq
Self responding as i have not friends, you know how it is, too much job,
too much geeky, no friend to send you postcard or birthday cards


Just to tell list and potential future seekers, it seems this problem
was fixed in svn, upgrading from 1.1.5 to 1.1.6-SNAPSHOT fixes the issue.

En l'instant précis du 14/06/07 15:12, David Delbecq s'exprimait en ces
termes:
> Hello,
>
> I have a design where, in the select list of SelectOneMenu, i need to
> set a blank entry for null value.
>
> For now, i set it up like this
>
> 1) the list of available options contain an entry with label="" and
> value="[nothing]"
> 2) A converter is set to this list (based on value class). From
> "[nothing]", getAsObject returns null. From a null or an empty String,
> getAsString returns "[nothing]". Since SelectOneMenu uses the String to
> compare the list items to currentValue, this shouldn't pose problem. I
> have seen this solution proposed at several places on the web.
>
> This works nearly perfectly.
>
> 1) I can select the blank entry (even if baking bean already has a non
> null value), it success validation of component and copy null value to
> 'localeValue' of UIComponent, that will then be put in backingbean.
> 2) I can select the blank entry and call an immediate action, the
> submitted value is kept and, upon form, redisplay it correctly mark the
> blank one as 'selected'
>
> But it fails in this conditions
> 1) There is already a value in backing bean for this selectOneMenu and i
> didn't yet change it  in form (so localValue is not yet set!)
> 2) There are other component in form
> Now if during the same submit i choose the blank value and set a value
> in another component that will fail validation, after the validation
> error, the selected item is rolled back to previous one.
>
> Note, this error does not happen if i first change the entry to another
> one, call an immediate action (now localValue is set and is something
> else than null) and then reprocess to the failing operation.
>
> Anybody have any idea why, from time to time, the value change is
> ignored (not anymore in submitted, not in localValue)? This is very
> annoying as it looks to user like random partial form reset during
> validation, reset which happen in fields not marked has having
> validation errors.
>
> Regards,
> David Delbecq
>   



RE: How to Re-Initialize JSF Backing Bean on Form Submit

2007-06-14 Thread Thai Dang Vu
Have you ever tried Spring Web Flow? SWF supports conversational scope, flow 
scope , but I think Seam is better because it has everything for a web app 
while if you go with Spring, you need core spring, spring web flow and acegi 
(which is not very well-known for its integration with jsf).


From: Iskandar Zaynutdinov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 12:18 AM
To: MyFaces Discussion
Subject: Re: How to Re-Initialize JSF Backing Bean on Form Submit


On 6/14/07, bansi <[EMAIL PROTECTED]> wrote:

Thanks Andrew. As very correctly suggested by you i already have the code in
backing bean to clear the backing bean properties. But the problem is when i
move back and forth (i.e. navigate) from Current page to Other pages and 
come back to Current page, i want the backing bean associated with the
current page to be re-created i.e. new instance of backing bean.
Ofcourse i wanna clear the data on form fields




Andrew Robinson-5 wrote: 
>
> I didn't mean to clear the form, but clear the backing bean properties.
>
> public class MyBean {
>   private MyObject myObject;
>
>   public String save() {
> // EntityManager or hibernate session save here 
> // clear the properties:
> clearState();
>   }
>
>   public void onCancel(ActionEvent evt) {
> clearState();
>   }
>
>   private void clearState() {
> myObject = null;
>   }
> }
>
> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote:
>>
>> I figured out that i can do something like this ... 
>> In session scope, only one instance of the backing bean will be used
>> during
>> the whole browser session. When you want to recreate the managed bean
>> inside
>> the backing bean during session, then do 
>> FacesContext
>>.getCurrentInstance()
>>   .getExternalContext()
>>  .getSessionMap()
>> .put("myBean", new MyBean());
>>
>> BUT i am not sure where to put this snippet of code. 
>>
>>
>>
>> bansi wrote:
>> >
>> > Andrew
>> > I totally agree with you on "its the desired behavior of a session bean
>> --
>> > one instance for the 
>> > user's session"
>> > But is their a way to recreate the instance of backing bean  in
>> following
>> > situations
>> > 1) Whenever a new record is inserted into database. The reason i 
>> mention
>> > this is my backing bean instantiates the pojo and for subsequent save
>> into
>> > database the backing bean holds onto the old instance of pojo having
>> same 
>> > identifier (ID) value. This is exactly the reason Hibernate throws
>> > Detached Object Exception passed to Persist
>> >
>> > 2) Whenever i  navigate between JSF pages , i wanna backing bean to be 
>> > re-initialized i.e. re-created with new instance
>> >
>> > Please note as suggested by you i am not looking to clear off the
>> fields
>> > on the form whereas i want to recreate the whole backing bean itself 
>> >
>> > Any pointers/suggestions highly appreciated
>> >
>> > Regards
>> > Bansi
>> >
>> >
>> > Andrew Robinson-5 wrote:
>> >>
>> >> That is the desired behavior of a session bean -- one instance for the
>> >> user's session. If you want to use session, and have it be able to be
>> >> cleared, then you will want to create a clear action or action 
>> >> listener method that clears all of the member variables when executed.
>> >>
>> >> I would instead recommend using conversational scope from JBoss-Seam
>> >> or MyFaces or request scope and use saveState as needed to persist 
>> >> values across pages.
>> >>
>> >> -Andrew
>> >>
>> >> On 6/13/07, bansi <[EMAIL PROTECTED]> wrote: 
>> >>>
>> >>> We have backing bean defined in "session" scope
>> >>> So whenever we do a submit on JSF Form, it holds onto same backing
>> bean.
>> >>> This is not desirable as
>> >>> -> The Form will have  different set of values each time it does a
>> >>> submit
>> >>> -> The Backing bean has variable defined to instantiate a POJO 
>> >>> i.e.private
>> >>> MyPojo pojo = new MyPojo();
>> >>> So every time JSF form submits to the backing bean, it holds onto the
>> >>> same
>> >>> instance of POJO which eventually results in insertion problems into 
>> >>> database i.e. having same Identifier (ID) value
>> >>> -> The same problem occurs if i navigate to different page and come
>> back
>> >>> to
>> >>> original page 
>> >>>
>> >>> Is their a way to re-initialize the Backing Bean ???
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a0517
>> >>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a1042
>>  
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/How-to-Re-Initialize-JSF-Backing-Bean-on-Form-Submit-tf3918359.html#a3434

Table first row var == null?

2007-06-14 Thread Lewis Henderson
Hi,

 

I'm having a problem with the table implementation.

 

I have an application which worked under adf-faces and am moving it to
trinidad.

 

. slightly simplified..

 











 

The first row has a currentRow of null, the rest are correct. The correct
number of rows are being rendered.

 

Any ideas?

 

Lewis

 



Re: Skinning tr:inputText

2007-06-14 Thread Petr Kotek
I think, that You want only label of inputText be bold, not inputted 
text.  I think this is not possible by inline style.
Use  only on inputText 
components which to have bold label.
Advantage using styleClass - any style changing later are simple and on 
one place.


Peter

Francisco Passos wrote:
Since I wanted my inputTexts to be - by default - not bold, and then 
some of them I wanted bold, I ended up using inlineStyle to set 
font-weight: bold; ...


On 6/13/07, * Petr Kotek* <[EMAIL PROTECTED] > 
wrote:


Hello,

You must use in css:

.myStyleClass label {
  font-weight: bold;
}

I check it in Firefox only, but I think in IE must be the same.

Eventually refresh page in browser by Ctrl+F5.

Beside class, You may use element ID as:

#inputID label { ...


Best regards,
Peter


Stéphane Molina wrote:
> Hi all,
>
> My problem is exactly the same ...
> Did you find some solution ?
>
>
>
> Francisco Passos wrote:
>
>> No luck either. I'm sure there must be a way, though.
>>
>> On 5/14/07, Simon Lessard <[EMAIL PROTECTED]
> wrote:
>>
>>> H,
>>>
>>> What about af|inputText.myStyleClass::label?
>>>
>>> On 5/14/07, Francisco Passos < [EMAIL PROTECTED]
 > wrote:
>>>
 That was it, thank you! Firefox tends to keep the css in
cache, so

>>> after
>>>
 clearing it works fine.

 However your previous suggested solution for the initial
problem I
 presented:

 af|inputText::label.myStyleClass {

> font-weight : bold;
> }
>
> 
>
>
 does not seem to work, in that the label is not presented in
bold.

 On 5/14/07, Simon Lessard <[EMAIL PROTECTED]
> wrote:

> Hello Francisco,
>
> Hmmm it might be a browser cache problem. When working with
skin you
> have to clear your browser cache often else it will use the
cached
>
>>> CSS. I
>>>
> assume that, in your case, the last change you made either
triggered
>
>>> a
>>>
> filename change or your browser cache expired thus loading
the latest
>
>>> CSS
>>>
> and showing all changes.
>
>
> Regards,
>
> ~ Simon
>
> On 5/14/07, Francisco Passos < [EMAIL PROTECTED]
> wrote:
>
>> Oddly enough, if I add
>>
>> @platform windows, linux, solaris
>> {
>>   /** for ie and gecko on windows, linux and solaris, make the
>>
>>> color pink **/
>>>
>>
>>   @agent ie, gecko
>>   {
>> af|inputText::content {background-color:pink}
>>
>>   }
>> }
>>
>> to the css, suddenly everything works - the text size, the red
>> background color, the bold font weight...
>>
>> What should I make of this?
>>
>> On 5/14/07, Francisco Passos <[EMAIL PROTECTED]
> wrote:
>>
>>> Thank you for your hint, I'll try it as soon as I can.
>>>
>>> It seems that I'm not quite there yet, I'm two steps behind.
>>>
>>> I'm using a skin extending the simple-desktop:
>>>
>>> http://myfaces.apache.org/trinidad/skin";>
>>> 
>>> stp.desktop 
>>> stp
>>>  org.apache.myfaces.trinidad.desktop
>>> 
>>> 
>>> resources/css/skin-stp.css
>>> 
>>> simple.desktop
>>> 
>>> 
>>>
>>> and in skin-stp.css I define some things, such as
>>>
>>> .AFDefaultFont:alias {
>>>   font-size : 18px;
>>> }
>>>
>>> and
>>>
>>> af|inputText::label {
>>> background-color: red;
>>> font-weight: bold;
>>> }
>>>
>>> And none of them is working. The text is overall very small
>>> (nowhere near the 18px I put there to test) and tr:inputText
>>>
>>> labels are
>>>
>>> neither red nor bold. It seems like it is ignoring my
>>>
>>> skin-stp.cssdefinitions. What could cause this?
>>>
>>> On 5/11/07, Simon Lessard < [EMAIL PROTECTED]
 > wrote:
>>>
 Hello Francisco,

 You could try the following:

 af|inputText:: label.myStyleClass {
 font-weight : bold;
 }

 

 I think it might work.

[Tomahawk] Overriding inputCalendar tag validation error messages

2007-06-14 Thread jnordstrom
Hi, How can i override the default validation error messages of the t:inputCalendar tag?  Regards,Jakob
---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]



dataTable - only show first 10 results

2007-06-14 Thread geirgp

I'm totally new to JavaScript and JSF, so I'm seeking a bit of advise here.. 

I want to hide all but the first 10 rows in a dataTable and have a link
(javascript) "Show all" that reveals the hidden rows when clicked. 

Any ideas?

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/dataTable---only-show-first-10-results-tf3921795.html#a11120357
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Table first row var == null?

2007-06-14 Thread Lewis Henderson
Hi,

 

I'm having a problem with the table implementation.

 

I have an application which worked under adf-faces and am moving it to
trinidad.

 

. slightly simplified.

 











 

The first row has a currentRow of null, the rest are correct. The correct
number of rows are being rendered.

 

Any ideas?

 

Lewis

 



SelectOneMenu and null value

2007-06-14 Thread David Delbecq
Hello,

I have a design where, in the select list of SelectOneMenu, i need to
set a blank entry for null value.

For now, i set it up like this

1) the list of available options contain an entry with label="" and
value="[nothing]"
2) A converter is set to this list (based on value class). From
"[nothing]", getAsObject returns null. From a null or an empty String,
getAsString returns "[nothing]". Since SelectOneMenu uses the String to
compare the list items to currentValue, this shouldn't pose problem. I
have seen this solution proposed at several places on the web.

This works nearly perfectly.

1) I can select the blank entry (even if baking bean already has a non
null value), it success validation of component and copy null value to
'localeValue' of UIComponent, that will then be put in backingbean.
2) I can select the blank entry and call an immediate action, the
submitted value is kept and, upon form, redisplay it correctly mark the
blank one as 'selected'

But it fails in this conditions
1) There is already a value in backing bean for this selectOneMenu and i
didn't yet change it  in form (so localValue is not yet set!)
2) There are other component in form
Now if during the same submit i choose the blank value and set a value
in another component that will fail validation, after the validation
error, the selected item is rolled back to previous one.

Note, this error does not happen if i first change the entry to another
one, call an immediate action (now localValue is set and is something
else than null) and then reprocess to the failing operation.

Anybody have any idea why, from time to time, the value change is
ignored (not anymore in submitted, not in localValue)? This is very
annoying as it looks to user like random partial form reset during
validation, reset which happen in fields not marked has having
validation errors.

Regards,
David Delbecq


Re: [Tobago] Multiple defaultCommands in the same Tobago Page

2007-06-14 Thread Volker Weber

Sorry i need to fix the javascript functions:

function initOnEnter(textId, actionId) {
  var input = Tobago.element(textId);
  if input) {
input.actionId = actionId;
Tobago.addEventListener(input, "keyup", "submitOnEnter(event)");
  }
}
function submitOnEnter(event) {
  if (!event) {
// IE
event = window.event;
  }

 var keyCode;
   if (event.which) {
 keyCode = event.which;
   } else {
 keyCode = event.keyCode;
   }

  if (keyCode == 13) {
Tobago.submitAction(Tobago.element(event).actionId);
  }
}

2007/6/14, Volker Weber <[EMAIL PROTECTED]>:

Hi Madan,

it is not possible to have mor than one defaultCommand.

Can you use a 'change' facet?

I think we need a 'enter' (and 'escape' ...) facet.

Currently the only solution is to add a command facet and
add a eventlistener to the input by javascript to invoke the command
on keyup=13 event
like this:


  function initOnEnter(textId, actionId) {
var input = Tobago.element(textId);
if input) {
  input.actionId = actionId;
  Tobago.addEventListener(input, "keyup", "submitOnEnter(" + textId + ")");
}
  }

  function submitOnEnter(textId) {
Tobago.submitAction(Tobago.element(textId).actionId);
  }



  

  



note: this was just types from memory, but i have used something like
this before.
note2: tc:script (and tc:style) did not work on ajax requests e.g.
partial rendering.
  https://issues.apache.org/jira/browse/TOBAGO-332

Hope this helps

Regards,
Volker



2007/6/14, Madan Narra <[EMAIL PROTECTED]>:
> Hi All,
>
> I have created a template which has a SideNavigation Bar with a textfield
> and button, and the middle area has a textfield with a button next to it.
>
> I set defaultCommand="true" for both the buttons, but only one works at a
> time...
>
> is it possible to set defaultCommand="true" for both the buttons, and submit
> works to that button when the cursor focus  resides with its respecive
> textfield.. ?
>
> Can this be done... As i need this type of feature in my application
> --
> Regards,
> Madan N



Re: [Tobago] Multiple defaultCommands in the same Tobago Page

2007-06-14 Thread Volker Weber

Hi Madan,

it is not possible to have mor than one defaultCommand.

Can you use a 'change' facet?

I think we need a 'enter' (and 'escape' ...) facet.

Currently the only solution is to add a command facet and
add a eventlistener to the input by javascript to invoke the command
on keyup=13 event
like this:


 function initOnEnter(textId, actionId) {
   var input = Tobago.element(textId);
   if input) {
 input.actionId = actionId;
 Tobago.addEventListener(input, "keyup", "submitOnEnter(" + textId + ")");
   }
 }

 function submitOnEnter(textId) {
   Tobago.submitAction(Tobago.element(textId).actionId);
 }



 
   
 



note: this was just types from memory, but i have used something like
this before.
note2: tc:script (and tc:style) did not work on ajax requests e.g.
partial rendering.
 https://issues.apache.org/jira/browse/TOBAGO-332

Hope this helps

Regards,
   Volker



2007/6/14, Madan Narra <[EMAIL PROTECTED]>:

Hi All,

I have created a template which has a SideNavigation Bar with a textfield
and button, and the middle area has a textfield with a button next to it.

I set defaultCommand="true" for both the buttons, but only one works at a
time...

is it possible to set defaultCommand="true" for both the buttons, and submit
works to that button when the cursor focus  resides with its respecive
textfield.. ?

Can this be done... As i need this type of feature in my application
--
Regards,
Madan N


[Tobago] Multiple defaultCommands in the same Tobago Page

2007-06-14 Thread Madan Narra

Hi All,

I have created a template which has a SideNavigation Bar with a textfield
and button, and the middle area has a textfield with a button next to it.

I set defaultCommand="true" for both the buttons, but only one works at a
time...

is it possible to set defaultCommand="true" for both the buttons, and submit
works to that button when the cursor focus  resides with its respecive
textfield.. ?

Can this be done... As i need this type of feature in my application
--
Regards,
Madan N


Re: problem with s:timedNotifier

2007-06-14 Thread Werner Punz

Question, do you have the timed notifier tag embedded into a form?

Cheers

Werner



is_maximum schrieb:
> No Mike I'm sure this is not the Seam issue, because other components of
> sandbox work fine.
> and Also I studied the source code of the TimedNotifier
> in decode() method it is written an if statement:
> 
> if(component instanceof UIInput){
>
> }else{
>throw new UnsupportedOperationException("..."); // the exception message
> that I put to this post
> }
> 
> 
> 
> Mike Kienenberger wrote:
>> My apologies.  I misread your message as saying Tomahawk 1.1.5 and
>> Sandbox 1.1.6.
>>
>> Have you tried a simple example without Seam?   Maybe Seam and
>> Tomahawk have compatibility problems.
>>
>> On 6/5/07, is_maximum <[EMAIL PROTECTED]> wrote:
>>> Hi Mike
>>> but all of them are latest version. both sandbox and tomahawk are 1.1.5
>>> the only myfaces core api is 1.1.6
>>>
>>>
>>> Mike Kienenberger wrote:
 I don't think you can safely mix different Tomahawk and Tomahawk
 Sandbox versions.
 These two jar files are tightly-coupled.   Be sure you are using jars
 built from the same source.

 This is probably also the reason for the other problems you posted.


>>> --
>>> View this message in context:
>>> http://www.nabble.com/problem-with-s%3AtimedNotifier-tf3864962.html#a10976101
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>>
> 



Re: JSF and AJAX without custom components?

2007-06-14 Thread Werner Punz
For specialized cases it might be better to use servlets or servlet
filters as callback points.
The problem with phase listeners is they are called every time a request
is triggered.
The + side is, that you do not have to initialize jsf it is
preinitialized for you if you need access to the jsf inastructure

(which in many cases you wont need anyway, especially if you are on ejb3
or spring for providing the backend beans)
The other + side is, phase listeners are deployed more easily as we all
know.

So either way has its ups and downs, but if speed is a concern than
going the servlet route really might be better!



Stan Carney schrieb:
> Thanks for your response Ernst!
> 
> Yeah, I have looked around at pretty much every JSF AJAX framework out
> there and it isn't that I'm not impressed. There are definitely some
> smart people working to create generic components to be consumed by the
> masses. In our current position though I don't think these frameworks
> make a lot of sense for us to use. We have an extremely strong UI
> developer and we just want to be able to expose his talents, and in our
> current circumstance having to use pre-built AJAX components or having
> to create our own would severely hamper his abilities.
> 
> So anyway I have solved my problem via the following process. It allows
> us to interact with JSF, i.e. forms, via AJAX without having to write
> components. It has some significant short comings if it was going to be
> used for general consumption by the JSF community (i.e. lacking
> configuration, you can shoot your foot off easily, etc...) but works for
> us. So keeping with good list etiquette I'm posting my solution below
> for those, if any, that get a hit on my initial question.
> 
> 
> I have created a PhaseListener that runs after the RESTORE_VIEW phase
> and checks for the presence of a known parameter. Every parameter on
> every request is checked which I'm not a fan of but from what I have
> seen most other JSF/AJAX solutions do the same and it appears to run
> super fast. If a 'known' parameter exists the PhaseListener instantiates
> the class associated with the parameter for processing. In my case all
> of these 'processor' classes implement a simple interface with one
> method, process(), that takes a CaseInsensitiveMap as an argument. This
> map contains the map returned value from the getParameterMap() method on
> HttpServletRequest:
> 
> HttpServletRequest req = (HttpServletRequest)
> event.getFacesContext().getExternalContext().getRequest();
> CaseInsensitiveMap map = new CaseInsensitiveMap();
> map.putAll(req.getParameterMap());
> 
> The process() method then does what it needs to do. Typically finding
> components by their ids in the restored view, that are either known by
> the class or sent as parameters, and updating their values accordingly.
> Then the class composes an XML document that our client side JavaScript
> (taconite and/or JQuery) understands and returns this XML string. The
> PhaseListener then determines if the returned string contains a
> javax.faces.ViewState placeholder we came up with and substitutes the
> placeholder with the new ViewState value generated below. If there is no
> placeholder, i.e. not interacting with a JSF form, we can omit the
> updating of the ViewState value. In that case though we typically do
> straight HTTP and bypass JSF completely.
> 
>try {
>UIViewRoot viewRoot = context.getViewRoot();
> 
>StateManager stateMgr =
> context.getApplication().getStateManager();
>ComponentSupport.removeTransient(viewRoot);
> 
>SerializedView serializedView =
> stateMgr.saveSerializedView(context);
> 
>Object[] savedState = new Object[3];
>Object treeStruct = serializedView.getStructure();
>if (treeStruct != null) {
>if (treeStruct instanceof String) {
>savedState[0] = treeStruct;
>}
>}
>savedState[2] = viewRoot.getViewId();
>String viewState = StateUtils.construct(savedState,
> context.getExternalContext());
> 
>return viewState;
>} catch (Exception e) {
>throw new RuntimeException(e);
>}
> 
> The PhaseListener writes out the string to the response stream and marks
> the response as complete. The client JavaScript interprets the XML and
> updates the DOM. The DOM should now match the DOM stored on the server.
> 
> It works well for us and results in the creation of only one class,
> after the initial PhaseListener creation, per Ajaxable event. The above
> code does tinker with the internal workings of MyFaces which may/will
> cause us issues on an upgrade. I haven't tested it for thread-safety yet
> but everything I have seen with other frameworks leads me to believe all
> is well.
> 
> Thanks,
> Stan
> 
> 
> Ernst Fastl wrote:
>> Hi,
>>
>> I can understand you don't like to write your own component for
>> soving this prob

Re: [Tobago] Exception Handling in Tobago Pages

2007-06-14 Thread Madan Narra

Hi Bernd,

Thnx for ur reply...

I havent checked the demo app for error handling...

Its working fine now...

Regards,
Madan N


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Matthias Wessendorf

mmm,

looks ok

the resource servlet is for serving resources ;-)
like Skinning CSS and JS

-M

On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:


Yes, I configured the filter:


trinidad

org.apache.myfaces.trinidad.webapp.TrinidadFilter



trinidad
Faces Servlet


Faces Servlet

javax.faces.webapp.FacesServlet
1


I have also configured the following but I do not know what it is for. May
this be the reason?


  resources

org.apache.myfaces.trinidad.webapp.ResourceServlet
 



resources
/adf/*


In the faces-config I have added the default renderkit:

org.apache.myfaces.trinidad.core


I do not have any trinidad-config file but as I know I do not need one
neccessarily.
Hans




Matthias Wessendorf-4 wrote:
>
> Iwas wondering because of AdfRenderingContext,
> but that is a *legacy* logger entry,from old times.
> Fixed...
>
> To your issue:
> Did config the Filter ?
>
> On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:
>>
>> Do you mean an old version of trinidad?
>> I downloaded it yesterday, so it should be OK.
>>
>>
>> Matthias Wessendorf-4 wrote:
>> >
>> > AdfRenderingContext
>> >
>> > you are using an old version, I think
>> >
>> >
>>
>> --
>> View this message in context:
>> 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a6388
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>
>

--
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a7133
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Hans Reip

Yes, I configured the filter:


trinidad

org.apache.myfaces.trinidad.webapp.TrinidadFilter



trinidad
Faces Servlet


Faces Servlet

javax.faces.webapp.FacesServlet
1


I have also configured the following but I do not know what it is for. May
this be the reason?


  resources
 
org.apache.myfaces.trinidad.webapp.ResourceServlet
 



resources
/adf/*


In the faces-config I have added the default renderkit:

org.apache.myfaces.trinidad.core


I do not have any trinidad-config file but as I know I do not need one
neccessarily.
Hans




Matthias Wessendorf-4 wrote:
> 
> Iwas wondering because of AdfRenderingContext,
> but that is a *legacy* logger entry,from old times.
> Fixed...
> 
> To your issue:
> Did config the Filter ?
> 
> On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:
>>
>> Do you mean an old version of trinidad?
>> I downloaded it yesterday, so it should be OK.
>>
>>
>> Matthias Wessendorf-4 wrote:
>> >
>> > AdfRenderingContext
>> >
>> > you are using an old version, I think
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a6388
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Matthias Wessendorf
> 
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a7133
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Matthias Wessendorf

Iwas wondering because of AdfRenderingContext,
but that is a *legacy* logger entry,from old times.
Fixed...

To your issue:
Did config the Filter ?

On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:


Do you mean an old version of trinidad?
I downloaded it yesterday, so it should be OK.


Matthias Wessendorf-4 wrote:
>
> AdfRenderingContext
>
> you are using an old version, I think
>
>

--
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a6388
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


RE: [Trinidad] output

2007-06-14 Thread MOLINA Stéphane
It is exactly what I was looking for ... :)

Thanks a lot ! 

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Matthias 
Wessendorf
Envoyé : jeudi 14 juin 2007 11:18
À : MyFaces Discussion
Objet : Re: [Trinidad]  output

Any reason, why not using




...



-M

On 6/14/07, MOLINA Stéphane <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> I use trinidad by inserting some components like tables in an existing JSF 
> pages.
> I found that it was necessary to use  to have some skinning 
> capabilities. But  genarates ,  and .
> This is conflicting with our current templating ( has strange 
> comportements in a metaContainer facet).
>
> So I want to create some  that would render like a . CSS 
> parsing for skins would be provided too.
> This new component would permit to avoid using  just for skin 
> CSS loading.
>
> What do you think about this ? Do you have some advices or comments about 
> that ?
>
>
>
> Thank you by advance
>
> --
> Stéphane Molina
>


--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Hans Reip

Do you mean an old version of trinidad?
I downloaded it yesterday, so it should be OK.


Matthias Wessendorf-4 wrote:
> 
> AdfRenderingContext
> 
> you are using an old version, I think
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a6388
Sent from the MyFaces - Users mailing list archive at Nabble.com.



using "visibleOnUserRole" attribute dynamical

2007-06-14 Thread Raymund Nickel
Hi,

 

when you use the tomahawk library, most of the tags have two nice
attributes to handle userroles (visibleOnUserRole and enabledOnUserRole)
.

I want to use it in a NavigationMenuItem. If you build that item in a
static way with a tag, its no problem. But if you want build it in a
dynamical way, I cant find the method to declare this attribute. Is it
possible to do that? How...?

 

Thx a lot,

cya



Re: sitemesh & MyFaces sandbo

2007-06-14 Thread binya

but did you find a solution? I'm quite stuck...


Titi Wangsa wrote:
> 
> On 6/13/07, binya <[EMAIL PROTECTED]> wrote:
>>
>> Hi our project works with jsf & sitemesh, I'm trying to use a componenet
>> of
>> MyFaces sandbox:
>> s:tableSuggestAjax (which gives a suggest list with Ajax to an input)
>>
>> When I insert  a input nothing happens, and I get this warnning:
>>
>> WARN  org.apache.myfaces.renderkit.html.util.DefaultAddResource - MyFaces
>> special javascript could not be retrieved from request-map.
>>
>> I'll be thankfull for any help, Binya.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/sitemesh---MyFaces-sandbox-tf3914232.html#a11097979
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> i get that too. i'm using shale. i think its a known issue with shale.
> not sure about sitemesh.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sitemesh---MyFaces-sandbox-tf3914232.html#a6280
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Trinidad] output

2007-06-14 Thread Matthias Wessendorf

Any reason, why not using

   
   
   
   ...
   


-M

On 6/14/07, MOLINA Stéphane <[EMAIL PROTECTED]> wrote:

Hi,


I use trinidad by inserting some components like tables in an existing JSF 
pages.
I found that it was necessary to use  to have some skinning capabilities. But 
 genarates ,  and .
This is conflicting with our current templating ( has strange 
comportements in a metaContainer facet).

So I want to create some  that would render like a . CSS 
parsing for skins would be provided too.
This new component would permit to avoid using  just for skin CSS 
loading.

What do you think about this ? Do you have some advices or comments about that ?



Thank you by advance

--
Stéphane Molina




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: How to Re-Initialize JSF Backing Bean on Form Submit

2007-06-14 Thread Werner Punz
bansi schrieb:
> Thanks Andrew. As very correctly suggested by you i already have the code in
> backing bean to clear the backing bean properties. But the problem is when i
> move back and forth (i.e. navigate) from Current page to Other pages and 
> come back to Current page, i want the backing bean associated with the
> current page to be re-created i.e. new instance of backing bean.
> Ofcourse i wanna clear the data on form fields
> 
Shales view controller might help you out, afair the init callback is
called only
when the page is reentered from outside...

Give it a try,
otherwise you can achieve it via orchestra as well via the valueBound
callback in its conversation controllers, but Shale for now probably is
the easier solution to get up and running.



RE: Skinning tr:inputText

2007-06-14 Thread MOLINA Stéphane
Hi,
 
I found the problem : I did not use  which compile CSS files of 
skins in the HeadRenderer and output  element.
 
I am looking for doing a nez component for just manage skining CSS. See an 
another mail from me in this ML.



De : Francisco Passos [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 14 juin 2007 11:08
À : MyFaces Discussion
Objet : Re: Skinning tr:inputText


Since I wanted my inputTexts to be - by default - not bold, and then some of 
them I wanted bold, I ended up using inlineStyle to set font-weight: bold; ...


On 6/13/07, Petr Kotek <[EMAIL PROTECTED]> wrote: 

Hello, 

You must use in css:

.myStyleClass label {
  font-weight: bold;
}

I check it in Firefox only, but I think in IE must be the same.

Eventually refresh page in browser by Ctrl+F5.

Beside class, You may use element ID as: 

#inputID label { ...


Best regards,
Peter


Stéphane Molina wrote:
> Hi all,
>
> My problem is exactly the same ...
> Did you find some solution ?
>
>
> 
> Francisco Passos wrote:
>
>> No luck either. I'm sure there must be a way, though.
>>
>> On 5/14/07, Simon Lessard <[EMAIL PROTECTED] > wrote:
>>
>>> H,
>>>
>>> What about af|inputText.myStyleClass::label?
>>>
>>> On 5/14/07, Francisco Passos < [EMAIL PROTECTED]   > wrote:
>>>
 That was it, thank you! Firefox tends to keep the css in cache, so

>>> after
>>>
 clearing it works fine. 

 However your previous suggested solution for the initial problem I
 presented:

 af|inputText::label.myStyleClass {
 
> font-weight : bold;
> }
>
> 
>
> 
 does not seem to work, in that the label is not presented in bold.

 On 5/14/07, Simon Lessard <[EMAIL PROTECTED] > wrote:

> Hello Francisco,
>
> Hmmm it might be a browser cache problem. When working with skin 
you
> have to clear your browser cache often else it will use the 
cached 
>
>>> CSS. I
>>>
> assume that, in your case, the last change you made either 
triggered
>
>>> a
>>>
> filename change or your browser cache expired thus loading the 
latest 
>
>>> CSS
>>>
> and showing all changes.
>
>
> Regards,
>
> ~ Simon 
>
> On 5/14/07, Francisco Passos < [EMAIL PROTECTED]> wrote:
>
>> Oddly enough, if I add 
>>
>> @platform windows, linux, solaris
>> {
>>   /** for ie and gecko on windows, linux and solaris, make the
>> 
>>> color pink **/
>>>
>>
>>   @agent ie, gecko
>>   {
>> af|inputText::content {background-color:pink} 
>>
>>   }
>> }
>>
>> to the css, suddenly everything works - the text size, the red
>> background color, the bold font weight... 
>>
>> What should I make of this?
>>
>> On 5/14/07, Francisco Passos <[EMAIL PROTECTED] > wrote:
>>
>>> Thank you for your hint, I'll try it as soon as I can.
>>>
>>> It seems that I'm not quite there yet, I'm two steps behind. 
>>>
>>> I'm using a skin extending the simple-desktop:
>>>
>>> http://myfaces.apache.org/trinidad/skin";>
>>> 
>>> stp.desktop 
>>> stp 
>>>  org.apache.myfaces.trinidad.desktop
>>> 
>>> 
>>> resources/css/skin-stp.css
>>> 
>>> simple.desktop
>>> 
>>> 
>>>
>>> and in skin-stp.css I define some things, such as
>>> 
>>> .AFDefaultFont:alias {
>>>   font-size : 18px;
>>> }
>>>
>>> and
>>> 
>>> af|inputText::label {
>>> background-color: red;
>>> font-weight: bold;
>>> }
>>> 
>>> And none of them is working. The text is overall very small
>>> (nowhere near the 18px I put there to test) and tr:inputText
>>

Re: Skinning tr:inputText

2007-06-14 Thread Francisco Passos

Since I wanted my inputTexts to be - by default - not bold, and then some of
them I wanted bold, I ended up using inlineStyle to set font-weight: bold;
...

On 6/13/07, Petr Kotek <[EMAIL PROTECTED]> wrote:


Hello,

You must use in css:

.myStyleClass label {
  font-weight: bold;
}

I check it in Firefox only, but I think in IE must be the same.

Eventually refresh page in browser by Ctrl+F5.

Beside class, You may use element ID as:

#inputID label { ...


Best regards,
Peter


Stéphane Molina wrote:
> Hi all,
>
> My problem is exactly the same ...
> Did you find some solution ?
>
>
>
> Francisco Passos wrote:
>
>> No luck either. I'm sure there must be a way, though.
>>
>> On 5/14/07, Simon Lessard <[EMAIL PROTECTED]> wrote:
>>
>>> H,
>>>
>>> What about af|inputText.myStyleClass::label?
>>>
>>> On 5/14/07, Francisco Passos <[EMAIL PROTECTED] > wrote:
>>>
 That was it, thank you! Firefox tends to keep the css in cache, so

>>> after
>>>
 clearing it works fine.

 However your previous suggested solution for the initial problem I
 presented:

 af|inputText::label.myStyleClass {

> font-weight : bold;
> }
>
> 
>
>
 does not seem to work, in that the label is not presented in bold.

 On 5/14/07, Simon Lessard <[EMAIL PROTECTED]> wrote:

> Hello Francisco,
>
> Hmmm it might be a browser cache problem. When working with skin you
> have to clear your browser cache often else it will use the cached
>
>>> CSS. I
>>>
> assume that, in your case, the last change you made either triggered
>
>>> a
>>>
> filename change or your browser cache expired thus loading the
latest
>
>>> CSS
>>>
> and showing all changes.
>
>
> Regards,
>
> ~ Simon
>
> On 5/14/07, Francisco Passos < [EMAIL PROTECTED]> wrote:
>
>> Oddly enough, if I add
>>
>> @platform windows, linux, solaris
>> {
>>   /** for ie and gecko on windows, linux and solaris, make the
>>
>>> color pink **/
>>>
>>
>>   @agent ie, gecko
>>   {
>> af|inputText::content {background-color:pink}
>>
>>   }
>> }
>>
>> to the css, suddenly everything works - the text size, the red
>> background color, the bold font weight...
>>
>> What should I make of this?
>>
>> On 5/14/07, Francisco Passos <[EMAIL PROTECTED]> wrote:
>>
>>> Thank you for your hint, I'll try it as soon as I can.
>>>
>>> It seems that I'm not quite there yet, I'm two steps behind.
>>>
>>> I'm using a skin extending the simple-desktop:
>>>
>>> http://myfaces.apache.org/trinidad/skin";>
>>> 
>>> stp.desktop 
>>> stp
>>>  org.apache.myfaces.trinidad.desktop
>>> 
>>> 
>>> resources/css/skin-stp.css
>>> 
>>> simple.desktop
>>> 
>>> 
>>>
>>> and in skin-stp.css I define some things, such as
>>>
>>> .AFDefaultFont:alias {
>>>   font-size : 18px;
>>> }
>>>
>>> and
>>>
>>> af|inputText::label {
>>> background-color: red;
>>> font-weight: bold;
>>> }
>>>
>>> And none of them is working. The text is overall very small
>>> (nowhere near the 18px I put there to test) and tr:inputText
>>>
>>> labels are
>>>
>>> neither red nor bold. It seems like it is ignoring my
>>>
>>> skin-stp.cssdefinitions. What could cause this?
>>>
>>> On 5/11/07, Simon Lessard < [EMAIL PROTECTED] > wrote:
>>>
 Hello Francisco,

 You could try the following:

 af|inputText:: label.myStyleClass {
 font-weight : bold;
 }

 

 I think it might work.


 Regards,

 ~ Simon

 On 5/11/07, Francisco Passos <[EMAIL PROTECTED]>

>>> wrote:
>>>
> Hello there!
>
> I'd like most of my inputTexts to be rendered as they are by
> default.
>
> However, I'd like a few of them to have a bold label.
>
> I tried this:
>
> af|inputText::label {
> font-weight : bold;
> }
>
> But as you know this leads every inputText to have their
> labels in bold.
>
> Is there any way to reference ::label from within the
> inlineStyle property and define this property on the spot?
>
>

>>
>
>

--

Petr Kotek
CRC Data spol. s r.o.
U krčské vodárny 26 - vývojové pracoviště
140 00 Praha 4
tel: +420 241 442 464
fax: +420 241 442 645
GSM: +420 602 339 057
www.crcdata.cz




[Trinidad] output

2007-06-14 Thread MOLINA Stéphane
Hi,


I use trinidad by inserting some components like tables in an existing JSF 
pages.
I found that it was necessary to use  to have some skinning 
capabilities. But  genarates ,  and .
This is conflicting with our current templating ( has strange 
comportements in a metaContainer facet).
 
So I want to create some  that would render like a . CSS 
parsing for skins would be provided too.
This new component would permit to avoid using  just for skin CSS 
loading.
 
What do you think about this ? Do you have some advices or comments about that ?
 
 
 
Thank you by advance
 
-- 
Stéphane Molina


Re: [Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Matthias Wessendorf

AdfRenderingContext

you are using an old version, I think



On 6/14/07, Hans Reip <[EMAIL PROTECTED]> wrote:


Hi,

I am trying to use trinidad together with other tomahawk and SUN RI
components. The view technology is JSP. So I followed the instructions for
installing trinidad from the myFaces page. Some JSP work but others don't.

I get the following message after I submit the form :

### backing-bean method -> start ###
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerData] is: 0
ms
## return string is: editConsumer ##
14.06.2007 10:10:00 org.apache.myfaces.trinidad.context.RenderingContext
attach
WARNUNG: Trying to attach RenderingContext to a thread that already had one.
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerOverview]
is: 0 ms

I get this message many times until a StackOverflowError occurs:

FATAL: Servlet.service() for servlet Faces Servlet threw exception
java.lang.StackOverflowError
at org.apache.catalina.connector.Request.doGetSession(Request.java:2190)
at org.apache.catalina.connector.Request.getSession(Request.java:2031)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:832)
...
...

Why does this error occur only at some JSPs, and why only when the
STATE_SAVING_METHOD is "client"?

By the way: if the STATE_SAVING_METHOD is "server" it works so far, but
there still is the following warning:
...
14.06.2007 09:59:30
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
encodeFinally
WARNING: No AdfRenderingContext available
...
What does ths warning mean?

Thanks in advance
Hans
--
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a5961
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


[Trinidad] RenderingContext Error when STATE_SAVING_METHODis "client"

2007-06-14 Thread Hans Reip

Hi,

I am trying to use trinidad together with other tomahawk and SUN RI
components. The view technology is JSP. So I followed the instructions for
installing trinidad from the myFaces page. Some JSP work but others don't.

I get the following message after I submit the form :

### backing-bean method -> start ###
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerData] is: 0
ms
## return string is: editConsumer ##
14.06.2007 10:10:00 org.apache.myfaces.trinidad.context.RenderingContext
attach
WARNUNG: Trying to attach RenderingContext to a thread that already had one.
14.06.2007 10:10:00 com.test.twa.reuse.logging.PerformanceLogAdviceAOP
invoke
INFO: * Running time of method
[com.test.twa.business.coffeeservice.IConsumerService.getConsumerOverview]
is: 0 ms

I get this message many times until a StackOverflowError occurs:

FATAL: Servlet.service() for servlet Faces Servlet threw exception
java.lang.StackOverflowError
at org.apache.catalina.connector.Request.doGetSession(Request.java:2190)
at org.apache.catalina.connector.Request.getSession(Request.java:2031)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:832)
...
...

Why does this error occur only at some JSPs, and why only when the
STATE_SAVING_METHOD is "client"?

By the way: if the STATE_SAVING_METHOD is "server" it works so far, but
there still is the following warning:
...
14.06.2007 09:59:30
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
encodeFinally
WARNING: No AdfRenderingContext available
...
What does ths warning mean?

Thanks in advance
Hans
-- 
View this message in context: 
http://www.nabble.com/-Trinidad--RenderingContext-Error-when-STATE_SAVING_METHODis-%22client%22-tf3920348.html#a5961
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Component nesting error with 1.0.1 from trunk

2007-06-14 Thread Matthias Wessendorf

you are using golink inside a navigationPane

On 6/14/07, Laurie Harper <[EMAIL PROTECTED]> wrote:

I just upgraded an application from a pre-release build of
1.0-incubating to a snapshot of 1.0.1 build from trunk a couple of days
ago, and (after making a few changes to my templates to accommodate
component name changes and such) am getting the following errors in my
logs.

Can anyone offer any hints to narrow down my diagnostic process? What
component(s) should I be looking to replace, and what would I need to
use instead?

Thanks,

L.


SEVERE: Warning: illegal component hierarchy detected, expected
UIXCommand but found another type of component instead.
java.lang.ClassCastException:
org.apache.myfaces.trinidad.component.core.nav.CoreGoLink
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.renderContent(NavigationPaneRenderer.java:124)
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.encodeAll(NavigationPaneRenderer.java:87)
 at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
 at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
 at
org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:525)
 at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:337)
 at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:279)
 at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:256)
 at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
 at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderNamedChild(BaseRenderer.java:397)
 at
org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent(PageHeaderLayoutRenderer.java:405)
 at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:93)
 at
org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:84)
 at
org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:192)
 at
org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:70)
 at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
 at
org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
 at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:282)
 at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:304)
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:72)
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:136)
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:152)
 at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:78)
 at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
 at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
 at
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
 at
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
 at
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
 at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
 at
com.foo.projility.web.faces.application.ProjectivaViewHandler.renderView(ProjectivaViewHandler.java:178)
 at
org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:181)
 at
com.apress.projsf.weblets.faces.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:70)
 at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
 at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
 at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:442)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1051)
 at
com.foo.projility.web.auth.UserAuthenticationFilter.doFilter(UserAuthenticationFilter.java:80)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1042)
 at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilte