Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Martin Marinschek
That has already been implemented in the calendar in the current SVN
head version.

regards,

Martin

On 1/18/06, Werner Punz <[EMAIL PROTECTED]> wrote:
> Werner Punz schrieb:
> > Simon Kitching schrieb:
> >> On Tue, 2006-01-17 at 23:55 +, Dennis Byrne wrote:
> >>> For those of you using t:calendar, you may notice that it hides all
> >>> drop down lists on the page whenever
> >>> the calendar pops up.  I was wondering if anyone can shed some light
> >>> on why this happens.
> >>
> >>
> >> I believe it's a workaround for a nasty bug in IE, where IE's 
> >> components always appear on top of everything else. The only way to get
> >> "popups" to work properly, therefore, is to hide all the 
> >> objects.
> >>
> > Actually that assumption is wrong, that is a nasty workaround which
> > compromises the entire page. The best fix so far is to place a div
> > under the popup and on top of the select box.
> >
> >
> Sorry I did not mean div, it is an iframe, you have to place an iframe
> in between the two controls, that fixes the problem.
> But you should only do that in IE certain non IE browser versions
> can go haywire over this.
>
>


--

http://www.irian.at

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

Professional Support for Apache MyFaces


Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Werner Punz

Werner Punz schrieb:

Simon Kitching schrieb:

On Tue, 2006-01-17 at 23:55 +, Dennis Byrne wrote:
For those of you using t:calendar, you may notice that it hides all 
drop down lists on the page whenever
the calendar pops up.  I was wondering if anyone can shed some light 
on why this happens.



I believe it's a workaround for a nasty bug in IE, where IE's 
components always appear on top of everything else. The only way to get
"popups" to work properly, therefore, is to hide all the 
objects.


Actually that assumption is wrong, that is a nasty workaround which
compromises the entire page. The best fix so far is to place a div
under the popup and on top of the select box.


Sorry I did not mean div, it is an iframe, you have to place an iframe 
in between the two controls, that fixes the problem.

But you should only do that in IE certain non IE browser versions
can go haywire over this.



CollapsablePanel & Facelets

2006-01-17 Thread Arash Bijanzadeh
I am trying to use collapsable panel within facelet. I did all the
configuration and the page actually render without a collapsable panel
and giving out this warning:


11:19:50,194 WARN  [HtmlRenderKitImpl] Unsupported
component-family/renderer-type:
javax.faces.Panel/"org.apache.myfaces.CollapsiblePanel
11:19:50,194 INFO  [[/mcipro]] No Renderer found for component
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId:
/BTS.xhtml][Class:
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanel,Id:
test]} (component-family=javax.faces.Panel,
renderer-type="org.apache.myfaces.CollapsiblePanel)
11:19:50,195 WARN  [UIComponentBase] No Renderer found for
component {Component-Path : [Class:
javax.faces.component.UIViewRoot,ViewId: /BTS.xhtml][Class:
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanel,Id:
test]} (component-family=javax.faces.Panel,
renderer-type="org.apache.myfaces.CollapsiblePanel)
-- from debian manifesto:Debian Linux is a brand-new kind of Linux distribution. Rather than being developed by one isolated individual or group, as other distributions of Linux have been developed in the
 past, Debian is being developed openly in the spirit of Linux and GNU. 


Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Werner Punz

Most people do not have a clue on how
messy the whole dhtml area is, unfortunately,
but understandable, because they do not see
the effort it takes to navigate around various browser
bugs like this one.

The whole DHTML issue revolves around the problem that
Microsoft hasn´t had any intention to fix their browsers for years
no complaints against serious bugs which have been open and documented 
for years no security holes as open as the grand canyion, really helped

to get out a serious bug fix release, only security releases.

Thanks to the inroads of Firefox they finally got off their collective
* and finally are doing something again. Things only can become better.
Sure the other browsers also have bugs, but those are reportable and you 
can rely on them being fixed within a certain timespan. With Microsoft 
you only can rely on having those issues fixed ones the marketshare of 
their vehicle goes down.


A good mixup of various browsers in the end probably would be the most 
healthy situation with equal shares among all popular browsers. Lets 
hope that the we have a monopoly therefore we dissolve the entire IE 
team situation won´t happen again. (That is to my knowledge exactly what 
has happened)


Werner


Dennis Byrne schrieb:
Thanks to anyone who helped answer this.  I asked because I occasionally get requirements where people seriously don't believe why something so simple can increase technical costs so much.  


Dennis Byrne


-Original Message-
From: Werner Punz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 17, 2006 07:04 PM
To: users@myfaces.apache.org
Subject: Re: z-order of drop down lists and t:inputCalendar

Dennis Byrne schrieb:
For those of you using t:calendar, you may notice that it hides all 
drop down lists on the page whenever the calendar pops up.  I was wondering 
if anyone can shed some light on why this happens.  The last time I had this 
conversation with a colleague, I remeber him telling me that with some 
operating systems, the drop down list control get it's "own window" and you 
simply cannot display another control on top by manipulating the z order.  
Apparently this goes back to the early 90's .  Can't find anything on Google either.


google for the div over drop down bug in the Internet Explorer, you 
basically can only bypass that one by putting an iframe under the div 
tag which renders the popup.


All Internet Explorer on Windows versions are affected (except IE7 beta)
the bug has been known for 7-8 years and never has been fixed by Microsoft.
(one indication of the shoddy state the IE is actually in)

The reason for this bug is, that the IE rendering engine uses a mixup of 
both self rendered and Windows controls, both run in their own 
respective rendering engines and probably also event queues.

It internally then meshes both systems. The problem now is, once
a IE rendered control tries to be on top of a windows control by 
manipulation of the z-order, the whole thing fails, due to the different 
rendering queues. Putting an iframe on top of that for some strange kind 
of reason fixes that, the iframe basically can hide the windows control, 
and you can fix the z order that way and put anything rendered by the ie 
on top of the iframe.


You can find the fix code for this in many controls of myfaces (I once 
did a fixup for that bug in the popup javascript code for the popup 
control (shameless plug inserted here), the code there is very generic 
and can be recycled with minor modifications into any control )


The main problem with this iframe method is, you should only use it on 
the IE, because other browsers namely several Mozilla versions do not 
like hidden iframes and basically the page goes haywire over this once 
you start scrolling vertically.











RE: Urgent: Collapsible Panel with data table not workingIllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-17 Thread Saurabh Rasinghaney
Hi Martin,

Thanks for your advice of using Nightly Build,
It finally worked, I was able to run the sample application - the errors
were due to a server issue - got resolved by disabling JBoss Web Loader
- and the same fix resolved the problem with my application - which was
not working with nightly build before. 

Now I am able to see multiple collapsible panels in a data table - :)

Now there is only one problem left - in sample application - tomahawk
sample app with nightly build - as well as in my application collapsible
panels are jammed such that if it is collapsed it remains collapsed and
if expanded it remains expanded the toggling is not working. 

Any clue why is this so?

Best Regards,



Saurabh Raisinghaney 


-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 11:13 PM
To: MyFaces Discussion; [EMAIL PROTECTED]; Simon Kitching
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

In tomahawk nightly build, sample application is throwing same exception
- as given below - for many components and not just collapsible panel.

Any body any clue? Is there any missing jar or some thing? 

java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderHiddenInputFie
ld(Ljavax/faces/context/ResponseWriter;Ljava/lang/Object;Ljava/lang/Obje
ct;)

Best Regards,



Saurabh Raisinghaney 



-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 10:27 PM
To: [EMAIL PROTECTED]; Simon Kitching; MyFaces Discussion
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

Hi,

In addition to this when I try deploying the application
myfaces-example-simple.war given in
\myfaces-current\tomahawk\examples\simple\target folder which is
based on 1.1.2-SNAPSHOT jar as shown below I get this error when I try
to access Collapsible panel


22:12:06,943 ERROR [[jsp]] Servlet.service() for servlet jsp threw
exception
java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderHiddenInputFie
ld(Ljavax/faces/context/ResponseWriter;Ljava/lang/Object;Ljava/lang/Obje
ct;)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanelRenderer.
encodeChildren(HtmlCollapsiblePanelRenderer.java:80)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
a:319)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanel.encodeCh
ildren(HtmlCollapsiblePanel.java:148)



P.S. I had successfully built the application based on the steps given
on the site
http://wiki.apache.org/myfaces/Building_With_Maven

Best Regards,



Saurabh Raisinghaney 


-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 3:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

Hi Martin,

Thanks for your reply,

I did downloaded the code and did the built the code successfully as per
the instructions in http://wiki.apache.org/myfaces/Building_With_Maven,
I also did a built for Archetype application and from the template web
application I took all jars and placed it in our application, but still
faced the exact same problem :

Archetype application has following jar's
tomahawk-1.1.1
myfaces-api-1.1.1
myfaces-impl-1.1.1

Then I took all jar's from 
\myfaces-current\tomahawk\examples\simple\target\myfaces-example-s
imple\WEB-INF\lib

myfaces-api-1.1.2-SNAPSHOT
myfaces-commons-1.1.2-SNAPSHOT
myfaces-impl-1.1.2-SNAPSHOT
tomahawk-1.1.2-SNAPSHOT

And tried but with these jar's I wasn't able to run the application - as
I got application exceptions at startup detailed below

Please suggest what jar's I should use,

Best Regards,



Saurabh Raisinghaney 


Exception with snapshot's

14:29:13,623 ERROR [Digester] Digester.getParser:
java.lang.ClassCastException:
org.apache.xerces.jaxp.SAXParserFactoryImpl
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run
(AbstractDeploymentScanner.java:182)
14:29:13,663 ERROR [[/pms]] Servlet /pms threw load() exception
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at
all - make sure that you properly include all configuration set
tings necessary for a basic faces application and that all the necessary
libs are included. Also check the logging output of your web application
and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact
that you use some special web-containers which do not supp

RE: Urgent: Collapsible Panel with data table not workingIllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-17 Thread Saurabh Rasinghaney
In tomahawk nightly build, sample application is throwing same exception
- as given below - for many components and not just collapsible panel.

Any body any clue? Is there any missing jar or some thing? 

java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderHiddenInputFie
ld(Ljavax/faces/context/ResponseWriter;Ljava/lang/Object;Ljava/lang/Obje
ct;)

Best Regards,



Saurabh Raisinghaney 



-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 10:27 PM
To: [EMAIL PROTECTED]; Simon Kitching; MyFaces Discussion
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

Hi,

In addition to this when I try deploying the application
myfaces-example-simple.war given in
\myfaces-current\tomahawk\examples\simple\target folder which is
based on 1.1.2-SNAPSHOT jar as shown below I get this error when I try
to access Collapsible panel


22:12:06,943 ERROR [[jsp]] Servlet.service() for servlet jsp threw
exception
java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderHiddenInputFie
ld(Ljavax/faces/context/ResponseWriter;Ljava/lang/Object;Ljava/lang/Obje
ct;)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanelRenderer.
encodeChildren(HtmlCollapsiblePanelRenderer.java:80)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
a:319)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanel.encodeCh
ildren(HtmlCollapsiblePanel.java:148)



P.S. I had successfully built the application based on the steps given
on the site
http://wiki.apache.org/myfaces/Building_With_Maven

Best Regards,



Saurabh Raisinghaney 


-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 3:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

Hi Martin,

Thanks for your reply,

I did downloaded the code and did the built the code successfully as per
the instructions in http://wiki.apache.org/myfaces/Building_With_Maven,
I also did a built for Archetype application and from the template web
application I took all jars and placed it in our application, but still
faced the exact same problem :

Archetype application has following jar's
tomahawk-1.1.1
myfaces-api-1.1.1
myfaces-impl-1.1.1

Then I took all jar's from 
\myfaces-current\tomahawk\examples\simple\target\myfaces-example-s
imple\WEB-INF\lib

myfaces-api-1.1.2-SNAPSHOT
myfaces-commons-1.1.2-SNAPSHOT
myfaces-impl-1.1.2-SNAPSHOT
tomahawk-1.1.2-SNAPSHOT

And tried but with these jar's I wasn't able to run the application - as
I got application exceptions at startup detailed below

Please suggest what jar's I should use,

Best Regards,



Saurabh Raisinghaney 


Exception with snapshot's

14:29:13,623 ERROR [Digester] Digester.getParser:
java.lang.ClassCastException:
org.apache.xerces.jaxp.SAXParserFactoryImpl
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run
(AbstractDeploymentScanner.java:182)
14:29:13,663 ERROR [[/pms]] Servlet /pms threw load() exception
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at
all - make sure that you properly include all configuration set
tings necessary for a basic faces application and that all the necessary
libs are included. Also check the logging output of your web application
and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact
that you use some special web-containers which do not support
registering context-listeners via TLD files and a context listener
is not setup in your web.xml.
A typical config looks like this;

 
org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)


-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 16, 2006 3:29 PM
To: Saurabh Rasinghaney
Subject: Re: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed

Can't you build MyFaces yourself?

Sorry if someone suggested that to you and you did that already ;)

Instructions:
http://wiki.apache.org/myfaces/Building_With_Maven

regards,

Martin

On 1/16/06, Saurabh Rasinghaney <[EMAIL PROTECTED]> wrote:
> Hello Simon and Martin:
>
> I even tried using the Oracle Collapsible Panel component with MyFaces
> but -my hard luck continues - most of there components work with
MyFaces
> except this one - again few weird exceptions.
>
> From: Simon Kitchi

RE: Tree2 editting from other JSF page

2006-01-17 Thread Saurabh Rasinghaney








I haven’t tried that

Post the solution if it works J 

 



Best Regards,



Saurabh
Raisinghaney 











From: Gal Kirpichnikov
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
11:21 AM
To: 'MyFaces
 Discussion'
Subject: RE: Tree2 editting from
other JSF page



 

Thanks, but I’m talking about the opposite
event: change in “detailedFrame” effects the tree,

Do you have idea?

 

Best regards,

 









From: Saurabh Rasinghaney
[mailto:[EMAIL PROTECTED] 
Sent: ג 17 ינואר 2006 18:38
To: MyFaces
 Discussion
Subject: RE: Tree2 editting from
other JSF page
Importance: High



 

By setting the target to the second page u
can do that

Eg: see target in facet



   


   


 
   


 
   
   


 
   


   
     


   


   
h:commandLink>

   
h:panelGroup>

   
f:facet>

 

 



Best Regards,



Saurabh
Raisinghaney 











From: Gal Kirpichnikov
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
2:25 AM
To: 'users@myfaces.apache.org'
Subject: Tree2 editting from other
JSF page



 

Having two JSF pages on screen (the
controller and the second in iframe of the first),

How can I change Tree2 component content,
expansion, selection of node as a result of application activity at JSF page
located in the iframe?

 

Thanks,


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__








RE: Servlet Filter?

2006-01-17 Thread frohman
 

-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 05, 2005 8:50 AM
To: MyFaces Discussion
Subject: Re: Servlet Filter?

Yes, you are correct... And after changing my url-pattern back to
/protected/* it works like it should And what you say about the url,
makes sense

So thx! :)

BTJ

Matt Blum wrote:
> You need to change your url-mapping back to "/protected/*".  I'm 
> assuming you left it mapped to "/*", in which case the behavior you're 
> describing is what you *should* be seeing.  The filter is being called 
> twice now, once for the initial request (logins.jsp) and once for the 
> forward (/protected/index.jsp).  The URL you're printing out is coming 
> from the request object, which will only give you the URL that was 
> originally sent to the server.
> 
> That's the difference between a redirect and a forward: a redirect 
> instructs the client to request a different URL from the server, which 
> thereby creates a new request object; a forward is handled entirely on 
> the server, with the server simply redirecting the *handling* of the 
> request to something other than what was initially requested.
> 
> -Matt
> 
> On 5/5/05, *Bjørn T Johansen* <[EMAIL PROTECTED] >
> wrote:
> 
> Well, I tried switching to 2.4 spec, but the only difference (I
> enabled requests and
> forwards), is that it now prints the url twice (i.e. the doFilter
> method is called twice),
> but it still just shows me the url for the previous page ( i.e.
> /logins.jsp instead of
> /protected/index.jsp but the page shown is /protected/index.jsp)
> Is there something fundamental I am missing...? This is my first JSF
> app, but it shouldn't
> be that much different from say Struts...
> 
> BTJ
> 
> Matt Blum wrote:
> > OK, now I think I've got it:
> >
> > The navigation rule is doing a forward, not a redirect.  Servlet
> filters
> > don't always handle anything but the initial server request.  If
> you're
> > using a servlet container that only supports up to servlet spec
> 2.3, it
> > will *only* handle the initial server request, so I'm not sure how
> you'd
> > fix your problem.  If you're using one that supports servlet spec
2.4,
> > though, you can configure it to handle requests, forwards,
> includes, and
> > errors as follows:
> >
> > 
> > MyFilter
> > 
> > REQUEST
> >
> > FORWARD
> > INCLUDE
> > ERROR
> > 
> >
> >
> > Obviously, if you only want it to handle requests and forwards,
> you only
> > need the corresponding lines.
> >
> > Hope this helps.
> > -Matt
> >
> > On 5/4/05, *Bjørn T Johansen* <[EMAIL PROTECTED]
>  >>
> > wrote:
> >
> > Well, I changed my pattern to /* and something strange happens
in
> > the doFilter method...
> >
> > I am coming from /login.jsp and the navigation rule looks like
> this..:
> >
> > 
> >   /login.jsp
> >   
> >success
> >/protected/index.jsp
> >   
> > 
> >
> > And when the outcome is success from /login.jsp, the correct
> page is
> > showing
> > (/protected/index.jsp) but putting this call in the doFilter
> method:
> >
> > writeLog(((HttpServletRequest)request).getRequestURL());
> >
> > gives me the url to the previous page, /logins.jsf.. Shouldn't
> this be
> > /protected/index.jsf ?? But this explains why the patterng
> > /protected/* didn't work, but
> > why is this the request url in doFilter??
> >
> > BTJ
> >
> > Matt Blum wrote:
> > > The only possibilities I can think of that would cause the
> > behavior you
> > > describe are:
> > >
> > > 1. The URL is being redirected before the filter is hit, so
the
> > > url-mapping doesn't apply (you can test this by setting the
> > pattern back
> > > to /* and outputting the path the filter finds).
> > >
> > > 2. Another filter whose pattern is matched by the request
> (and which
> > > comes before the filter you're working on in your web.xml
> list of
> > > filter-mappings) is failing to call doFilter(request,
> response) on the
> > > FilterChain object it receives, for some reason.
> > >
> > > -Matt
> > >
> > > On 5/4/05, *Bjørn T Johansen* <[EMAIL PROTECTED]
> 
> > >
> 
>  > > wrote:
> > >
> 

RE: Urgent: Collapsible Panel with data table not workingIllegalStateException: Client-id : _id3ToggleCollapsed

2006-01-17 Thread Saurabh Rasinghaney
Hi,

In addition to this when I try deploying the application
myfaces-example-simple.war given in
\myfaces-current\tomahawk\examples\simple\target folder which is
based on 1.1.2-SNAPSHOT jar as shown below I get this error when I try
to access Collapsible panel


22:12:06,943 ERROR [[jsp]] Servlet.service() for servlet jsp threw
exception
java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderHiddenInputFie
ld(Ljavax/faces/context/ResponseWriter;Ljava/lang/Object;Ljava/lang/Obje
ct;)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanelRenderer.
encodeChildren(HtmlCollapsiblePanelRenderer.java:80)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
a:319)
at
org.apache.myfaces.custom.collapsiblepanel.HtmlCollapsiblePanel.encodeCh
ildren(HtmlCollapsiblePanel.java:148)



P.S. I had successfully built the application based on the steps given
on the site
http://wiki.apache.org/myfaces/Building_With_Maven

Best Regards,



Saurabh Raisinghaney 


-Original Message-
From: Saurabh Rasinghaney 
Sent: Tuesday, January 17, 2006 3:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed
Importance: High

Hi Martin,

Thanks for your reply,

I did downloaded the code and did the built the code successfully as per
the instructions in http://wiki.apache.org/myfaces/Building_With_Maven,
I also did a built for Archetype application and from the template web
application I took all jars and placed it in our application, but still
faced the exact same problem :

Archetype application has following jar's
tomahawk-1.1.1
myfaces-api-1.1.1
myfaces-impl-1.1.1

Then I took all jar's from 
\myfaces-current\tomahawk\examples\simple\target\myfaces-example-s
imple\WEB-INF\lib

myfaces-api-1.1.2-SNAPSHOT
myfaces-commons-1.1.2-SNAPSHOT
myfaces-impl-1.1.2-SNAPSHOT
tomahawk-1.1.2-SNAPSHOT

And tried but with these jar's I wasn't able to run the application - as
I got application exceptions at startup detailed below

Please suggest what jar's I should use,

Best Regards,



Saurabh Raisinghaney 


Exception with snapshot's

14:29:13,623 ERROR [Digester] Digester.getParser:
java.lang.ClassCastException:
org.apache.xerces.jaxp.SAXParserFactoryImpl
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run
(AbstractDeploymentScanner.java:182)
14:29:13,663 ERROR [[/pms]] Servlet /pms threw load() exception
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at
all - make sure that you properly include all configuration set
tings necessary for a basic faces application and that all the necessary
libs are included. Also check the logging output of your web application
and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact
that you use some special web-containers which do not support
registering context-listeners via TLD files and a context listener
is not setup in your web.xml.
A typical config looks like this;

 
org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)


-Original Message-
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 16, 2006 3:29 PM
To: Saurabh Rasinghaney
Subject: Re: Urgent: Collapsible Panel with data table not
workingIllegalStateException: Client-id : _id3ToggleCollapsed

Can't you build MyFaces yourself?

Sorry if someone suggested that to you and you did that already ;)

Instructions:
http://wiki.apache.org/myfaces/Building_With_Maven

regards,

Martin

On 1/16/06, Saurabh Rasinghaney <[EMAIL PROTECTED]> wrote:
> Hello Simon and Martin:
>
> I even tried using the Oracle Collapsible Panel component with MyFaces
> but -my hard luck continues - most of there components work with
MyFaces
> except this one - again few weird exceptions.
>
> From: Simon Kitching [mailto:[EMAIL PROTECTED]
> > I expect the irian site is running a nightly build, not an official
> > release.
>
> Please if you can share the jar - nightly build, which you are using
on
> Irian web site - with the fix for collapsible panel; I would really be
> grateful because now we don't have many options left.
>
> I would really appreciate your help in this regard and I am eagerly
> looking forward towards it.
>
> Thanks,
> 
>
> Saurabh Raisinghaney
>
>
> -Original Message-
> From: Saurabh Rasinghaney
> Sent: Friday, January 13, 2006 9:47 AM
> To: MyFaces Discussion; [EMAIL PROTECTED]
> Subject: RE: Urgent: Collapsible Panel with data table not
> workingIllegalStateException: Client-id : _id3Toggl

RE: Pattern for shared data access object?

2006-01-17 Thread Tom Butler
Simon, 

Thanks for your help understanding this - I will try placing my data access
object in the application scope and the backing bean in a request scope.
However, I'll need to use the t:saveState with the backing bean since I have
a datamodel with a datascroller (as you had recommended in a previous post.)
My application needs to be very scaleable, so I appreciate the design
information.

Tom

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 9:14 PM
To: MyFaces Discussion
Subject: Re: Pattern for shared data access object?

On Tue, 2006-01-17 at 21:00 -0500, Tom Butler wrote:
> Where I need help understanding is how to set up the scope for the
> managed beans and data access object.   Currently, I have the backing
> bean within the session scope (using the facesconfig.xml file).  My
> main question is how to set up the scope for the Data Access Object -
> currently I do not have it as a managed bean within facesconfig.xml.
> Instead I am creating a new instance within the backing bean:
> 
>  
> 
> private DbInsert dbinsert = new DbInsert();
> 
>  
> 
> Is this the best way to do this?  Will the DBInsert object now be tied
> to the session scope of the backing bean (i.e., when backing bean is
> deleted, the DbInsert object will be deleted from session scope as
> well.)  

The bean is of session scope, so it will continue to exist until the
user's session is deleted, or the backing bean is explicitly removed
from the session. And of course the reference to the DbInsert object
will live for the same time.

>  
> 
> Ideally I would like the data access object to be available as a
> shared object throughout the life of the application.  When I was
> programming using a servlet approach, I would have created a servlet
> to load on startup.  Now that I'm using java server faces, I'm
> confused about the scope / how to efficiently  set up a data access
> object that I want to be available to all backing beans in the
> application.

> tnanks for any help understanding this. 

I would strongly recommend you avoid using session scope for backing
beans (ie beans that provide presentation logic to a specific page). The
bean is only relevant when the user is accessing certain pages, but will
continue to exist until the user's session times out. Unless your app is
just a few pages that's not a good idea.

I recommend you put your DB access functionality in a bean that is
declared as a managed bean of application scope.

You can then declare your backing beans as request scope, and use a
managed-property declaration to connect the backing beans to the Db
access bean.


  example.DBInserter
  dbInserter
  application



  example.SomeBackingBean
  bean1
  request
  
inserter
#{dbInserter}
  


Managed bean objects are created only when they are actually needed, so
the dbInserter object will be created when the first page that
references it (directly or indirectly) is viewed. If this is not
desirable, and you prefer it to be created on webapp startup then you
could use a ServletContextListener to create it.

This page might be useful:
  http://wiki.apache.org/myfaces/AccessingOneManagedBeanFromAnother

Regards,

Simon




Re: I need help in dataList.

2006-01-17 Thread Dave
Good idea.   Make dataTable support dataList's layouts, especially "simple", and remove dataList. For the "simple" layout, dataTable does not have a workaround. We need that !      Also please add another attribute: newspaper, and remove newspaper component.  consolidate and make life easier :)Mike Kienenberger <[EMAIL PROTECTED]> wrote:  Exactly. We need dataList's renderer ported over to dataTable, andthen we can just dump the dataList component.On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]>wrote:> >If you can't make it render like you want, then create your own> >renderer for t:dataTable, and submit it as a replacement for dataList>> I agree that t:dataTable is probably a better alternative. The problems with dataList actually have to do 
 with the
 UIComponent rather than it's renderer. In current SVN, it will decode properly (events from children are registered) but it does not update the model.>> Dennis Byrne>>>  
	
		Yahoo! Photos 
Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: Components referencing the parent class didn't get value

2006-01-17 Thread Emily Gu
Hi Simon,
 
  Thanks for such clear explaination. You are right if I put everything in B, it'll work. The form page B has included all components in form A plus some B specific components. If I don't use such parent and child class, the class B would have many duplicated method as class A. Do you have any suggestions in such case?

 
Thank you a lot!
Emily
 
On 1/17/06, Simon Kitching <[EMAIL PROTECTED]
> wrote: 
You've got class B extending class A.You've got a managed-bean declaration mapping "a" to class A. 
You've got a managed-bean declaration mapping "b" to class B.When the JSP page references "a", this creates an instance of A and setsit up.When the JSP page references "b", this creates an instance of B, a 
*separate* object. This object will of course not see the values set upfor the object "a".Shouldn't your jsp page reference "b" everywhere, rather than mix "a"and "b"? That way, only one managed bean instance is created. 
Regards,SimonOn Tue, 2006-01-17 at 18:07 -0500, Emily Gu wrote:> Thanks for your quick reply, Simon!>> I have something like following>> public class A {> 
>public void changeChoices(ValueChangeEvent event)  {>   // Gets the car from the cars list>>   // Updates the myCar instance to be selected car.>>}>>public update () { 
> System.out.println(myCar.getId());> System.out.println(myCar.getName());>> ...>}>>public MyCar getMyCar() {> return myCar;
>}>>private MyCar myCar = new MyCar();>private Carscars   = new Cars();>> }>> Where>   myCar = new MyCar();>   cars = new Cars();
>> Instantiates objects and gets data from database. Both have been> defined as the managed bean and put in the session scope.>> I have another class>> public class B extends A { 
>  public create () {>   System.out.println(getMyCar().getId());> }> }>> In the jsp page I have something like:>> >> < 
>> h:selectOneMenu id="profiles"  value="#{a.myCar.id}">> 
document.myForm.submit()">> valueChangeListener="#{ a.changeChoices}">> immediate="false">>> 
>> >> // some other form fields directly bonded to class B properties >> <>> h:commandLink immediate="false"  action=""
b.create}"> styleClass="formButtonLink">> value="Create" />>  >> The problem is the component bonded to Class A, when I try to get the
> the value in class B> as System.out.println(getMyCar().getId()); it always returns null. For> components bonded to Class B, everything is fine. I must have done > something wrong. please advice.
>> Thanks a lot!> Emily>> On 1/17/06, Simon Kitching <[EMAIL PROTECTED]
> wrote:> On Tue, 2006-01-17 at 17:07 -0500, Emily Gu wrote: > > Hi,> >> >  I have a page that have some components referencing the> parent
> > backing bean and some referencing the child backing bean. I > need to do> > some action handling in child class. But the value of> component> > referencing the parent class is null all the time. The
> component > > referencing the child class is fine. Do you see anything I> am missing> > so that the component referencing the parent class didn't> get bonded?
> > I think you'll need to provide some more information.>> What do you mean by "parent backing bean" and "child backing> bean"?>> Please also include relevant parts of your JSP page and 
> backing bean> classes.>> Regards,>> Simon>>


Re: Pattern for shared data access object?

2006-01-17 Thread Simon Kitching
On Tue, 2006-01-17 at 21:00 -0500, Tom Butler wrote:
> Where I need help understanding is how to set up the scope for the
> managed beans and data access object.   Currently, I have the backing
> bean within the session scope (using the facesconfig.xml file).  My
> main question is how to set up the scope for the Data Access Object -
> currently I do not have it as a managed bean within facesconfig.xml.
> Instead I am creating a new instance within the backing bean:
> 
>  
> 
> private DbInsert dbinsert = new DbInsert();
> 
>  
> 
> Is this the best way to do this?  Will the DBInsert object now be tied
> to the session scope of the backing bean (i.e., when backing bean is
> deleted, the DbInsert object will be deleted from session scope as
> well.)  

The bean is of session scope, so it will continue to exist until the
user's session is deleted, or the backing bean is explicitly removed
from the session. And of course the reference to the DbInsert object
will live for the same time.

>  
> 
> Ideally I would like the data access object to be available as a
> shared object throughout the life of the application.  When I was
> programming using a servlet approach, I would have created a servlet
> to load on startup.  Now that I'm using java server faces, I'm
> confused about the scope / how to efficiently  set up a data access
> object that I want to be available to all backing beans in the
> application.

> tnanks for any help understanding this. 

I would strongly recommend you avoid using session scope for backing
beans (ie beans that provide presentation logic to a specific page). The
bean is only relevant when the user is accessing certain pages, but will
continue to exist until the user's session times out. Unless your app is
just a few pages that's not a good idea.

I recommend you put your DB access functionality in a bean that is
declared as a managed bean of application scope.

You can then declare your backing beans as request scope, and use a
managed-property declaration to connect the backing beans to the Db
access bean.


  example.DBInserter
  dbInserter
  application



  example.SomeBackingBean
  bean1
  request
  
inserter
#{dbInserter}
  


Managed bean objects are created only when they are actually needed, so
the dbInserter object will be created when the first page that
references it (directly or indirectly) is viewed. If this is not
desirable, and you prefer it to be created on webapp startup then you
could use a ServletContextListener to create it.

This page might be useful:
  http://wiki.apache.org/myfaces/AccessingOneManagedBeanFromAnother

Regards,

Simon



Pattern for shared data access object?

2006-01-17 Thread Tom Butler








I have a question / need help understanding how to configure backing
bean and model objects so that memory and object creation/deletion is done as
efficiently as possible.  

 

1.  I have a .jsf page with a form and a commandbutton that submits the
form inputs to a backing bean (enrollispbean is backing bean)



 

2.  The backing bean is used for form handling - the insert() method is
used to read the data fields from the form and create a SQL string that will be
submitted to a model object, DbInsert, that is used as a generic data access
object that connects to the database and insert the SQL string:

 

public class EnrollIspBean {

   private String beanvar1="";

   private String beanvar2= "";

//  DbInsert is data access object

   private DbInsert dbinsert = new DbInsert();

 

 public String insert (){

 String sqlstmt;

    sqlstmt = "INSERT INTO ispmain VALUES(beanvar1,
beanvar2,..)"

 dbinsert.insert(sqlstmt);

 return "success"; }

 

3.  DbInsert is the data access object that contains a method,
insert(), that accepts a sql string to insert into the database.  This method
contains the code to obtain a connection from the database connection pool and
then execute the sql statement (note: error checking code not shown):

 public class DbInsert {

 

  public void insert(String sqlstmt) throws SQLException {

  Connection conn = null;

  GetDBConnection getdbconnection = new GetDBConnection();

  PreparedStatement stmt = null;

 

  conn = getdbconnection.getdbconn();

  stmt = conn.prepareStatement(sqlstmt);

  stmt.executeUpdate();

  stmt.close();

  conn.close();

  return;

 }

 

Where I need help understanding is how to set up the scope for the
managed beans and data access object.   Currently, I have the backing bean
within the session scope (using the facesconfig.xml file).  My main question is
how to set up the scope for the Data Access Object - currently I do not have it
as a managed bean within facesconfig.xml.  Instead I am creating a new instance
within the backing bean:

 

private DbInsert dbinsert = new DbInsert();

 

Is this the best way to do this?  Will the DBInsert object now be tied
to the session scope of the backing bean (i.e., when backing bean is deleted,
the DbInsert object will be deleted from session scope as well.)  

 

Ideally I would like the data access object to be available as a shared
object throughout the life of the application.  When I was programming using a
servlet approach, I would have created a servlet to load on startup.  Now that
I'm using java server faces, I'm confused about the scope / how to efficiently 
set up a data access object that I want to be available to all backing beans in
the application.

 

tnanks for any help understanding this. 

 

Tom

 








Re: How often does tree2 rebuild itself

2006-01-17 Thread Alex Burton
You could set up the backing bean to be in the session scope so that
the TreeModelBase doesn't have to be created each time. You just have
to update the model then if there is a change to it.

cheers,
alex.

On 18/01/06, Adam <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I have some code which if you like I'll post here which basically
> renders out any XML file via an underlying JDOM DOM object using tree2.
>
> The problem is that every time I click on a tree element (i.e. a node)
> it would appear that the entire visible tree is repocessed & thus if I
> have a reasonably large XML document it has to go through lots of jdom
> elements etc again & again & again.
>
> Is the tree cached in some way such that only the children of the newly
> expanded node need be processed rather than every visible node & their
> children?
>
> e.g. if I have a document which has say 10 children hung off the root,
> every time I click on an element I see the same 10 root elements being
> re-processed & then their children etc.
>
> Adam
>
>
>


Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Dennis Byrne
Thanks to anyone who helped answer this.  I asked because I occasionally get 
requirements where people seriously don't believe why something so simple can 
increase technical costs so much.  

Dennis Byrne

>-Original Message-
>From: Werner Punz [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 17, 2006 07:04 PM
>To: users@myfaces.apache.org
>Subject: Re: z-order of drop down lists and t:inputCalendar
>
>Dennis Byrne schrieb:
>> For those of you using t:calendar, you may notice that it hides all 
>
>>drop down lists on the page whenever the calendar pops up.  I was wondering 
>
>>if anyone can shed some light on why this happens.  The last time I had this 
>
>>conversation with a colleague, I remeber him telling me that with some 
>
>>operating systems, the drop down list control get it's "own window" and you 
>
>>simply cannot display another control on top by manipulating the z order.  
>
>>Apparently this goes back to the early 90's .  Can't find anything on Google 
>>either.
>> 
>
>google for the div over drop down bug in the Internet Explorer, you 
>basically can only bypass that one by putting an iframe under the div 
>tag which renders the popup.
>
>All Internet Explorer on Windows versions are affected (except IE7 beta)
>the bug has been known for 7-8 years and never has been fixed by Microsoft.
>(one indication of the shoddy state the IE is actually in)
>
>The reason for this bug is, that the IE rendering engine uses a mixup of 
>both self rendered and Windows controls, both run in their own 
>respective rendering engines and probably also event queues.
>It internally then meshes both systems. The problem now is, once
>a IE rendered control tries to be on top of a windows control by 
>manipulation of the z-order, the whole thing fails, due to the different 
>rendering queues. Putting an iframe on top of that for some strange kind 
>of reason fixes that, the iframe basically can hide the windows control, 
>and you can fix the z order that way and put anything rendered by the ie 
>on top of the iframe.
>
>You can find the fix code for this in many controls of myfaces (I once 
>did a fixup for that bug in the popup javascript code for the popup 
>control (shameless plug inserted here), the code there is very generic 
>and can be recycled with minor modifications into any control )
>
>The main problem with this iframe method is, you should only use it on 
>the IE, because other browsers namely several Mozilla versions do not 
>like hidden iframes and basically the page goes haywire over this once 
>you start scrolling vertically.
>
>




Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Werner Punz

Simon Kitching schrieb:

On Tue, 2006-01-17 at 23:55 +, Dennis Byrne wrote:

For those of you using t:calendar, you may notice that it hides all drop down 
lists on the page whenever
the calendar pops up.  I was wondering if anyone can shed some light on why 
this happens.



I believe it's a workaround for a nasty bug in IE, where IE's 
components always appear on top of everything else. The only way to get
"popups" to work properly, therefore, is to hide all the 
objects.


Actually that assumption is wrong, that is a nasty workaround which
compromises the entire page. The best fix so far is to place a div
under the popup and on top of the select box.



I saw a full description of the problem somewhere but don't have the
reference. I expect (hope) the popup or calendar source code would have
a comment explaining this.


IE div over select box bug ;-)
The popup control in tomahawk has a fix for it since 1.1.1 which works 
without hiding the select boxes.




Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Simon Kitching
On Tue, 2006-01-17 at 23:55 +, Dennis Byrne wrote:
> For those of you using t:calendar, you may notice that it hides all drop down 
> lists on the page whenever
> the calendar pops up.  I was wondering if anyone can shed some light on why 
> this happens.


I believe it's a workaround for a nasty bug in IE, where IE's 
components always appear on top of everything else. The only way to get
"popups" to work properly, therefore, is to hide all the 
objects.

I saw a full description of the problem somewhere but don't have the
reference. I expect (hope) the popup or calendar source code would have
a comment explaining this.

Regards,

Simon



Re: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Werner Punz

Dennis Byrne schrieb:
For those of you using t:calendar, you may notice that it hides all 


drop down lists on the page whenever the calendar pops up.  I was wondering 


if anyone can shed some light on why this happens.  The last time I had this 


conversation with a colleague, I remeber him telling me that with some 


operating systems, the drop down list control get it's "own window" and you 


simply cannot display another control on top by manipulating the z order.  



Apparently this goes back to the early 90's .  Can't find anything on Google 
either.



google for the div over drop down bug in the Internet Explorer, you 
basically can only bypass that one by putting an iframe under the div 
tag which renders the popup.


All Internet Explorer on Windows versions are affected (except IE7 beta)
the bug has been known for 7-8 years and never has been fixed by Microsoft.
(one indication of the shoddy state the IE is actually in)

The reason for this bug is, that the IE rendering engine uses a mixup of 
both self rendered and Windows controls, both run in their own 
respective rendering engines and probably also event queues.

It internally then meshes both systems. The problem now is, once
a IE rendered control tries to be on top of a windows control by 
manipulation of the z-order, the whole thing fails, due to the different 
rendering queues. Putting an iframe on top of that for some strange kind 
of reason fixes that, the iframe basically can hide the windows control, 
and you can fix the z order that way and put anything rendered by the ie 
on top of the iframe.


You can find the fix code for this in many controls of myfaces (I once 
did a fixup for that bug in the popup javascript code for the popup 
control (shameless plug inserted here), the code there is very generic 
and can be recycled with minor modifications into any control )


The main problem with this iframe method is, you should only use it on 
the IE, because other browsers namely several Mozilla versions do not 
like hidden iframes and basically the page goes haywire over this once 
you start scrolling vertically.




RE: z-order of drop down lists and t:inputCalendar

2006-01-17 Thread James Reynolds

That's correct, the drop down list is rendered in part by the operating
system and not just the browser.  I found this out when implementing a
'pop up' using css.  The month dropdown list was at the top level, much
to my chagrin.  I dealt with it using the calendar's rendered attribute.
In my page, when a pseudo pop up is present, I mimic a 'modal' situation
by setting the base page component's disabled attribute to true.  I used
the same property to control the inputDate's rendered property.

I don't know if your situation is similar, but I hope this is helpful.

-Original Message-
From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 4:55 PM
To: users@myfaces.apache.org
Subject: z-order of drop down lists and t:inputCalendar

For those of you using t:calendar, you may notice that it hides all drop
down lists on the page whenever the calendar pops up.  I was wondering
if anyone can shed some light on why this happens.  The last time I had
this conversation with a colleague, I remeber him telling me that with
some operating systems, the drop down list control get it's "own window"
and you simply cannot display another control on top by manipulating the
z order.  Apparently this goes back to the early 90's .  Can't find
anything on Google either.

Dennis Byrne





Re: Components referencing the parent class didn't get value

2006-01-17 Thread Simon Kitching
You've got class B extending class A.
You've got a managed-bean declaration mapping "a" to class A.
You've got a managed-bean declaration mapping "b" to class B.

When the JSP page references "a", this creates an instance of A and sets
it up.

When the JSP page references "b", this creates an instance of B, a
*separate* object. This object will of course not see the values set up
for the object "a".

Shouldn't your jsp page reference "b" everywhere, rather than mix "a"
and "b"? That way, only one managed bean instance is created.

Regards,

Simon


On Tue, 2006-01-17 at 18:07 -0500, Emily Gu wrote:
> Thanks for your quick reply, Simon!
>  
> I have something like following
>  
> public class A {
> 
>public void changeChoices(ValueChangeEvent event)  {
>   // Gets the car from the cars list
>  
>   // Updates the myCar instance to be selected car.
>  
>}
>  
>public update () {
> System.out.println(myCar.getId());
> System.out.println(myCar.getName());
>  
> ...
>}
>  
>public MyCar getMyCar() {
> return myCar;
>}
>  
>private MyCar myCar = new MyCar();
>private Carscars   = new Cars();
>  
> }
>  
> Where 
>   myCar = new MyCar();
>   cars = new Cars();
>  
> Instantiates objects and gets data from database. Both have been
> defined as the managed bean and put in the session scope.
>  
> I have another class 
>  
> public class B extends A {
>  public create () {
>   System.out.println(getMyCar().getId());
> }
> }
>  
> In the jsp page I have something like:
>  
> 
> 
> <
> 
> h:selectOneMenu id="profiles"  value="#{a.myCar.id}" 
> 
> onchange="document.myForm.submit()"
> 
> valueChangeListener="#{a.changeChoices}"
> 
> immediate="false">
> 
> 
> 
>  
> 
> // some other form fields directly bonded to class B properties
> 
> <
> 
> h:commandLink immediate="false"  action="#{b.create}"
> styleClass="formButtonLink" 
> 
> value="Create" /> 
>  
>  
> The problem is the component bonded to Class A, when I try to get the
> the value in class B
> as System.out.println(getMyCar().getId()); it always returns null. For
> components bonded to Class B, everything is fine. I must have done
> something wrong. please advice.
>  
> Thanks a lot!
> Emily
>  
> On 1/17/06, Simon Kitching <[EMAIL PROTECTED]> wrote: 
> On Tue, 2006-01-17 at 17:07 -0500, Emily Gu wrote:
> > Hi,
> >
> >  I have a page that have some components referencing the
> parent 
> > backing bean and some referencing the child backing bean. I
> need to do
> > some action handling in child class. But the value of
> component
> > referencing the parent class is null all the time. The
> component 
> > referencing the child class is fine. Do you see anything I
> am missing
> > so that the component referencing the parent class didn't
> get bonded?
> 
> I think you'll need to provide some more information.
> 
> What do you mean by "parent backing bean" and "child backing
> bean"?
> 
> Please also include relevant parts of your JSP page and
> backing bean
> classes.
> 
> Regards,
> 
> Simon
> 
> 



z-order of drop down lists and t:inputCalendar

2006-01-17 Thread Dennis Byrne
For those of you using t:calendar, you may notice that it hides all drop down 
lists on the page whenever the calendar pops up.  I was wondering if anyone can 
shed some light on why this happens.  The last time I had this conversation 
with a colleague, I remeber him telling me that with some operating systems, 
the drop down list control get it's "own window" and you simply cannot display 
another control on top by manipulating the z order.  Apparently this goes back 
to the early 90's .  Can't find anything on Google either.

Dennis Byrne




RE: another commandLink problem

2006-01-17 Thread Gary VanMatre

From the stack it doesn't look like your are using Shale or Clay so you can remove all but the *.faces mapping.  I don't think that's your problem.
 
I can't see what is going on here.  I'm afraid that I'm just giving you bad information.
 
Gary
 
 
-- Original message -- From: "Garner, Shawn" <[EMAIL PROTECTED]> 




Actually:
 

    faces&
 lt;/servlet-name>
    *.faces
 url-pattern>
  servlet-mapping>
 
  
  
    faces&
 lt;/servlet-name>
    *.html&
 lt;/url-pattern>
  servlet-mapping>
 
  
  
    faces&
 lt;/servlet-name>
    *.xml&l
 t;/url-pattern>
  servlet-mapping>
 
 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 4:18 PMTo: MyFaces DiscussionSubject: RE: another commandLink problem
 

Sorry, I was off a few lines.  What is your faces servlet mapping?  Is it mapped to *.faces.  

 

I'm guessing that that view handler thinks this is an external mapping that's why it's doing the dispatch versus swapping out the view.  Are you using /context07/personal.jsp from your browser or /context07/personal.faces?

 

Gary

 

-- Original message -- From: "Garner, Shawn" <[EMAIL PROTECTED]> > I don't think it's meaningful: > > javax.faces.FacesException: Unhandled exception thrown from > /context07/personal.jsp:16 > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:421) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand > lerImpl.java:234) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequest Di
 spatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception > thrown from /context07/personal.jsp:16 > at jrun.jsp.runtime.Utils.handleException(Utils.java:57) > at > jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39 > 0) > at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__ > personal2ejsp1f.java:1684) > at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) > at jrun.jsp.JSPServlet.service(JSPServlet.java:119) > at jrun.servlet.ServletInvoke r
 .invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534 > ) > at > jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java: > 503) > at > jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:415) > ... 10 more > > javax.servlet.ServletException: Unhandled exception thrown from > /context07/personal.jsp:16 > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunR 
 equestDispatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > > > -Original Message- > From: Dennis Byrne [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 17, 2006 3:14 PM > To: MyFaces Discussion > Subject: Re: another commandLink problem > > >I tried client and now it blows up on every link on pages that use to work. > > Stacktrace? Meaningful description? > > Dennis Byrne > > >  > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. >  
 
This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete 

Re: Components referencing the parent class didn't get value

2006-01-17 Thread Emily Gu
Thanks for your quick reply, Simon!
 
I have something like following
 
public class A {
    
   public void changeChoices(ValueChangeEvent event)  {
  // Gets the car from the cars list
 
  // Updates the myCar instance to be selected car.
 
   }
 
   public update () {
    System.out.println(myCar.getId());
    System.out.println(myCar.getName());
 
    ...
   }
 
   public MyCar getMyCar() {
    return myCar;
   }
 
   private MyCar myCar = new MyCar();
   private Cars    cars   = new Cars();
 
}
 
Where 
  myCar = new MyCar();
  cars = new Cars();
 
Instantiates objects and gets data from database. Both have been defined as the managed bean and put in the session scope.
 
I have another class 
 
public class B extends A {
 public create () {
  System.out.println(getMyCar().getId());
    }
}
 
In the jsp page I have something like:
 



h:selectOneMenu>
// some other form fields directly bonded to class B properties

h:form>
 
The problem is the component bonded to Class A, when I try to get the the value in class B
as System.out.println(getMyCar().getId()); it always returns null. For components bonded to Class B, everything is fine. I must have done something wrong. please advice.
 
Thanks a lot!
Emily 
On 1/17/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
On Tue, 2006-01-17 at 17:07 -0500, Emily Gu wrote:> Hi,>>  I have a page that have some components referencing the parent
> backing bean and some referencing the child backing bean. I need to do> some action handling in child class. But the value of component> referencing the parent class is null all the time. The component
> referencing the child class is fine. Do you see anything I am missing> so that the component referencing the parent class didn't get bonded?I think you'll need to provide some more information.
What do you mean by "parent backing bean" and "child backing bean"?Please also include relevant parts of your JSP page and backing beanclasses.Regards,Simon



RE: another commandLink problem

2006-01-17 Thread Garner, Shawn








Actually:

 



    facesservlet-name>

    *.facesurl-pattern>

  servlet-mapping>

 

  

  

    facesservlet-name>

    *.htmlurl-pattern>

  servlet-mapping>

 

  

  

    facesservlet-name>

    *.xmlurl-pattern>

  servlet-mapping>

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
4:18 PM
To: MyFaces Discussion
Subject: RE: another commandLink
problem



 



Sorry, I was off a few lines.  What is your faces servlet
mapping?  Is it mapped to *.faces.  





 





I'm guessing that that view handler thinks this is an external
mapping that's why it's doing the dispatch versus swapping out the
view.  Are you using /context07/personal.jsp from your browser or
/context07/personal.faces?





 





Gary





 





-- Original message -- 
From: "Garner, Shawn" <[EMAIL PROTECTED]> 

> I don't think it's meaningful: 
> 
> javax.faces.FacesException: Unhandled exception thrown from 
> /context07/personal.jsp:16 
> at 
>
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl 
> etExternalContextImpl.java:421) 
> at 
>
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand 
> lerImpl.java:234) 
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) 
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) 
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
> jrun.servlet.JRunRequest Dispatcher.invoke(JRunRequestDispatcher.java:259)

> at 
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) 
> at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) 
> at 
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 
> ) 
> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 
> Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception 
> thrown from /context07/personal.jsp:16 
> at jrun.jsp.runtime.Utils.handleException(Utils.java:57) 
> at 
>
jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39 
> 0) 
> at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__ 
> personal2ejsp1f.java:1684) 
> at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) 
> at jrun.jsp.JSPServlet.service(JSPServlet.java:119) 
> at jrun.servlet.ServletInvoke r.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
>
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534 
> ) 
> at 
>
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java: 
> 503) 
> at 
> jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177)

> at 
>
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl 
> etExternalContextImpl.java:415) 
> ... 10 more 
> 
> javax.servlet.ServletException: Unhandled exception thrown from 
> /context07/personal.jsp:16 
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) 
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
> jrun.servlet.JRunR equestDispatcher.invoke(JRunRequestDispatcher.java:259)

> at 
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) 
> at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) 
> at 
> jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428

> ) 
> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 
> 
> 
> -Original Message- 
> From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 17, 2006 3:14 PM 
> To: MyFaces Discussion 
> Subject: Re: another commandLink problem 
> 
> >I tried client and now it blows up on every link on pages that use to
work. 
> 
> Stacktrace? Meaningful description? 
> 
> Dennis Byrne 
> 
> 
> 

> This email may contain confidential material. 
> If you were not an intended recipient, 
> Please notify the sender and delete all copies. 
> We may monitor email to and from our network. 
> 







 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





RE: another commandLink problem

2006-01-17 Thread Garner, Shawn








*.faces

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
4:18 PM
To: MyFaces Discussion
Subject: RE: another commandLink
problem



 



Sorry, I was off a few lines.  What is your faces servlet
mapping?  Is it mapped to *.faces.  





 





I'm guessing that that view handler thinks this is an external
mapping that's why it's doing the dispatch versus swapping out the
view.  Are you using /context07/personal.jsp from your browser or
/context07/personal.faces?





 





Gary





 





-- Original message -- 
From: "Garner, Shawn" <[EMAIL PROTECTED]> 

> I don't think it's meaningful: 
> 
> javax.faces.FacesException: Unhandled exception thrown from 
> /context07/personal.jsp:16 
> at 
>
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl 
> etExternalContextImpl.java:421) 
> at 
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand

> lerImpl.java:234) 
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) 
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) 
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
> jrun.servlet.JRunRequest Dispatcher.invoke(JRunRequestDispatcher.java:259)

> at 
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) 
> at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) 
> at 
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 
> ) 
> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 
> Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception 
> thrown from /context07/personal.jsp:16 
> at jrun.jsp.runtime.Utils.handleException(Utils.java:57) 
> at 
>
jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39 
> 0) 
> at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__ 
> personal2ejsp1f.java:1684) 
> at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) 
> at jrun.jsp.JSPServlet.service(JSPServlet.java:119) 
> at jrun.servlet.ServletInvoke r.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
>
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534 
> ) 
> at 
>
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java: 
> 503) 
> at 
> jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177)

> at 
>
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl 
> etExternalContextImpl.java:415) 
> ... 10 more 
> 
> javax.servlet.ServletException: Unhandled exception thrown from 
> /context07/personal.jsp:16 
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) 
> at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) 
> at 
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) 
> at 
> jrun.servlet.JRunR equestDispatcher.invoke(JRunRequestDispatcher.java:259)

> at 
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) 
> at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) 
> at 
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 
> ) 
> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 
> 
> 
> -Original Message- 
> From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 17, 2006 3:14 PM 
> To: MyFaces Discussion 
> Subject: Re: another commandLink problem 
> 
> >I tried client and now it blows up on every link on pages that use to
work. 
> 
> Stacktrace? Meaningful description? 
> 
> Dennis Byrne 
> 
> 
> 

> This email may contain confidential material. 
> If you were not an intended recipient, 
> Please notify the sender and delete all copies. 
> We may monitor email to and from our network. 
>
 






 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





Wanting to validate *before* conversion

2006-01-17 Thread Dennis Byrne
I have a requirement to provide users with a single text field to specify time. 
 The time must be in [0-23]:[0-59] format ( in the US, military format).  The 
inputText field is bound to a java.util.Date in the domain model.

In cases where users enter an invalid time, a ConverterException prevents 
validation.  I would like to avoid the following :

* letting the exception occur, and handling it at the dep. desc. level
* swallowing exceptions in the Converter, and validating the submittedValue
* throwing a ValidatorException from a Converter

Must I do this manually in an action ?

Dennis Byrne




Re: Components referencing the parent class didn't get value

2006-01-17 Thread Simon Kitching
On Tue, 2006-01-17 at 17:07 -0500, Emily Gu wrote:
> Hi,
>  
>  I have a page that have some components referencing the parent
> backing bean and some referencing the child backing bean. I need to do
> some action handling in child class. But the value of component
> referencing the parent class is null all the time. The component
> referencing the child class is fine. Do you see anything I am missing
> so that the component referencing the parent class didn't get bonded?

I think you'll need to provide some more information.

What do you mean by "parent backing bean" and "child backing bean"?

Please also include relevant parts of your JSP page and backing bean
classes.

Regards,

Simon



RE: another commandLink problem

2006-01-17 Thread Gary VanMatre

Sorry, I was off a few lines.  What is your faces servlet mapping?  Is it mapped to *.faces.  
 
I'm guessing that that view handler thinks this is an external mapping that's why it's doing the dispatch versus swapping out the view.  Are you using /context07/personal.jsp from your browser or /context07/personal.faces?
 
Gary
 
-- Original message -- From: "Garner, Shawn" <[EMAIL PROTECTED]> > I don't think it's meaningful: > > javax.faces.FacesException: Unhandled exception thrown from > /context07/personal.jsp:16 > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:421) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand > lerImpl.java:234) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequest
 Dispatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception > thrown from /context07/personal.jsp:16 > at jrun.jsp.runtime.Utils.handleException(Utils.java:57) > at > jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39 > 0) > at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__ > personal2ejsp1f.java:1684) > at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) > at jrun.jsp.JSPServlet.service(JSPServlet.java:119) > at jrun.servlet.ServletInvoke
 r.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534 > ) > at > jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java: > 503) > at > jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:415) > ... 10 more > > javax.servlet.ServletException: Unhandled exception thrown from > /context07/personal.jsp:16 > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunR
 equestDispatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > > > -Original Message- > From: Dennis Byrne [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 17, 2006 3:14 PM > To: MyFaces Discussion > Subject: Re: another commandLink problem > > >I tried client and now it blows up on every link on pages that use to work. > > Stacktrace? Meaningful description? > > Dennis Byrne > > >  > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. >  


Components referencing the parent class didn't get value

2006-01-17 Thread Emily Gu
Hi,
 
 I have a page that have some components referencing the parent backing bean and some referencing the child backing bean. I need to do some action handling in child class. But the value of component referencing the parent class is null all the time. The component referencing the child class is fine. Do you see anything I am missing so that the component referencing the parent class didn't get bonded?

 
Thanks,
Emily


RE: another commandLink problem

2006-01-17 Thread Gary VanMatre

That's weird.  It looks like your page doesn't have a view root defined.  Do you have the  tag in your jsp?
 
 
-- Original message -- From: "Garner, Shawn" <[EMAIL PROTECTED]> > I don't think it's meaningful: > > javax.faces.FacesException: Unhandled exception thrown from > /context07/personal.jsp:16 > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:421) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand > lerImpl.java:234) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequest
 Dispatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception > thrown from /context07/personal.jsp:16 > at jrun.jsp.runtime.Utils.handleException(Utils.java:57) > at > jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39 > 0) > at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__ > personal2ejsp1f.java:1684) > at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) > at jrun.jsp.JSPServlet.service(JSPServlet.java:119) > at jrun.servlet.ServletInvoke
 r.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534 > ) > at > jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java: > 503) > at > jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177) > at > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl > etExternalContextImpl.java:415) > ... 10 more > > javax.servlet.ServletException: Unhandled exception thrown from > /context07/personal.jsp:16 > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunR
 equestDispatcher.invoke(JRunRequestDispatcher.java:259) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > ) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > > > -Original Message- > From: Dennis Byrne [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 17, 2006 3:14 PM > To: MyFaces Discussion > Subject: Re: another commandLink problem > > >I tried client and now it blows up on every link on pages that use to work. > > Stacktrace? Meaningful description? > > Dennis Byrne > > >  > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. >  


RE: another commandLink problem

2006-01-17 Thread Garner, Shawn
I don't think it's meaningful:

javax.faces.FacesException: Unhandled exception thrown from
/context07/personal.jsp:16
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:421)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:234)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: jrun.jsp.runtime.UncaughtPageException: Unhandled exception
thrown from /context07/personal.jsp:16
at jrun.jsp.runtime.Utils.handleException(Utils.java:57)
at
jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:39
0)
at jrun__context07__personal_2ejsp1f._jspService(jrun__context07__
personal2ejsp1f.java:1684)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
at jrun.jsp.JSPServlet.service(JSPServlet.java:119)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:534
)
at
jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:
503)
at
jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:177)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:415)
... 10 more
 
 javax.servlet.ServletException: Unhandled exception thrown from
/context07/personal.jsp:16
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


-Original Message-
From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 3:14 PM
To: MyFaces Discussion
Subject: Re: another commandLink problem

>I tried client and now it blows up on every link on pages that use to work.

Stacktrace? Meaningful description?

Dennis Byrne


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: myFaces - servlet redirect.

2006-01-17 Thread Udo Schnurpfeil

I think, the mapping for the NonFacesRequestServlet can also called
/faces/NonFacesRequestServlet (it might be a little nicer)

to the difference of myfaces and the sun-ri:
I've setup an example here
http://svn.apache.org/repos/asf/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/

web.xml snip:
   
   /FishServlet
   
   /faces/FishServlet


Matthias Wessendorf schrieb:


On 1/17/06, Volker Weber <[EMAIL PROTECTED]> wrote:
 


No !

"/faces/*" is the mapping for FacesServlet

"/faces"  is the mapping for NonFacesRequestServlet

I don't like it, but this works with Jeff's example app.
   



ah! that is a hack :-)

Udo's email sounds *interesting*.
I'll look at it!

Regards,
Matthias


 


Regards
 Volker

Matthias Wessendorf wrote:
   


/faces
   


/faces/*

just like discussed here:
http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html

(sent you the link already ;))

-Matthias

 


--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

   




--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

 





Re: myFaces and dynamic table model

2006-01-17 Thread Andreas Zeller - zit-systems




Hi Simon,

I am already using the columns tag. I'm just not getting my model to do
what I want to do. I'd be glad to have a look at your renderer. Would
probably be a good idea to try something else.

You mentioned using the columns tag. If you have a simple example for
exactly that purpose which doesn't use a custom renderer but a sample
backing bean for the columns tag, that'd be like perfect.

I have absolutely no clue how to get the column order back into the
view without messing up the entire model, without using dummy values
and so on. I would just like to store the order and redraw the model.

Next step will be to access ONE row for editing. I hope, at least that
is going to be easier...

Andreas

Simon Kitching wrote:

  On Tue, 2006-01-17 at 21:20 +0100, Andreas Zeller - zit-systems wrote:
  
  
Hi there,

I have been working with myFaces for the past few weeks and tried to
implement a product management tool.

Works as follows:

It displays and html table with several columns, that should as well be
removable and movable. I managed to implement sorting with
commandSortHeader and inline-editing, using the column Tag.

  
  
I've implemented exactly that, with a "picklist" popup dialog to allow
the user to select which columns are shown, and in which order.

It's not possible to do this with the standard datatable, however. I
wrote a custom subclass of t:dataTable which adds attribute
"columnOrder". A custom renderer then filters the columns seen by the
standard renderer.

  
  
But I am a little confused using the columns tag. How can I, for
instance, set a single column not rendered? If I set the rendered
attribute, I thought it might affect only a single column, but the
moment I set the rendered attribute, it disable the entire set of columns.

  
  
Yep. That approach doesn't work (at least I spent a lot of time on it,
and didn't find any way to just hide a column).

  
  
Anyway, I now decided to remove the columns from the model and remove
the data instead of disabling them, but somehow I now get an
IndexOutOfBoundsException that I didn't manage to get rid of yet.

  
  
That doesn't work; removing columns has all sorts of nasty internal
implications for the data table component. However a custom Renderer can
effectively do this by overriding the getChildren and getChildCount
methods to "filter out" the unwanted columns.

  
  
My question would be, if anybody already has such a table model as a
reference. I already took a look at the examples at irian.at, but the
only dynamic model doesn't actually move and remove columns but fill
them dynamically with random numbers, not exactly with values.

  
  
I've got permission to contribute this code to MyFaces, but not enough
time to do the actual integration just now. I can send you the code,
though.

  
  
If anyone has an example for that, I'd be glad if he or she might want
to share it with me.

  
  
An alternative is to use the t:columns component instead of normal
columns, ie have a table with just one child: a t:columns. This then
allows you to define everything very dynamically though it does move the
definition of what columns exist into the backing bean rather than being
in the JSP page.

Regards,

Simon




  






Re: myFaces and dynamic table model

2006-01-17 Thread Mike Kienenberger
> - Your data model, where columns can be marked disabled.

Oops.  The disabled marking would really be in your adaptor class, not
in your raw data model.  Stream of conciousness typing error.

On 1/17/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> Well, I'd base it on the Swing Table model rather than inventing this
> all from scratch.
>
> You actually need two models:
> - Your data model, where columns can be marked disabled.
> - Your column view model, which only contains the columns in the
> rendering order.
>
> So your data model has 1,2,3,4,5 and your column view model (which is
> the backing model for t:columns) might contain 3,1,5.   You'll
> probably also want some view-to-model adaptor class that can get from
> a column view model index to a data model index, and vice-versa.  That
> way you keep your data model pure from view abstractions, and the JSF
> backing model is still in the format expected by dataTable.
>
> If you get all of this working, it'd be a great contribution to MyFaces.
>
> On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
> >  My idea was as follows:
> >
> >  Add a remove button like "-", arrows for moving columns from left to right
> > all inside a panelgroup in the table header.
> >
> >  Columns have IDs, that's how I identify them. For each ID there's a
> > position. I store these values inside a Map.
> >
> >  When building the actual table Model, I store the values inside a List at
> > specific positions... First of all, I have to fill the model with
> > dummy-values so I can set specific positions, because a List doesn't like
> > any value being set at index X, when it is empty. So I need to fill it up
> > with some crap and remove the crap after building it.
> >
> >  A more elegant way would of course be getting rid of the dummy values, but
> > I don't see any elegant way to do this, because any "packing" method I was
> > thinking about would screw up my model. For example: If I have 5 columns and
> > I disable column #3. It should draw column 1, 2, 4, 5. Wouldn't be too bad
> > if column #3 was appended when I put it back in, but I need to update the
> > entire model including the stored data, instead of just having it "disabled"
> > and leave the data inside the bean, where it belongs...
> >
> >  See my problem?
> >
> >  Andreas
> >
> >
> >
> >  Mike Kienenberger wrote:
> >  On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> >  Thanks for the quick reply. I already tried that, unfortunately I just get
> > empty columns, with not text at all, it doesn't actually remove the column.
> >
> >  Yeah, you're right. That'd leave empty columns
> >
> >
> >
> >  I'd be really glad if there were some kind of a straight forward example.
> >
> >  Someone must have done something like this by now, hasn't anyone?
> >
> >  I don't think so. It was considered pretty innovative to have the
> > ability to have the number of columns be dynamic. I haven't heard of
> > anyone trying to add or remove columns afterward yet.
> >
> > Changing the backing model for t:columns sounds like the way to go.
> > You're going to have to work through whatever bugs that might entail
> > though. At what point in the jsf lifecycle are you trying to change
> > the column model? I'd say you can only change it in invoke
> > application. Changing it before updateModel or after renderResponse
> > is probably going to fail because other code depends on those column
> > numbers remaining constant.
> >
> >
> >
> >
> >
>


Re: another commandLink problem

2006-01-17 Thread Dennis Byrne
>I tried client and now it blows up on every link on pages that use to work.

Stacktrace? Meaningful description?

Dennis Byrne




RE: another commandLink problem

2006-01-17 Thread Gary VanMatre

>From: "Garner, Shawn" <[EMAIL PROTECTED]> 





>I tried client and now it blows up on every link on pages that use to work.
>I don't use the back button.  I just use the same url from a new browser window after >I restart the server.
 
What does the exception say?  
 
>Shawn
 
Gary
 


Re: myFaces and dynamic table model

2006-01-17 Thread Mike Kienenberger
Well, I'd base it on the Swing Table model rather than inventing this
all from scratch.

You actually need two models:
- Your data model, where columns can be marked disabled.
- Your column view model, which only contains the columns in the
rendering order.

So your data model has 1,2,3,4,5 and your column view model (which is
the backing model for t:columns) might contain 3,1,5.   You'll
probably also want some view-to-model adaptor class that can get from
a column view model index to a data model index, and vice-versa.  That
way you keep your data model pure from view abstractions, and the JSF
backing model is still in the format expected by dataTable.

If you get all of this working, it'd be a great contribution to MyFaces.

On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
>  My idea was as follows:
>
>  Add a remove button like "-", arrows for moving columns from left to right
> all inside a panelgroup in the table header.
>
>  Columns have IDs, that's how I identify them. For each ID there's a
> position. I store these values inside a Map.
>
>  When building the actual table Model, I store the values inside a List at
> specific positions... First of all, I have to fill the model with
> dummy-values so I can set specific positions, because a List doesn't like
> any value being set at index X, when it is empty. So I need to fill it up
> with some crap and remove the crap after building it.
>
>  A more elegant way would of course be getting rid of the dummy values, but
> I don't see any elegant way to do this, because any "packing" method I was
> thinking about would screw up my model. For example: If I have 5 columns and
> I disable column #3. It should draw column 1, 2, 4, 5. Wouldn't be too bad
> if column #3 was appended when I put it back in, but I need to update the
> entire model including the stored data, instead of just having it "disabled"
> and leave the data inside the bean, where it belongs...
>
>  See my problem?
>
>  Andreas
>
>
>
>  Mike Kienenberger wrote:
>  On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]>
> wrote:
>
>
>  Thanks for the quick reply. I already tried that, unfortunately I just get
> empty columns, with not text at all, it doesn't actually remove the column.
>
>  Yeah, you're right. That'd leave empty columns
>
>
>
>  I'd be really glad if there were some kind of a straight forward example.
>
>  Someone must have done something like this by now, hasn't anyone?
>
>  I don't think so. It was considered pretty innovative to have the
> ability to have the number of columns be dynamic. I haven't heard of
> anyone trying to add or remove columns afterward yet.
>
> Changing the backing model for t:columns sounds like the way to go.
> You're going to have to work through whatever bugs that might entail
> though. At what point in the jsf lifecycle are you trying to change
> the column model? I'd say you can only change it in invoke
> application. Changing it before updateModel or after renderResponse
> is probably going to fail because other code depends on those column
> numbers remaining constant.
>
>
>
>
>


Re: myFaces and dynamic table model

2006-01-17 Thread Simon Kitching
On Tue, 2006-01-17 at 21:20 +0100, Andreas Zeller - zit-systems wrote:
> Hi there,
> 
> I have been working with myFaces for the past few weeks and tried to
> implement a product management tool.
> 
> Works as follows:
> 
> It displays and html table with several columns, that should as well be
> removable and movable. I managed to implement sorting with
> commandSortHeader and inline-editing, using the column Tag.

I've implemented exactly that, with a "picklist" popup dialog to allow
the user to select which columns are shown, and in which order.

It's not possible to do this with the standard datatable, however. I
wrote a custom subclass of t:dataTable which adds attribute
"columnOrder". A custom renderer then filters the columns seen by the
standard renderer.

> 
> But I am a little confused using the columns tag. How can I, for
> instance, set a single column not rendered? If I set the rendered
> attribute, I thought it might affect only a single column, but the
> moment I set the rendered attribute, it disable the entire set of columns.

Yep. That approach doesn't work (at least I spent a lot of time on it,
and didn't find any way to just hide a column).

> 
> Anyway, I now decided to remove the columns from the model and remove
> the data instead of disabling them, but somehow I now get an
> IndexOutOfBoundsException that I didn't manage to get rid of yet.

That doesn't work; removing columns has all sorts of nasty internal
implications for the data table component. However a custom Renderer can
effectively do this by overriding the getChildren and getChildCount
methods to "filter out" the unwanted columns.

> 
> My question would be, if anybody already has such a table model as a
> reference. I already took a look at the examples at irian.at, but the
> only dynamic model doesn't actually move and remove columns but fill
> them dynamically with random numbers, not exactly with values.

I've got permission to contribute this code to MyFaces, but not enough
time to do the actual integration just now. I can send you the code,
though.

> 
> If anyone has an example for that, I'd be glad if he or she might want
> to share it with me.

An alternative is to use the t:columns component instead of normal
columns, ie have a table with just one child: a t:columns. This then
allows you to define everything very dynamically though it does move the
definition of what columns exist into the backing bean rather than being
in the JSP page.

Regards,

Simon




Re: myFaces and dynamic table model

2006-01-17 Thread Andreas Zeller - zit-systems




My idea was as follows:

Add a remove button like "-", arrows for moving columns from left to
right all inside a panelgroup in the table header.

Columns have IDs, that's how I identify them. For each ID there's a
position. I store these values inside a Map.

When building the actual table Model, I store the values inside a List
at specific positions... First of all, I have to fill the model with
dummy-values so I can set specific positions, because a List doesn't
like any value being set at index X, when it is empty. So I need to
fill it up with some crap and remove the crap after building it.

A more elegant way would of course be getting rid of the dummy values,
but I don't see any elegant way to do this, because any "packing"
method I was thinking about would screw up my model. For example: If I
have 5 columns and I disable column #3. It should draw column 1, 2, 4,
5. Wouldn't be too bad if column #3 was appended when I put it back in,
but I need to update the entire model including the stored data,
instead of just having it "disabled" and leave the data inside the
bean, where it belongs...

See my problem?

Andreas


Mike Kienenberger wrote:

  On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
  
  
 Thanks for the quick reply. I already tried that, unfortunately I just get
empty columns, with not text at all, it doesn't actually remove the column.

  
  
Yeah, you're right.  That'd leave empty columns

  
  
 I'd be really glad if there were some kind of a straight forward example.

 Someone must have done something like this by now, hasn't anyone?

  
  
I don't think so.  It was considered pretty innovative to have the
ability to have the number of columns be dynamic.   I haven't heard of
anyone trying to add or remove columns afterward yet.

Changing the backing model for t:columns sounds like the way to go.  
You're going to have to work through whatever bugs that might entail
though.   At what point in the jsf lifecycle are you trying to change
the column model?  I'd say you can only change it in invoke
application.   Changing it before updateModel or after renderResponse
is probably going to fail because other code depends on those column
numbers remaining constant.


  






RE: another commandLink problem

2006-01-17 Thread Garner, Shawn








I tried client and now it blows up on
every link on pages that use to work.

I don't use the back button.  I just
use the same url from a new browser window after I restart the server.

 

Shawn

 









From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
2:55 PM
To: MyFaces Discussion
Subject: Re: another commandLink
problem



 



>From: "Garner, Shawn" [EMAIL PROTECTED] 





>I've noticed my commandLinks don't go to the page the first
time.  





>It seems to reload the page and then if I click on it
again it goes to 





>the next view.





> 





 





This is common behavior in MyFaces when you use the brower
back button to a dirty 





page and repost it.  I believe it has to do with how
the component tree's state is 





saved.  I suspect that myfaces only caches a single
page.  So, navigation to a new





page overrides the cached state of the old.  The double
post is needed because the





state manager can't resort the view and just skips to the
render phase. 





 





 





The RI behaves differently here.  





 





 





>Anyone know what is causing this, how to fix it?





> 





 





Try turning on client side state saving.  You do this
in your web deployment descriptor.





 





  
   
javax.faces.STATE_SAVING_METHOD
    client
  





 





>Shawn





 





 





Gary






 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





Re: another commandLink problem

2006-01-17 Thread Mike Kienenberger
Right.   We know the navigation rules are correct which is why I
didn't ask for them.  The jsp code and possibly the managed bean
definitions are what we need to see.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> 
> /context07/summary.jsp
> 
>   college
>   /context07/college.jsp
> 
>
> ... rest of navigation-cases
> 
>
> if I type in /context07/college.faces in the url the college page comes
> right up.
>
> However the  on the summary page I have to
> click on it and then click on it again.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 2:39 PM
> To: MyFaces Discussion
> Subject: Re: another commandLink problem
>
> Can you post your jsp or facelets page code?
> It's not really possible to give anything beyond the vague answers
> below without more specific information.
>
> It'd probably also be helpful to post the faces-config information for
> any managed beans being used.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > I don't get what the problem is then?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 2:27 PM
> > To: MyFaces Discussion
> > Subject: Re: another commandLink problem
> >
> > Right, but the second time you've clicked on the link, the page has
> > been redrawn, the component tree updated, and the request map reset,
> > etc, so that doesn't really eliminate any possibilities.  :)
> >
> > If you're using a hardcoded action literal string, then yes, you can
> > eliminate the navigation manager cause.   If you're not using rendered
> > in the link or any of its ancestors, you can eliminate that.   If
> > there's a UIData component in the ancestors, that's the likely cause
> > -- you need to preserve the backing data model between requests.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > Well I'd say it's definitely know to the navigation handler because it
> > finds
> > > the page the second time I click on the same link.
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 2:14 PM
> > > To: MyFaces Discussion
> > > Subject: Re: another commandLink problem
> > >
> > > If the returned string for the action is null or unknown to the
> > > navigation manager, it'll show the same page again.
> > >
> > > Also, if the commandLink isn't rendered either before or after the
> > > request, it'll return the same page.  Same thing if the link is inside
> > > a UIData component and the UIData model isn't preserved across
> > > requests (t:saveState on request-scoped data).
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > I've noticed my commandLinks don't go to the page the first time.  It
> > > seems
> > > > to reload the page and then if I click on it again it goes to the next
> > > view.
> > > >
> > > > Anyone know what is causing this, how to fix it?
> > > >
> > > >
> > > >
> > > > Shawn
> > > >
> > > >
> > >
> >
> 
> > > >
> > > > This email may contain confidential
> > > > material. If you were not an intended recipient,
> > > > Please notify the sender and delete all copies.
> > > > We may monitor email to and from our network.
> > > >
> > > >
> > >
> >
> ***
> > > >
> > >
> > >
> >
> 
> > > This email may contain confidential material.
> > > If you were not an intended recipient,
> > > Please notify the sender and delete all copies.
> > > We may monitor email to and from our network.
> > >
> >
> 
> > >
> >
> >
> 
> > This email may contain confidential material.
> > If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
> 
> >
>
> 
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> 
>


Re: another commandLink problem

2006-01-17 Thread Gary VanMatre

>From: "Garner, Shawn" [EMAIL PROTECTED] 
>I've noticed my commandLinks don't go to the page the first time.  
>It seems to reload the page and then if I click on it again it goes to 
>the next view.
>
 
This is common behavior in MyFaces when you use the brower back button to a dirty 
page and repost it.  I believe it has to do with how the component tree's state is 
saved.  I suspect that myfaces only caches a single page.  So, navigation to a new
page overrides the cached state of the old.  The double post is needed because the
state manager can't resort the view and just skips to the render phase. 
 
 
The RI behaves differently here.  
 
 
>Anyone know what is causing this, how to fix it?
>
 
Try turning on client side state saving.  You do this in your web deployment descriptor.
 
      javax.faces.STATE_SAVING_METHOD    client  
 
>Shawn
 
 
Gary


Re: myFaces and dynamic table model

2006-01-17 Thread Mike Kienenberger
On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
>  Thanks for the quick reply. I already tried that, unfortunately I just get
> empty columns, with not text at all, it doesn't actually remove the column.

Yeah, you're right.  That'd leave empty columns

>  I'd be really glad if there were some kind of a straight forward example.
>
>  Someone must have done something like this by now, hasn't anyone?

I don't think so.  It was considered pretty innovative to have the
ability to have the number of columns be dynamic.   I haven't heard of
anyone trying to add or remove columns afterward yet.

Changing the backing model for t:columns sounds like the way to go.  
You're going to have to work through whatever bugs that might entail
though.   At what point in the jsf lifecycle are you trying to change
the column model?  I'd say you can only change it in invoke
application.   Changing it before updateModel or after renderResponse
is probably going to fail because other code depends on those column
numbers remaining constant.


Re: myFaces and dynamic table model

2006-01-17 Thread Andreas Zeller - zit-systems




Hey Mike,

Thanks for the quick reply. I already tried that, unfortunately I just
get empty columns, with not text at all, it doesn't actually remove the
column.

I'd be really glad if there were some kind of a straight forward
example.

Someone must have done something like this by now, hasn't anyone?

Andreas

Mike Kienenberger wrote:

  Perhaps instead of setting rendered=false for your column, try setting
it for the component inside your column.

On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
  
  
Hi there,

I have been working with myFaces for the past few weeks and tried to
implement a product management tool.

Works as follows:

It displays and html table with several columns, that should as well be
removable and movable. I managed to implement sorting with
commandSortHeader and inline-editing, using the column Tag.

But I am a little confused using the columns tag. How can I, for
instance, set a single column not rendered? If I set the rendered
attribute, I thought it might affect only a single column, but the
moment I set the rendered attribute, it disable the entire set of columns.

Anyway, I now decided to remove the columns from the model and remove
the data instead of disabling them, but somehow I now get an
IndexOutOfBoundsException that I didn't manage to get rid of yet.

My question would be, if anybody already has such a table model as a
reference. I already took a look at the examples at irian.at, but the
only dynamic model doesn't actually move and remove columns but fill
them dynamically with random numbers, not exactly with values.

If anyone has an example for that, I'd be glad if he or she might want
to share it with me.

Andreas


  
  

  






RE: another commandLink problem

2006-01-17 Thread Garner, Shawn

/context07/summary.jsp

  college
  /context07/college.jsp


... rest of navigation-cases


if I type in /context07/college.faces in the url the college page comes
right up.

However the  on the summary page I have to
click on it and then click on it again.

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 2:39 PM
To: MyFaces Discussion
Subject: Re: another commandLink problem

Can you post your jsp or facelets page code?
It's not really possible to give anything beyond the vague answers
below without more specific information.

It'd probably also be helpful to post the faces-config information for
any managed beans being used.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> I don't get what the problem is then?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 2:27 PM
> To: MyFaces Discussion
> Subject: Re: another commandLink problem
>
> Right, but the second time you've clicked on the link, the page has
> been redrawn, the component tree updated, and the request map reset,
> etc, so that doesn't really eliminate any possibilities.  :)
>
> If you're using a hardcoded action literal string, then yes, you can
> eliminate the navigation manager cause.   If you're not using rendered
> in the link or any of its ancestors, you can eliminate that.   If
> there's a UIData component in the ancestors, that's the likely cause
> -- you need to preserve the backing data model between requests.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Well I'd say it's definitely know to the navigation handler because it
> finds
> > the page the second time I click on the same link.
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 2:14 PM
> > To: MyFaces Discussion
> > Subject: Re: another commandLink problem
> >
> > If the returned string for the action is null or unknown to the
> > navigation manager, it'll show the same page again.
> >
> > Also, if the commandLink isn't rendered either before or after the
> > request, it'll return the same page.  Same thing if the link is inside
> > a UIData component and the UIData model isn't preserved across
> > requests (t:saveState on request-scoped data).
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > I've noticed my commandLinks don't go to the page the first time.  It
> > seems
> > > to reload the page and then if I click on it again it goes to the next
> > view.
> > >
> > > Anyone know what is causing this, how to fix it?
> > >
> > >
> > >
> > > Shawn
> > >
> > >
> >
>

> > >
> > > This email may contain confidential
> > > material. If you were not an intended recipient,
> > > Please notify the sender and delete all copies.
> > > We may monitor email to and from our network.
> > >
> > >
> >
>
***
> > >
> >
> >
>

> > This email may contain confidential material.
> > If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
>

> >
>
>

> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>

>

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: another commandLink problem

2006-01-17 Thread Mike Kienenberger
Can you post your jsp or facelets page code?
It's not really possible to give anything beyond the vague answers
below without more specific information.

It'd probably also be helpful to post the faces-config information for
any managed beans being used.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> I don't get what the problem is then?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 2:27 PM
> To: MyFaces Discussion
> Subject: Re: another commandLink problem
>
> Right, but the second time you've clicked on the link, the page has
> been redrawn, the component tree updated, and the request map reset,
> etc, so that doesn't really eliminate any possibilities.  :)
>
> If you're using a hardcoded action literal string, then yes, you can
> eliminate the navigation manager cause.   If you're not using rendered
> in the link or any of its ancestors, you can eliminate that.   If
> there's a UIData component in the ancestors, that's the likely cause
> -- you need to preserve the backing data model between requests.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Well I'd say it's definitely know to the navigation handler because it
> finds
> > the page the second time I click on the same link.
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 2:14 PM
> > To: MyFaces Discussion
> > Subject: Re: another commandLink problem
> >
> > If the returned string for the action is null or unknown to the
> > navigation manager, it'll show the same page again.
> >
> > Also, if the commandLink isn't rendered either before or after the
> > request, it'll return the same page.  Same thing if the link is inside
> > a UIData component and the UIData model isn't preserved across
> > requests (t:saveState on request-scoped data).
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > I've noticed my commandLinks don't go to the page the first time.  It
> > seems
> > > to reload the page and then if I click on it again it goes to the next
> > view.
> > >
> > > Anyone know what is causing this, how to fix it?
> > >
> > >
> > >
> > > Shawn
> > >
> > >
> >
> 
> > >
> > > This email may contain confidential
> > > material. If you were not an intended recipient,
> > > Please notify the sender and delete all copies.
> > > We may monitor email to and from our network.
> > >
> > >
> >
> ***
> > >
> >
> >
> 
> > This email may contain confidential material.
> > If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
> 
> >
>
> 
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> 
>


RE: another commandLink problem

2006-01-17 Thread Garner, Shawn
I don't get what the problem is then?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 2:27 PM
To: MyFaces Discussion
Subject: Re: another commandLink problem

Right, but the second time you've clicked on the link, the page has
been redrawn, the component tree updated, and the request map reset,
etc, so that doesn't really eliminate any possibilities.  :)

If you're using a hardcoded action literal string, then yes, you can
eliminate the navigation manager cause.   If you're not using rendered
in the link or any of its ancestors, you can eliminate that.   If
there's a UIData component in the ancestors, that's the likely cause
-- you need to preserve the backing data model between requests.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Well I'd say it's definitely know to the navigation handler because it
finds
> the page the second time I click on the same link.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 2:14 PM
> To: MyFaces Discussion
> Subject: Re: another commandLink problem
>
> If the returned string for the action is null or unknown to the
> navigation manager, it'll show the same page again.
>
> Also, if the commandLink isn't rendered either before or after the
> request, it'll return the same page.  Same thing if the link is inside
> a UIData component and the UIData model isn't preserved across
> requests (t:saveState on request-scoped data).
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I've noticed my commandLinks don't go to the page the first time.  It
> seems
> > to reload the page and then if I click on it again it goes to the next
> view.
> >
> > Anyone know what is causing this, how to fix it?
> >
> >
> >
> > Shawn
> >
> >
>

> >
> > This email may contain confidential
> > material. If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
> >
>
***
> >
>
>

> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>

>

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



Re: another commandLink problem

2006-01-17 Thread Mike Kienenberger
Right, but the second time you've clicked on the link, the page has
been redrawn, the component tree updated, and the request map reset,
etc, so that doesn't really eliminate any possibilities.  :)

If you're using a hardcoded action literal string, then yes, you can
eliminate the navigation manager cause.   If you're not using rendered
in the link or any of its ancestors, you can eliminate that.   If
there's a UIData component in the ancestors, that's the likely cause
-- you need to preserve the backing data model between requests.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Well I'd say it's definitely know to the navigation handler because it finds
> the page the second time I click on the same link.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 2:14 PM
> To: MyFaces Discussion
> Subject: Re: another commandLink problem
>
> If the returned string for the action is null or unknown to the
> navigation manager, it'll show the same page again.
>
> Also, if the commandLink isn't rendered either before or after the
> request, it'll return the same page.  Same thing if the link is inside
> a UIData component and the UIData model isn't preserved across
> requests (t:saveState on request-scoped data).
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I've noticed my commandLinks don't go to the page the first time.  It
> seems
> > to reload the page and then if I click on it again it goes to the next
> view.
> >
> > Anyone know what is causing this, how to fix it?
> >
> >
> >
> > Shawn
> >
> >
> 
> >
> > This email may contain confidential
> > material. If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
> >
> ***
> >
>
> 
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> 
>


Re: myFaces and dynamic table model

2006-01-17 Thread Mike Kienenberger
Perhaps instead of setting rendered=false for your column, try setting
it for the component inside your column.

On 1/17/06, Andreas Zeller - zit-systems <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have been working with myFaces for the past few weeks and tried to
> implement a product management tool.
>
> Works as follows:
>
> It displays and html table with several columns, that should as well be
> removable and movable. I managed to implement sorting with
> commandSortHeader and inline-editing, using the column Tag.
>
> But I am a little confused using the columns tag. How can I, for
> instance, set a single column not rendered? If I set the rendered
> attribute, I thought it might affect only a single column, but the
> moment I set the rendered attribute, it disable the entire set of columns.
>
> Anyway, I now decided to remove the columns from the model and remove
> the data instead of disabling them, but somehow I now get an
> IndexOutOfBoundsException that I didn't manage to get rid of yet.
>
> My question would be, if anybody already has such a table model as a
> reference. I already took a look at the examples at irian.at, but the
> only dynamic model doesn't actually move and remove columns but fill
> them dynamically with random numbers, not exactly with values.
>
> If anyone has an example for that, I'd be glad if he or she might want
> to share it with me.
>
> Andreas
>


RE: another commandLink problem

2006-01-17 Thread Garner, Shawn
Well I'd say it's definitely know to the navigation handler because it finds
the page the second time I click on the same link.

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 2:14 PM
To: MyFaces Discussion
Subject: Re: another commandLink problem

If the returned string for the action is null or unknown to the
navigation manager, it'll show the same page again.

Also, if the commandLink isn't rendered either before or after the
request, it'll return the same page.  Same thing if the link is inside
a UIData component and the UIData model isn't preserved across
requests (t:saveState on request-scoped data).

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> I've noticed my commandLinks don't go to the page the first time.  It
seems
> to reload the page and then if I click on it again it goes to the next
view.
>
> Anyone know what is causing this, how to fix it?
>
>
>
> Shawn
>
>

>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
>
***
>

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



myFaces and dynamic table model

2006-01-17 Thread Andreas Zeller - zit-systems
Hi there,

I have been working with myFaces for the past few weeks and tried to
implement a product management tool.

Works as follows:

It displays and html table with several columns, that should as well be
removable and movable. I managed to implement sorting with
commandSortHeader and inline-editing, using the column Tag.

But I am a little confused using the columns tag. How can I, for
instance, set a single column not rendered? If I set the rendered
attribute, I thought it might affect only a single column, but the
moment I set the rendered attribute, it disable the entire set of columns.

Anyway, I now decided to remove the columns from the model and remove
the data instead of disabling them, but somehow I now get an
IndexOutOfBoundsException that I didn't manage to get rid of yet.

My question would be, if anybody already has such a table model as a
reference. I already took a look at the examples at irian.at, but the
only dynamic model doesn't actually move and remove columns but fill
them dynamically with random numbers, not exactly with values.

If anyone has an example for that, I'd be glad if he or she might want
to share it with me.

Andreas


Re: another commandLink problem

2006-01-17 Thread Mike Kienenberger
If the returned string for the action is null or unknown to the
navigation manager, it'll show the same page again.

Also, if the commandLink isn't rendered either before or after the
request, it'll return the same page.  Same thing if the link is inside
a UIData component and the UIData model isn't preserved across
requests (t:saveState on request-scoped data).

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> I've noticed my commandLinks don't go to the page the first time.  It seems
> to reload the page and then if I click on it again it goes to the next view.
>
> Anyone know what is causing this, how to fix it?
>
>
>
> Shawn
>
> 
>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
> ***
>


Re: Shale and MyFaces

2006-01-17 Thread Werner Punz

Craig McClanahan schrieb:



On 1/17/06, *Werner Punz* <[EMAIL PROTECTED] > wrote:

Anyway, I checked out the extensions, and personally think they are
heavens sent, but in my opinion there is huge room for more.
What I really love about Seam and what is missing in the extensions is
an easy dialog mechanism. Currently you have to define your own dialog
flow in a file. Seam does it rather basic, and easy to understand with a
@begin and @end annotation marking the dialog flow borders, everything
in between is not interesting configurationwise.
Is there anything similar planned for Shale? 



Not currently -- and I doubt I would be in favor of it anyway :-).

Annotations are absolutely fantastic for use cases where there is one 
and only one decision to make, and it would never be changed anyway 
because too much other stuff would break.  Annotated managed beans are a 
perfect example of that ... the managed bean name gets baked into every 
value binding expression that references that bean, and the choice of 
scope can dramatically affect how and wehre you encode functionality.  
So why risk having the configuration settings get out of sync because 
they are in a config file instead of the code?



ok point taken...
Snip

 Also one room for improval might be an annotation or implicit 
navigation

handler which directs with an implicit return "nextPage"; onto a
nextPage.jsp/jsf if it can be located within a search path, unless it is
overridden by the config file. That would reduce the number of
navigational entries tremendously.


That kind of thing is a separate concept, and would be interesting to 
explore.  You can already define wildcards in the "from" expressions of 
a navigation rule, and there are rules about the order in which patterns 
are tested, but they don't provide the explicit control over the search 
path that you are describing here.  (But I'd still vote for encoding 
navigation in a config file, not in code :-).


Well the way I see it it is not really code but more an implicit default 
behavior, which you can override by xml. That way you would not loose 
the control over your xml entries but you can cut down on them 
significantly.
Wildcards are very powerful but not quite as compact as an implicit 
mapping, which can be overridden ;-).




Re: Find label of component

2006-01-17 Thread Veit Guna
Yes, ok you're right - sorry.

I didn't know, that you have to specify two different IDs:

--cut here--
FacesMessage lFM = getFacesMessage(FacesMessage.SEVERITY_ERROR, pMsgKey,
new Object[] {lShortFieldId});

getFacesContext().addMessage(pFieldId, lFM);
--cut here--

Where pShortFieldId is e.g. password
whereas pFieldId is registration:password.

Now, it works. Thanks.

regards,
Veit


Mike Kienenberger schrieb:
> Right, I understood you meant customized (programmically created)
> calls to addMessage.
> But that's the same thing that the validators do internally -- call 
> addMessage.
> 
> So if standard validation is working, perhaps the problem is that
> you've specified the wrong clientid value?  (I find it easiest to bind
> the input to the backing bean and call input.getClientId(facesContext)
> to fetch the client id.
> 
> Either that, or maybe your labels aren't set up properlly?
> 
> This should be one of those "just works" situations.
> 
> The code for printing out the label is handled in the t:message(s)
> component and should be independent of the message generation.
> 
> On 1/17/06, Veit Guna <[EMAIL PROTECTED]> wrote:
>> Hi.
>>
>> No, I mean no std. Validation Error messages. These work fine.
>> I mean custom Messages that you add with
>> FacesContext.addMessage(ClientId, FacesMessage). This will be printed
>> "as-is" with no field label attached to it (as {0} or similar).
>>
>> I've used some workaround that is used internally by myfaces. Iterate
>> over all UIComponents on the page, find the OutputLabels, look at the
>> "for" Attribute and get its Component. If it's the label of the given
>> field, extract the label value - which is not very nice. All you get is
>> the EL expression - you have to parse and I18N it by yourself :(.
>>
>> But works for me.
>>
>> regards,
>> Veit
>>
>>
>> Mike Kienenberger schrieb:
>>> If you've set everything else up, it should be automatic:
>>>
>>> http://www.mail-archive.com/users%40myfaces.apache.org/msg15110.html
>>>
>>> On 1/16/06, Veit Guna <[EMAIL PROTECTED]> wrote:
 Hi.

 How can I get the label (outputLabel) for a specific component? I need
 this, to add the label text to a custom validation message. It seems
 that {0} isn't filled automatically with the label when I add a custom
 message with addMessage to the clientId (field).

 regards,
 Veit

>>>
> 
> 


another commandLink problem

2006-01-17 Thread Garner, Shawn








I've noticed my commandLinks don't go to the
page the first time.  It seems to reload the page and then if I click on
it again it goes to the next view.

Anyone know what is causing this, how to fix it?

 

Shawn




 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





Re: I need help in dataList.

2006-01-17 Thread Mike Kienenberger
Yeah, I don't think we really gain anything by not specifying columns
for a dataList-like component, so I don't see a problem with requiring
them.   The advantages of maintaining a single t:dataList are obvious.

On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
> I see what you mean now.  I think you have a good idea, but there are a few 
> attributes, like @layout for dataList, that are not currently there for the 
> t:dataTable component.  Also, I think it may be technically difficult because 
> UIData looks for columns and facets for processUpdates and processDecodes - 
> and, of course, neither of these are children for dataList.
>
> I think someone (maybe Simon) brought this up a long time ago.  Whoever did 
> it, their concern was that UIData was "hopping over" UIColumns to carry out 
> processing - instead of telling each column to do it.
>
> Dennis Byrne
>
> >-Original Message-
> >From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, January 17, 2006 02:28 PM
> >To: 'MyFaces Discussion'
> >Subject: Re: I need help in dataList.
> >
> >Exactly.   We need dataList's renderer ported over to dataTable, and
> >then we can just dump the dataList component.
> >
> >On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
> >> >If you can't make it render like you want, then create your own
> >> >renderer for t:dataTable, and submit it as a replacement for dataList
> >>
> >> I agree that t:dataTable is probably a better alternative.  The problems 
> >> with dataList actually have to do with the UIComponent rather than it's 
> >> renderer.  In current SVN, it will decode properly (events from children 
> >> are registered) but it does not update the model.
> >>
> >> Dennis Byrne
> >>
> >>
> >>
> >
>
>
>


Re: I need help in dataList.

2006-01-17 Thread Dennis Byrne
I see what you mean now.  I think you have a good idea, but there are a few 
attributes, like @layout for dataList, that are not currently there for the 
t:dataTable component.  Also, I think it may be technically difficult because 
UIData looks for columns and facets for processUpdates and processDecodes - 
and, of course, neither of these are children for dataList.

I think someone (maybe Simon) brought this up a long time ago.  Whoever did it, 
their concern was that UIData was "hopping over" UIColumns to carry out 
processing - instead of telling each column to do it.

Dennis Byrne

>-Original Message-
>From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 17, 2006 02:28 PM
>To: 'MyFaces Discussion'
>Subject: Re: I need help in dataList.
>
>Exactly.   We need dataList's renderer ported over to dataTable, and
>then we can just dump the dataList component.
>
>On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
>> >If you can't make it render like you want, then create your own
>> >renderer for t:dataTable, and submit it as a replacement for dataList
>>
>> I agree that t:dataTable is probably a better alternative.  The problems 
>> with dataList actually have to do with the UIComponent rather than it's 
>> renderer.  In current SVN, it will decode properly (events from children are 
>> registered) but it does not update the model.
>>
>> Dennis Byrne
>>
>>
>>
>




RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
I gave up.  I'm just going to hard code the 12 cases in the jsp file with
c:choose and c:when.

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 1:31 PM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

Right, but it'll render the original request value as the parameter
value, it will then assign the old value ("college") to a new request
value (the parameter key) on the next page.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> That f:param thing just prints out the value at the end of the link so I
> don't think it works with that.
>
> I'm not sure what t:saveState does exactly so I'll take a look.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 1:21 PM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> In that case, either try the f:param approach or t:saveState the
> entire list of values, and reference the link by list index
>
> I'd still try the t:saveState first.
>
> I'm surprised someone else hasn't jumped in an recommended better
> solutions, though :)
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Yeah, sounds good but this code is in a loop and each few iterations has
> > different values for linkPage.
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 12:09 PM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > Hmm.   Since you put it that way, maybe not.
> > I'm not entirely certain.  Try it and see, but I think you might be
right.
> >
> > In that case, I'd recommend using t:saveState on a copy of your
> > request variable.
> >
> > Create a YourBean instance variable to hold a copy of
> > "#{param.linkPage}", and add getter/setters for it.
> >
> > Then use  on #{YourBean.variable}
> >
> > You can modify the getter to directly read "#{param.linkPage}"
> > Add an alternate getter to read the actual value and use this one for
your
> > link.
> > There's probably other (better) ways to do this, but none come to mind
> > at present.
> >
> > You could pass the value as an f:param if you're using a link and not a
> > button.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > So the bean's action method is evaluated during render time and not
> after
> > > they click on the link?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 11:51 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > It doesn't need to.   The value is resolved during render time.
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > Can you explain what this is actually doing?
> > > > How does it know how to resolve ("#{param.linkPage}") after the page
> is
> > > > rendered?
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, January 17, 2006 10:57 AM
> > > > To: MyFaces Discussion
> > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > >
> > > > Yes, you're trying to fight the technology.
> > > >
> > > > Just do this.
> > > >
> > > > public class YourBean
> > > > {
> > > >  public String getActionForLinkPage()
> > > >  {
> > > >  FacesContext facesContext =
> FacesContext.getCurrentInstance();
> > > >  String action =
> > > >
> > >
> >
>
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > > > ).getValue(facesContext);
> > > >   return action;
> > > >  }
> > > > }
> > > >
> > > >  > > value="#{linkText}"/>
> > > >
> > > >
> > > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > > Damn, get an exception with f:attribute.  I thought that should
> work.
> > > > >
> > > > > To do  I would have to do a
> > choose/when
> > > > > condition checking the value of #{linkPage} which can have like 12
> > > > different
> > > > > values.  Seems like a messy solution to me.
> > > > >
> > > > > Shawn
> > > > >
> > > > > -Original Message-
> > > > > From: Garner, Shawn
> > > > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > > > To: 'MyFaces Discussion'
> > > > > Subject: RE: Problem hardcoding commandLink action outcome
> > > > >
> > > > > How about using the f:attribute tag for name="action"?
> > > > >
> > > > > Shawn
> > > > >
> > > > > -Original Message-
> > > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > > > To: MyFaces Discussion
> > > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > > >
> > > > > You are correct.   It's trying to resolve it as a method binding.
> > > > >
> > > > > You need to either

Re: myFaces - servlet redirect.

2006-01-17 Thread Matthias Wessendorf
On 1/17/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> No !
>
> "/faces/*" is the mapping for FacesServlet
>
> "/faces"  is the mapping for NonFacesRequestServlet
>
> I don't like it, but this works with Jeff's example app.

ah! that is a hack :-)

Udo's email sounds *interesting*.
I'll look at it!

Regards,
Matthias


>
> Regards
>   Volker
>
> Matthias Wessendorf wrote:
> >>  /faces
> >
> >
> > /faces/*
> >
> > just like discussed here:
> > http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html
> >
> > (sent you the link already ;))
> >
> > -Matthias
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.
>


--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com


Re: myFaces - servlet redirect.

2006-01-17 Thread Volker Weber
No !

"/faces/*" is the mapping for FacesServlet

"/faces"  is the mapping for NonFacesRequestServlet

I don't like it, but this works with Jeff's example app.

Regards
  Volker

Matthias Wessendorf wrote:
>>  /faces
> 
> 
> /faces/*
> 
> just like discussed here:
> http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html
> 
> (sent you the link already ;))
> 
> -Matthias
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: myFaces - servlet redirect.

2006-01-17 Thread Udo Schnurpfeil
I've also tested it, and figured out, that it works also with the Sun 
Implementation

WITHOUT Volkers change.

So the Sun stuff works a little different. We should find the correct 
way (without hacking)

and put an full example somewhere...

Jeffrey Porter schrieb:


THANKS!

I defiantly owe you a beer or two!

So when you say you changed the servlet mapping for NonFacesRequestServlet.

Do you mean you changed...

  
 NonFacesRequestServlet
 /NonFacesRequestServlet
  

to

  
 NonFacesRequestServlet
 /faces
  


And then just used the URL...
http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1

Thanks
Jeff


-Original Message-
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 18:54

To: MyFaces Discussion
Subject: Re: myFaces - servlet redirect.

Hi Jeff,

i just played a bit with your app.

when i change the mapping for the NonFacesRequestServlet to "/faces"
than it works!

For a reason i currently don't know, (and also have no time to
investigate) the form action is prefixed with the servlet name. So using
the mapping "/faces" is a hack, but works.


BTW: the download url just points to a frameset, i need to extract the
correct download url from the html source.

Regards
 Volker

Jeffrey Porter wrote:
 


Firstly I'd like to thank Matthias & Volker for there help so far with this!

Ok, I've stripped out all the excess code and got a sample of problem together.

Download the ear (inc src)
http://www.porter.eu.com/jeff/servletRedirect.ear

URL to request once running...
http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1

The two class files are located in...
servredirect-support.jar 
 - \org\iarc\ebusiness\model\

 - BackingBean.class
servredirect.war 
 - \WEB-INF\lib 
 - servredirect-support-action.jar 
 - \org\iarc\ebusiness\reports 
 - NonFacesRequestServlet.class


The page should contain a textfield with ...
" Jeff Porter - request completed "
when the page is first requested.

When the "cancel" button is clicked, the text should change to "alfa".

The src is contained in a separate zip file in the route of the ear.

I'm hoping that someone else can also see my problem.
Thanks
Jeff

p.s. I've read the wiki page and have followed it. 
Part of me is hoping that this all turns out to me some stupid mistake on my part.

url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

Note:
jboss-4.0.3SP1
myfaces-1.1.1.zip




-Original Message-
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 14:38

To: Matthias Wessendorf
Cc: [EMAIL PROTECTED]; MyFaces Discussion
Subject: Re: myFaces - servlet redirect.

Hi,

i didn't implement this, i just have mentioned we have this in tobago :-).

@Jeff: i don't understand yout last post on [EMAIL PROTECTED]

you have a mapping of "/view/" for the servlet ant the url
 http://localhost:8080/ebusiness/faces/view/task?id=1
i wonder why "/view/task" is mapped to the Servlet .

try mapping "/view" and url
 http://localhost:8080/ebusiness/faces/view?id=1

If this not works, create a small example app we can work with.

regards
 Volker

Matthias Wessendorf wrote:

   


Hi Volker,

since you implemented the NonFacesRequestServlet, could you helpout?
I have not used the mentioned Servlet, just looked at the source to
talk about "how to redirect to a faces page" that part seems to work,
but his commandbutton has some issues.

Thanks,
Matthias

On 1/17/06, Jeff Porter <[EMAIL PROTECTED]> wrote:


 


Hi Matthias,

Sorry to email you directly, but I'm stuck and in need of help.

We talked on the myFaces mailing list, the subject was "How can I redirect
   


from a servlet to a JSF page".


 


I've still got the problem that after I redirect from the servlet to my JSF,
the commandButtons on the page no longer work.
(I get a 404 page displayed)

If I do not add the following to web.xml, then the commandButton's requests
are passed to my NonFacesRequestServlet.

With the following added, the commandButton's requests are not passed to
NonFacesRequestServlet, but they also do not invoke the action in the
commandButton link.

Web.xml code...

 
 Faces Servlet
 /faces/*
 


If you have any ideas, that would be great.
I'm going nuts over this problem.

Thanks for taking the time to read this.

Jeff

   



--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

 

   



 





Re: Problem hardcoding commandLink action outcome

2006-01-17 Thread Mike Kienenberger
Right, but it'll render the original request value as the parameter
value, it will then assign the old value ("college") to a new request
value (the parameter key) on the next page.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> That f:param thing just prints out the value at the end of the link so I
> don't think it works with that.
>
> I'm not sure what t:saveState does exactly so I'll take a look.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 1:21 PM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> In that case, either try the f:param approach or t:saveState the
> entire list of values, and reference the link by list index
>
> I'd still try the t:saveState first.
>
> I'm surprised someone else hasn't jumped in an recommended better
> solutions, though :)
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Yeah, sounds good but this code is in a loop and each few iterations has
> > different values for linkPage.
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 12:09 PM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > Hmm.   Since you put it that way, maybe not.
> > I'm not entirely certain.  Try it and see, but I think you might be right.
> >
> > In that case, I'd recommend using t:saveState on a copy of your
> > request variable.
> >
> > Create a YourBean instance variable to hold a copy of
> > "#{param.linkPage}", and add getter/setters for it.
> >
> > Then use  on #{YourBean.variable}
> >
> > You can modify the getter to directly read "#{param.linkPage}"
> > Add an alternate getter to read the actual value and use this one for your
> > link.
> > There's probably other (better) ways to do this, but none come to mind
> > at present.
> >
> > You could pass the value as an f:param if you're using a link and not a
> > button.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > So the bean's action method is evaluated during render time and not
> after
> > > they click on the link?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 11:51 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > It doesn't need to.   The value is resolved during render time.
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > Can you explain what this is actually doing?
> > > > How does it know how to resolve ("#{param.linkPage}") after the page
> is
> > > > rendered?
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, January 17, 2006 10:57 AM
> > > > To: MyFaces Discussion
> > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > >
> > > > Yes, you're trying to fight the technology.
> > > >
> > > > Just do this.
> > > >
> > > > public class YourBean
> > > > {
> > > >  public String getActionForLinkPage()
> > > >  {
> > > >  FacesContext facesContext =
> FacesContext.getCurrentInstance();
> > > >  String action =
> > > >
> > >
> >
> (String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > > > ).getValue(facesContext);
> > > >   return action;
> > > >  }
> > > > }
> > > >
> > > >  > > value="#{linkText}"/>
> > > >
> > > >
> > > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > > Damn, get an exception with f:attribute.  I thought that should
> work.
> > > > >
> > > > > To do  I would have to do a
> > choose/when
> > > > > condition checking the value of #{linkPage} which can have like 12
> > > > different
> > > > > values.  Seems like a messy solution to me.
> > > > >
> > > > > Shawn
> > > > >
> > > > > -Original Message-
> > > > > From: Garner, Shawn
> > > > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > > > To: 'MyFaces Discussion'
> > > > > Subject: RE: Problem hardcoding commandLink action outcome
> > > > >
> > > > > How about using the f:attribute tag for name="action"?
> > > > >
> > > > > Shawn
> > > > >
> > > > > -Original Message-
> > > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > > > To: MyFaces Discussion
> > > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > > >
> > > > > You are correct.   It's trying to resolve it as a method binding.
> > > > >
> > > > > You need to either use
> > > > >
> > > > >  > > action="#{yourBean.yourMethodReturningCollegeAsAString}"/>
> > > > >
> > > > > or
> > > > >
> > > > > 
> > > > >
> > > > > The attribute "action" takes only a string literal or a method
> binding
> > > > > that returns a String.  It does not take a value binding that
> > > 

Problem double click dataScroller

2006-01-17 Thread Miller, John





Has anyone seen issues double clicking dataScroller. I am
going to try and reproduce with the examples app, and am not sure if it’s
the dataScroller of buffer, but will follow up with the findings from the
examples app.

 

The behavior I have seen in my app is either an empty
response with a ClientAbortException

 

OR multiple
dataScrollers on 1 page (which I assume is a bug in the t:buffer, not
t:dataScroller)

 

At any rate
either of these things can happen in my app by double clicking the
dataScroller, any suggestions or workarounds would be appreciated





NOTICE:  This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle & Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message.  If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail.  Thank you.


Re: I need help in dataList.

2006-01-17 Thread Mike Kienenberger
Exactly.   We need dataList's renderer ported over to dataTable, and
then we can just dump the dataList component.

On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
> >If you can't make it render like you want, then create your own
> >renderer for t:dataTable, and submit it as a replacement for dataList
>
> I agree that t:dataTable is probably a better alternative.  The problems with 
> dataList actually have to do with the UIComponent rather than it's renderer.  
> In current SVN, it will decode properly (events from children are registered) 
> but it does not update the model.
>
> Dennis Byrne
>
>
>


RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
That f:param thing just prints out the value at the end of the link so I
don't think it works with that.

I'm not sure what t:saveState does exactly so I'll take a look.

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 1:21 PM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

In that case, either try the f:param approach or t:saveState the
entire list of values, and reference the link by list index

I'd still try the t:saveState first.

I'm surprised someone else hasn't jumped in an recommended better
solutions, though :)

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Yeah, sounds good but this code is in a loop and each few iterations has
> different values for linkPage.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 12:09 PM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> Hmm.   Since you put it that way, maybe not.
> I'm not entirely certain.  Try it and see, but I think you might be right.
>
> In that case, I'd recommend using t:saveState on a copy of your
> request variable.
>
> Create a YourBean instance variable to hold a copy of
> "#{param.linkPage}", and add getter/setters for it.
>
> Then use  on #{YourBean.variable}
>
> You can modify the getter to directly read "#{param.linkPage}"
> Add an alternate getter to read the actual value and use this one for your
> link.
> There's probably other (better) ways to do this, but none come to mind
> at present.
>
> You could pass the value as an f:param if you're using a link and not a
> button.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > So the bean's action method is evaluated during render time and not
after
> > they click on the link?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 11:51 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > It doesn't need to.   The value is resolved during render time.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > Can you explain what this is actually doing?
> > > How does it know how to resolve ("#{param.linkPage}") after the page
is
> > > rendered?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 10:57 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > Yes, you're trying to fight the technology.
> > >
> > > Just do this.
> > >
> > > public class YourBean
> > > {
> > >  public String getActionForLinkPage()
> > >  {
> > >  FacesContext facesContext =
FacesContext.getCurrentInstance();
> > >  String action =
> > >
> >
>
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > > ).getValue(facesContext);
> > >   return action;
> > >  }
> > > }
> > >
> > >  > value="#{linkText}"/>
> > >
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > Damn, get an exception with f:attribute.  I thought that should
work.
> > > >
> > > > To do  I would have to do a
> choose/when
> > > > condition checking the value of #{linkPage} which can have like 12
> > > different
> > > > values.  Seems like a messy solution to me.
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Garner, Shawn
> > > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > > To: 'MyFaces Discussion'
> > > > Subject: RE: Problem hardcoding commandLink action outcome
> > > >
> > > > How about using the f:attribute tag for name="action"?
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > > To: MyFaces Discussion
> > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > >
> > > > You are correct.   It's trying to resolve it as a method binding.
> > > >
> > > > You need to either use
> > > >
> > > >  > action="#{yourBean.yourMethodReturningCollegeAsAString}"/>
> > > >
> > > > or
> > > >
> > > > 
> > > >
> > > > The attribute "action" takes only a string literal or a method
binding
> > > > that returns a String.  It does not take a value binding that
> > > > evaluates to a String.  So if you need the action target to be
> > > > variable, you need to write java code to perform this logic.
> > > > Possibly you could use some kind of JSP EL expression instead of a
JSF
> > > > EL expression, but I wouldn't recommend this approach.
> > > >
> > > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > > I'm trying to hardcode the action to "college" which is in the
> > linkPage
> > > > > request scope variable.
> > > > >
> > > > > I think i

Re: myFaces - servlet redirect.

2006-01-17 Thread Volker Weber
No, the url must than be:

http://localhost:8080/servredirect/faces?id=1



Jeffrey Porter wrote:
> THANKS!
> 
> I defiantly owe you a beer or two!
> 
> So when you say you changed the servlet mapping for NonFacesRequestServlet.
> 
> Do you mean you changed...
> 
>
>   NonFacesRequestServlet
>   /NonFacesRequestServlet
>
> 
> to
> 
>
>   NonFacesRequestServlet
>   /faces
>
> 
> 
> And then just used the URL...
> http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1
> 
> Thanks
> Jeff
> 
> 
> -Original Message-
> From: Volker Weber [mailto:[EMAIL PROTECTED] 
> Sent: 17 January 2006 18:54
> To: MyFaces Discussion
> Subject: Re: myFaces - servlet redirect.
> 
> Hi Jeff,
> 
> i just played a bit with your app.
> 
> when i change the mapping for the NonFacesRequestServlet to "/faces"
> than it works!
> 
> For a reason i currently don't know, (and also have no time to
> investigate) the form action is prefixed with the servlet name. So using
> the mapping "/faces" is a hack, but works.
> 
> 
> BTW: the download url just points to a frameset, i need to extract the
> correct download url from the html source.
> 
> Regards
>   Volker
> 
> Jeffrey Porter wrote:
> 
>>Firstly I'd like to thank Matthias & Volker for there help so far with this!
>>
>>Ok, I've stripped out all the excess code and got a sample of problem 
>>together.
>>
>>Download the ear (inc src)
>>http://www.porter.eu.com/jeff/servletRedirect.ear
>>
>>URL to request once running...
>>http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1
>>
>>The two class files are located in...
>>servredirect-support.jar 
>>  - \org\iarc\ebusiness\model\
>>  - BackingBean.class
>>servredirect.war 
>>  - \WEB-INF\lib 
>>  - servredirect-support-action.jar 
>>  - \org\iarc\ebusiness\reports 
>>  - NonFacesRequestServlet.class
>>
>>The page should contain a textfield with ...
>>" Jeff Porter - request completed "
>>when the page is first requested.
>>
>>When the "cancel" button is clicked, the text should change to "alfa".
>>
>>The src is contained in a separate zip file in the route of the ear.
>>
>>I'm hoping that someone else can also see my problem.
>>Thanks
>>Jeff
>>
>>p.s. I've read the wiki page and have followed it. 
>>Part of me is hoping that this all turns out to me some stupid mistake on my 
>>part.
>>url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
>>
>>Note:
>>jboss-4.0.3SP1
>>myfaces-1.1.1.zip
>>
>>
>>
>>
>>-Original Message-
>>From: Volker Weber [mailto:[EMAIL PROTECTED] 
>>Sent: 17 January 2006 14:38
>>To: Matthias Wessendorf
>>Cc: [EMAIL PROTECTED]; MyFaces Discussion
>>Subject: Re: myFaces - servlet redirect.
>>
>>Hi,
>>
>>i didn't implement this, i just have mentioned we have this in tobago :-).
>>
>>@Jeff: i don't understand yout last post on [EMAIL PROTECTED]
>>
>>you have a mapping of "/view/" for the servlet ant the url
>>  http://localhost:8080/ebusiness/faces/view/task?id=1
>>i wonder why "/view/task" is mapped to the Servlet .
>>
>>try mapping "/view" and url
>>  http://localhost:8080/ebusiness/faces/view?id=1
>>
>>If this not works, create a small example app we can work with.
>>
>>regards
>>  Volker
>>
>>Matthias Wessendorf wrote:
>>
>>
>>>Hi Volker,
>>>
>>>since you implemented the NonFacesRequestServlet, could you helpout?
>>>I have not used the mentioned Servlet, just looked at the source to
>>>talk about "how to redirect to a faces page" that part seems to work,
>>>but his commandbutton has some issues.
>>>
>>>Thanks,
>>>Matthias
>>>
>>>On 1/17/06, Jeff Porter <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
Hi Matthias,

Sorry to email you directly, but I'm stuck and in need of help.

We talked on the myFaces mailing list, the subject was "How can I redirect
>>>
from a servlet to a JSF page".
>>>
>>>
I've still got the problem that after I redirect from the servlet to my JSF,
the commandButtons on the page no longer work.
(I get a 404 page displayed)

If I do not add the following to web.xml, then the commandButton's requests
are passed to my NonFacesRequestServlet.

With the following added, the commandButton's requests are not passed to
NonFacesRequestServlet, but they also do not invoke the action in the
commandButton link.

Web.xml code...

  
  Faces Servlet
  /faces/*
  


If you have any ideas, that would be great.
I'm going nuts over this problem.

Thanks for taking the time to read this.

Jeff

>>>
>>>
>>>
>>>--
>>>Matthias Wessendorf
>>>Zülpicher Wall 12, 239
>>>50674 Köln
>>>http://www.wessendorf.net
>>>mwessendorf-at-gmail-dot-com
>>>
>>
>>
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: myFaces - servlet redirect.

2006-01-17 Thread Matthias Wessendorf
>   /faces

/faces/*

just like discussed here:
http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html

(sent you the link already ;))

-Matthias


Re: Problem hardcoding commandLink action outcome

2006-01-17 Thread Mike Kienenberger
In that case, either try the f:param approach or t:saveState the
entire list of values, and reference the link by list index

I'd still try the t:saveState first.

I'm surprised someone else hasn't jumped in an recommended better
solutions, though :)

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Yeah, sounds good but this code is in a loop and each few iterations has
> different values for linkPage.
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 12:09 PM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> Hmm.   Since you put it that way, maybe not.
> I'm not entirely certain.  Try it and see, but I think you might be right.
>
> In that case, I'd recommend using t:saveState on a copy of your
> request variable.
>
> Create a YourBean instance variable to hold a copy of
> "#{param.linkPage}", and add getter/setters for it.
>
> Then use  on #{YourBean.variable}
>
> You can modify the getter to directly read "#{param.linkPage}"
> Add an alternate getter to read the actual value and use this one for your
> link.
> There's probably other (better) ways to do this, but none come to mind
> at present.
>
> You could pass the value as an f:param if you're using a link and not a
> button.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > So the bean's action method is evaluated during render time and not after
> > they click on the link?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 11:51 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > It doesn't need to.   The value is resolved during render time.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > Can you explain what this is actually doing?
> > > How does it know how to resolve ("#{param.linkPage}") after the page is
> > > rendered?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 10:57 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > Yes, you're trying to fight the technology.
> > >
> > > Just do this.
> > >
> > > public class YourBean
> > > {
> > >  public String getActionForLinkPage()
> > >  {
> > >  FacesContext facesContext = FacesContext.getCurrentInstance();
> > >  String action =
> > >
> >
> (String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > > ).getValue(facesContext);
> > >   return action;
> > >  }
> > > }
> > >
> > >  > value="#{linkText}"/>
> > >
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > Damn, get an exception with f:attribute.  I thought that should work.
> > > >
> > > > To do  I would have to do a
> choose/when
> > > > condition checking the value of #{linkPage} which can have like 12
> > > different
> > > > values.  Seems like a messy solution to me.
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Garner, Shawn
> > > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > > To: 'MyFaces Discussion'
> > > > Subject: RE: Problem hardcoding commandLink action outcome
> > > >
> > > > How about using the f:attribute tag for name="action"?
> > > >
> > > > Shawn
> > > >
> > > > -Original Message-
> > > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > > To: MyFaces Discussion
> > > > Subject: Re: Problem hardcoding commandLink action outcome
> > > >
> > > > You are correct.   It's trying to resolve it as a method binding.
> > > >
> > > > You need to either use
> > > >
> > > >  > action="#{yourBean.yourMethodReturningCollegeAsAString}"/>
> > > >
> > > > or
> > > >
> > > > 
> > > >
> > > > The attribute "action" takes only a string literal or a method binding
> > > > that returns a String.  It does not take a value binding that
> > > > evaluates to a String.  So if you need the action target to be
> > > > variable, you need to write java code to perform this logic.
> > > > Possibly you could use some kind of JSP EL expression instead of a JSF
> > > > EL expression, but I wouldn't recommend this approach.
> > > >
> > > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > > I'm trying to hardcode the action to "college" which is in the
> > linkPage
> > > > > request scope variable.
> > > > >
> > > > > I think it's trying to resolve it as a bean action or something
> > instead
> > > of
> > > > > an outcome.
> > > > >
> > > > > Can somebody help me with how to do this.
> > > > >
> > > > >
> > > > >
> > > > > linkPage: 
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > >
> > > > > This prints out:
> > > > >
> > > > >
> > > > >
> > > > > linkPage: college
> > > > >  Modify Your Answer
> 

Re: I need help in dataList.

2006-01-17 Thread Dennis Byrne
>If you can't make it render like you want, then create your own
>renderer for t:dataTable, and submit it as a replacement for dataList

I agree that t:dataTable is probably a better alternative.  The problems with 
dataList actually have to do with the UIComponent rather than it's renderer.  
In current SVN, it will decode properly (events from children are registered) 
but it does not update the model.

Dennis Byrne




RE: myFaces - servlet redirect.

2006-01-17 Thread Jeffrey Porter

THANKS!

I defiantly owe you a beer or two!

So when you say you changed the servlet mapping for NonFacesRequestServlet.

Do you mean you changed...

   
  NonFacesRequestServlet
  /NonFacesRequestServlet
   

to

   
  NonFacesRequestServlet
  /faces
   


And then just used the URL...
http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1

Thanks
Jeff


-Original Message-
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 18:54
To: MyFaces Discussion
Subject: Re: myFaces - servlet redirect.

Hi Jeff,

i just played a bit with your app.

when i change the mapping for the NonFacesRequestServlet to "/faces"
than it works!

For a reason i currently don't know, (and also have no time to
investigate) the form action is prefixed with the servlet name. So using
the mapping "/faces" is a hack, but works.


BTW: the download url just points to a frameset, i need to extract the
correct download url from the html source.

Regards
  Volker

Jeffrey Porter wrote:
> 
> Firstly I'd like to thank Matthias & Volker for there help so far with this!
> 
> Ok, I've stripped out all the excess code and got a sample of problem 
> together.
> 
> Download the ear (inc src)
> http://www.porter.eu.com/jeff/servletRedirect.ear
> 
> URL to request once running...
> http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1
> 
> The two class files are located in...
> servredirect-support.jar 
>   - \org\iarc\ebusiness\model\
>   - BackingBean.class
> servredirect.war 
>   - \WEB-INF\lib 
>   - servredirect-support-action.jar 
>   - \org\iarc\ebusiness\reports 
>   - NonFacesRequestServlet.class
> 
> The page should contain a textfield with ...
> " Jeff Porter - request completed "
> when the page is first requested.
> 
> When the "cancel" button is clicked, the text should change to "alfa".
> 
> The src is contained in a separate zip file in the route of the ear.
> 
> I'm hoping that someone else can also see my problem.
> Thanks
> Jeff
> 
> p.s. I've read the wiki page and have followed it. 
> Part of me is hoping that this all turns out to me some stupid mistake on my 
> part.
> url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> 
> Note:
> jboss-4.0.3SP1
> myfaces-1.1.1.zip
> 
> 
> 
> 
> -Original Message-
> From: Volker Weber [mailto:[EMAIL PROTECTED] 
> Sent: 17 January 2006 14:38
> To: Matthias Wessendorf
> Cc: [EMAIL PROTECTED]; MyFaces Discussion
> Subject: Re: myFaces - servlet redirect.
> 
> Hi,
> 
> i didn't implement this, i just have mentioned we have this in tobago :-).
> 
> @Jeff: i don't understand yout last post on [EMAIL PROTECTED]
> 
> you have a mapping of "/view/" for the servlet ant the url
>   http://localhost:8080/ebusiness/faces/view/task?id=1
> i wonder why "/view/task" is mapped to the Servlet .
> 
> try mapping "/view" and url
>   http://localhost:8080/ebusiness/faces/view?id=1
> 
> If this not works, create a small example app we can work with.
> 
> regards
>   Volker
> 
> Matthias Wessendorf wrote:
> 
>>Hi Volker,
>>
>>since you implemented the NonFacesRequestServlet, could you helpout?
>>I have not used the mentioned Servlet, just looked at the source to
>>talk about "how to redirect to a faces page" that part seems to work,
>>but his commandbutton has some issues.
>>
>>Thanks,
>>Matthias
>>
>>On 1/17/06, Jeff Porter <[EMAIL PROTECTED]> wrote:
>>
>>
>>>Hi Matthias,
>>>
>>>Sorry to email you directly, but I'm stuck and in need of help.
>>>
>>>We talked on the myFaces mailing list, the subject was "How can I redirect
>>
>>>from a servlet to a JSF page".
>>
>>>I've still got the problem that after I redirect from the servlet to my JSF,
>>>the commandButtons on the page no longer work.
>>>(I get a 404 page displayed)
>>>
>>>If I do not add the following to web.xml, then the commandButton's requests
>>>are passed to my NonFacesRequestServlet.
>>>
>>>With the following added, the commandButton's requests are not passed to
>>>NonFacesRequestServlet, but they also do not invoke the action in the
>>>commandButton link.
>>>
>>>Web.xml code...
>>>
>>>   
>>>   Faces Servlet
>>>   /faces/*
>>>   
>>>
>>>
>>>If you have any ideas, that would be great.
>>>I'm going nuts over this problem.
>>>
>>>Thanks for taking the time to read this.
>>>
>>>Jeff
>>>
>>
>>
>>
>>--
>>Matthias Wessendorf
>>Zülpicher Wall 12, 239
>>50674 Köln
>>http://www.wessendorf.net
>>mwessendorf-at-gmail-dot-com
>>
> 
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
Yeah, sounds good but this code is in a loop and each few iterations has
different values for linkPage.

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 12:09 PM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

Hmm.   Since you put it that way, maybe not.
I'm not entirely certain.  Try it and see, but I think you might be right.

In that case, I'd recommend using t:saveState on a copy of your
request variable.

Create a YourBean instance variable to hold a copy of
"#{param.linkPage}", and add getter/setters for it.

Then use  on #{YourBean.variable}

You can modify the getter to directly read "#{param.linkPage}"
Add an alternate getter to read the actual value and use this one for your
link.
There's probably other (better) ways to do this, but none come to mind
at present.

You could pass the value as an f:param if you're using a link and not a
button.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> So the bean's action method is evaluated during render time and not after
> they click on the link?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 11:51 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> It doesn't need to.   The value is resolved during render time.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Can you explain what this is actually doing?
> > How does it know how to resolve ("#{param.linkPage}") after the page is
> > rendered?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 10:57 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > Yes, you're trying to fight the technology.
> >
> > Just do this.
> >
> > public class YourBean
> > {
> >  public String getActionForLinkPage()
> >  {
> >  FacesContext facesContext = FacesContext.getCurrentInstance();
> >  String action =
> >
>
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > ).getValue(facesContext);
> >   return action;
> >  }
> > }
> >
> >  value="#{linkText}"/>
> >
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > Damn, get an exception with f:attribute.  I thought that should work.
> > >
> > > To do  I would have to do a
choose/when
> > > condition checking the value of #{linkPage} which can have like 12
> > different
> > > values.  Seems like a messy solution to me.
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Garner, Shawn
> > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > To: 'MyFaces Discussion'
> > > Subject: RE: Problem hardcoding commandLink action outcome
> > >
> > > How about using the f:attribute tag for name="action"?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > You are correct.   It's trying to resolve it as a method binding.
> > >
> > > You need to either use
> > >
> > >  action="#{yourBean.yourMethodReturningCollegeAsAString}"/>
> > >
> > > or
> > >
> > > 
> > >
> > > The attribute "action" takes only a string literal or a method binding
> > > that returns a String.  It does not take a value binding that
> > > evaluates to a String.  So if you need the action target to be
> > > variable, you need to write java code to perform this logic.
> > > Possibly you could use some kind of JSP EL expression instead of a JSF
> > > EL expression, but I wouldn't recommend this approach.
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > I'm trying to hardcode the action to "college" which is in the
> linkPage
> > > > request scope variable.
> > > >
> > > > I think it's trying to resolve it as a bean action or something
> instead
> > of
> > > > an outcome.
> > > >
> > > > Can somebody help me with how to do this.
> > > >
> > > >
> > > >
> > > > linkPage: 
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > > This prints out:
> > > >
> > > >
> > > >
> > > > linkPage: college
> > > >  Modify Your Answer
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I want it to resolve as if I put in  > > > value="Modify Your Answer"/>
> > > >
> > > >
> > > >
> > > > However when I click on the link I get: javax.faces.FacesException:
> > Error
> > > > calling action method of component with id _id1:_id15
> > > > at
> > > >
> > >
> >
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> > > erImpl.java:74)
> > > > at
> > > > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > > > at
> > > >
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoo

dataScroller total page number (large data set)

2006-01-17 Thread Emmanuel Jay
Hi all,We are trying the use the dataScroller for a large data set (I have read the threads about that). Our business logic is all there but we can't figure out how to set the total number of pages on the dataScroller without loading the whole model.
Basically we just want to specify on the dataScroller that the total number of pages is X, and we want the user to be able to see that (then our logic handles the partial loading of the model)Any help is much appreciated,
Emmanuel


Re: Confused by the Number of Method Calls

2006-01-17 Thread Dennis Byrne
The component is part of several processing phases.  Most of these phases 
process the component differentlt depending upon whether or not the component 
isRendered() .  So more than one phase is going to call this method.

Dennis Byrne

>-Original Message-
>From: Mike Duffy [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 17, 2006 01:13 PM
>To: users@myfaces.apache.org
>Subject: Confused by the Number of Method Calls
>
>I have a JSF page with the following tag:
>
>
>
>Whether or not the panel is rendered is determined by a call to a method in 
>the backing bean:
>rendered="#{home.hasIssuesAssigned}"
>
>When I trace the code path I see that this method is called four times.
>
>Can anyone provide a clear explanation as to why this is so?
>
>Thx.
>
>Mike
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>




Re: Find label of component

2006-01-17 Thread Mike Kienenberger
Right, I understood you meant customized (programmically created)
calls to addMessage.
But that's the same thing that the validators do internally -- call addMessage.

So if standard validation is working, perhaps the problem is that
you've specified the wrong clientid value?  (I find it easiest to bind
the input to the backing bean and call input.getClientId(facesContext)
to fetch the client id.

Either that, or maybe your labels aren't set up properlly?

This should be one of those "just works" situations.

The code for printing out the label is handled in the t:message(s)
component and should be independent of the message generation.

On 1/17/06, Veit Guna <[EMAIL PROTECTED]> wrote:
> Hi.
>
> No, I mean no std. Validation Error messages. These work fine.
> I mean custom Messages that you add with
> FacesContext.addMessage(ClientId, FacesMessage). This will be printed
> "as-is" with no field label attached to it (as {0} or similar).
>
> I've used some workaround that is used internally by myfaces. Iterate
> over all UIComponents on the page, find the OutputLabels, look at the
> "for" Attribute and get its Component. If it's the label of the given
> field, extract the label value - which is not very nice. All you get is
> the EL expression - you have to parse and I18N it by yourself :(.
>
> But works for me.
>
> regards,
> Veit
>
>
> Mike Kienenberger schrieb:
> > If you've set everything else up, it should be automatic:
> >
> > http://www.mail-archive.com/users%40myfaces.apache.org/msg15110.html
> >
> > On 1/16/06, Veit Guna <[EMAIL PROTECTED]> wrote:
> >> Hi.
> >>
> >> How can I get the label (outputLabel) for a specific component? I need
> >> this, to add the label text to a custom validation message. It seems
> >> that {0} isn't filled automatically with the label when I add a custom
> >> message with addMessage to the clientId (field).
> >>
> >> regards,
> >> Veit
> >>
> >
> >
>


Re: myFaces - servlet redirect.

2006-01-17 Thread Volker Weber
Hi Jeff,

i just played a bit with your app.

when i change the mapping for the NonFacesRequestServlet to "/faces"
than it works!

For a reason i currently don't know, (and also have no time to
investigate) the form action is prefixed with the servlet name. So using
the mapping "/faces" is a hack, but works.


BTW: the download url just points to a frameset, i need to extract the
correct download url from the html source.

Regards
  Volker

Jeffrey Porter wrote:
> 
> Firstly I'd like to thank Matthias & Volker for there help so far with this!
> 
> Ok, I've stripped out all the excess code and got a sample of problem 
> together.
> 
> Download the ear (inc src)
> http://www.porter.eu.com/jeff/servletRedirect.ear
> 
> URL to request once running...
> http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1
> 
> The two class files are located in...
> servredirect-support.jar 
>   - \org\iarc\ebusiness\model\
>   - BackingBean.class
> servredirect.war 
>   - \WEB-INF\lib 
>   - servredirect-support-action.jar 
>   - \org\iarc\ebusiness\reports 
>   - NonFacesRequestServlet.class
> 
> The page should contain a textfield with ...
> " Jeff Porter - request completed "
> when the page is first requested.
> 
> When the "cancel" button is clicked, the text should change to "alfa".
> 
> The src is contained in a separate zip file in the route of the ear.
> 
> I'm hoping that someone else can also see my problem.
> Thanks
> Jeff
> 
> p.s. I've read the wiki page and have followed it. 
> Part of me is hoping that this all turns out to me some stupid mistake on my 
> part.
> url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> 
> Note:
> jboss-4.0.3SP1
> myfaces-1.1.1.zip
> 
> 
> 
> 
> -Original Message-
> From: Volker Weber [mailto:[EMAIL PROTECTED] 
> Sent: 17 January 2006 14:38
> To: Matthias Wessendorf
> Cc: [EMAIL PROTECTED]; MyFaces Discussion
> Subject: Re: myFaces - servlet redirect.
> 
> Hi,
> 
> i didn't implement this, i just have mentioned we have this in tobago :-).
> 
> @Jeff: i don't understand yout last post on [EMAIL PROTECTED]
> 
> you have a mapping of "/view/" for the servlet ant the url
>   http://localhost:8080/ebusiness/faces/view/task?id=1
> i wonder why "/view/task" is mapped to the Servlet .
> 
> try mapping "/view" and url
>   http://localhost:8080/ebusiness/faces/view?id=1
> 
> If this not works, create a small example app we can work with.
> 
> regards
>   Volker
> 
> Matthias Wessendorf wrote:
> 
>>Hi Volker,
>>
>>since you implemented the NonFacesRequestServlet, could you helpout?
>>I have not used the mentioned Servlet, just looked at the source to
>>talk about "how to redirect to a faces page" that part seems to work,
>>but his commandbutton has some issues.
>>
>>Thanks,
>>Matthias
>>
>>On 1/17/06, Jeff Porter <[EMAIL PROTECTED]> wrote:
>>
>>
>>>Hi Matthias,
>>>
>>>Sorry to email you directly, but I'm stuck and in need of help.
>>>
>>>We talked on the myFaces mailing list, the subject was "How can I redirect
>>
>>>from a servlet to a JSF page".
>>
>>>I've still got the problem that after I redirect from the servlet to my JSF,
>>>the commandButtons on the page no longer work.
>>>(I get a 404 page displayed)
>>>
>>>If I do not add the following to web.xml, then the commandButton's requests
>>>are passed to my NonFacesRequestServlet.
>>>
>>>With the following added, the commandButton's requests are not passed to
>>>NonFacesRequestServlet, but they also do not invoke the action in the
>>>commandButton link.
>>>
>>>Web.xml code...
>>>
>>>   
>>>   Faces Servlet
>>>   /faces/*
>>>   
>>>
>>>
>>>If you have any ideas, that would be great.
>>>I'm going nuts over this problem.
>>>
>>>Thanks for taking the time to read this.
>>>
>>>Jeff
>>>
>>
>>
>>
>>--
>>Matthias Wessendorf
>>Zülpicher Wall 12, 239
>>50674 Köln
>>http://www.wessendorf.net
>>mwessendorf-at-gmail-dot-com
>>
> 
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: Find label of component

2006-01-17 Thread Veit Guna
Hi.

No, I mean no std. Validation Error messages. These work fine.
I mean custom Messages that you add with
FacesContext.addMessage(ClientId, FacesMessage). This will be printed
"as-is" with no field label attached to it (as {0} or similar).

I've used some workaround that is used internally by myfaces. Iterate
over all UIComponents on the page, find the OutputLabels, look at the
"for" Attribute and get its Component. If it's the label of the given
field, extract the label value - which is not very nice. All you get is
the EL expression - you have to parse and I18N it by yourself :(.

But works for me.

regards,
Veit


Mike Kienenberger schrieb:
> If you've set everything else up, it should be automatic:
> 
> http://www.mail-archive.com/users%40myfaces.apache.org/msg15110.html
> 
> On 1/16/06, Veit Guna <[EMAIL PROTECTED]> wrote:
>> Hi.
>>
>> How can I get the label (outputLabel) for a specific component? I need
>> this, to add the label text to a custom validation message. It seems
>> that {0} isn't filled automatically with the label when I add a custom
>> message with addMessage to the clientId (field).
>>
>> regards,
>> Veit
>>
> 
> 


Re: I need help in dataList.

2006-01-17 Thread Mike Kienenberger
Marco,

UIData components (like
t:dataList/h:dataTable/t:dataTable/t:newspaperTable/t:columns) use a
Flyweight pattern.

http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/FlyweightPattern.htm

What this means is that one component is used multiple times to
encode/render and decode/parse your inputs.  Each instance of this is
row-state data.

dataList seems to do the least well with handling the handling of all
of these row-state data pieces.   Probably dataList should be dumped,
and replaced with a custom t:dataTable renderer.

I'd recommend trying to switch over to using t:dataTable.   Once you
do that, you can try using
preserveRowStates/preserveDataModel/previousRowDataVar to make your
situation work.

If you can't make it render like you want, then create your own
renderer for t:dataTable, and submit it as a replacement for dataList
:)   It should just be a matter of deleting all of the generated table
tags for the simple layout.

On 1/17/06, Marco <[EMAIL PROTECTED]> wrote:
> Any suggestions please...
>
> All i need to do is to update the model from the generated UI components
> from the dataList.
>
> Thanks a lot
>


Confused by the Number of Method Calls

2006-01-17 Thread Mike Duffy
I have a JSF page with the following tag:



Whether or not the panel is rendered is determined by a call to a method in the 
backing bean:
rendered="#{home.hasIssuesAssigned}"

When I trace the code path I see that this method is called four times.

Can anyone provide a clear explanation as to why this is so?

Thx.

Mike

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Problem hardcoding commandLink action outcome

2006-01-17 Thread Mike Kienenberger
Hmm.   Since you put it that way, maybe not.
I'm not entirely certain.  Try it and see, but I think you might be right.

In that case, I'd recommend using t:saveState on a copy of your
request variable.

Create a YourBean instance variable to hold a copy of
"#{param.linkPage}", and add getter/setters for it.

Then use  on #{YourBean.variable}

You can modify the getter to directly read "#{param.linkPage}"
Add an alternate getter to read the actual value and use this one for your link.
There's probably other (better) ways to do this, but none come to mind
at present.

You could pass the value as an f:param if you're using a link and not a button.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> So the bean's action method is evaluated during render time and not after
> they click on the link?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 11:51 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> It doesn't need to.   The value is resolved during render time.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Can you explain what this is actually doing?
> > How does it know how to resolve ("#{param.linkPage}") after the page is
> > rendered?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 10:57 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > Yes, you're trying to fight the technology.
> >
> > Just do this.
> >
> > public class YourBean
> > {
> >  public String getActionForLinkPage()
> >  {
> >  FacesContext facesContext = FacesContext.getCurrentInstance();
> >  String action =
> >
> (String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> > ).getValue(facesContext);
> >   return action;
> >  }
> > }
> >
> >  value="#{linkText}"/>
> >
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > Damn, get an exception with f:attribute.  I thought that should work.
> > >
> > > To do  I would have to do a choose/when
> > > condition checking the value of #{linkPage} which can have like 12
> > different
> > > values.  Seems like a messy solution to me.
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Garner, Shawn
> > > Sent: Tuesday, January 17, 2006 10:29 AM
> > > To: 'MyFaces Discussion'
> > > Subject: RE: Problem hardcoding commandLink action outcome
> > >
> > > How about using the f:attribute tag for name="action"?
> > >
> > > Shawn
> > >
> > > -Original Message-
> > > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 17, 2006 10:21 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Problem hardcoding commandLink action outcome
> > >
> > > You are correct.   It's trying to resolve it as a method binding.
> > >
> > > You need to either use
> > >
> > >  action="#{yourBean.yourMethodReturningCollegeAsAString}"/>
> > >
> > > or
> > >
> > > 
> > >
> > > The attribute "action" takes only a string literal or a method binding
> > > that returns a String.  It does not take a value binding that
> > > evaluates to a String.  So if you need the action target to be
> > > variable, you need to write java code to perform this logic.
> > > Possibly you could use some kind of JSP EL expression instead of a JSF
> > > EL expression, but I wouldn't recommend this approach.
> > >
> > > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > I'm trying to hardcode the action to "college" which is in the
> linkPage
> > > > request scope variable.
> > > >
> > > > I think it's trying to resolve it as a bean action or something
> instead
> > of
> > > > an outcome.
> > > >
> > > > Can somebody help me with how to do this.
> > > >
> > > >
> > > >
> > > > linkPage: 
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > > This prints out:
> > > >
> > > >
> > > >
> > > > linkPage: college
> > > >  Modify Your Answer
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I want it to resolve as if I put in  > > > value="Modify Your Answer"/>
> > > >
> > > >
> > > >
> > > > However when I click on the link I get: javax.faces.FacesException:
> > Error
> > > > calling action method of component with id _id1:_id15
> > > > at
> > > >
> > >
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> > > erImpl.java:74)
> > > > at
> > > > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > > > at
> > > >
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> > > > at
> > > >
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> > > > at
> > > >
> > >
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
> > > ava:316)
> > > > at
> > > >
> > org.apache.myfaces.lifecycle.LifecycleI

jscookmenu problem?

2006-01-17 Thread Wei Chiang
It seems that the following problem has something to do with jscookmenu 
because the problem disappears once I remove jscookmenu related code from the 
jsp page.

I use jsf(myfaces 1.1.1), tiles and jscookmenu.

A null pointer exception appears on the very first entry to a tiled page after 
the application has loaded and the user has logged in.  The exception 
disappears when the user clicks the reload button of the browser.  The same 
exception also occurs after the user logs out of the session and re-enters.  

The exception trace is shown below.  Can anyone see what may cause this 
problem to occur and how to fix it?  The statement where the exception 
happens is
 contentTypeListString = (String) 
context.getExternalContext().getRequestHeaderMap().get("Accept");

Thanks in advance.
 
===
java.lang.NullPointerException
at 
org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:919)
at 
org.apache.myfaces.component.html.util.AddResource.writeWithFullHeader(AddResource.java:443)
at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:132)
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 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000
(ApplicationFilterChain.java:50)
at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at 
com.riihon.AAA.webapp.filter.ActionFilter.doFilter(ActionFilter.java:157)
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 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000
(ApplicationFilterChain.java:50)
at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at 
com.riihon.utils.webapp.filter.GZIPFilter.doFilter(GZIPFilter.java:62)
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 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain.access$000
(ApplicationFilterChain.java:50)
at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
at

Re: Find label of component

2006-01-17 Thread Mike Kienenberger
If you've set everything else up, it should be automatic:

http://www.mail-archive.com/users%40myfaces.apache.org/msg15110.html

On 1/16/06, Veit Guna <[EMAIL PROTECTED]> wrote:
> Hi.
>
> How can I get the label (outputLabel) for a specific component? I need
> this, to add the label text to a custom validation message. It seems
> that {0} isn't filled automatically with the label when I add a custom
> message with addMessage to the clientId (field).
>
> regards,
> Veit
>


Re: Error during model data update

2006-01-17 Thread Mike Kienenberger
It's possibly a conversion/converter error.

On 1/17/06, Arash Bijanzadeh <[EMAIL PROTECTED]> wrote:
> Hi
> After some changes, all I get from the application is this error message
> next to inputs, there is no exception no warnings, nothing just "Error
> during model data update"!
>  Could somebody guess what is wrong?
>
>
> --
> from debian manifesto:
> Debian Linux is a brand-new kind of Linux distribution.
>  Rather than being developed by one isolated individua
> l or group, as other distributions of Linux have been developed in the
>  past, Debian is being developed openly in the spirit of Linux and GNU.


RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
So the bean's action method is evaluated during render time and not after
they click on the link?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 11:51 AM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

It doesn't need to.   The value is resolved during render time.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Can you explain what this is actually doing?
> How does it know how to resolve ("#{param.linkPage}") after the page is
> rendered?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 10:57 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> Yes, you're trying to fight the technology.
>
> Just do this.
>
> public class YourBean
> {
>  public String getActionForLinkPage()
>  {
>  FacesContext facesContext = FacesContext.getCurrentInstance();
>  String action =
>
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> ).getValue(facesContext);
>   return action;
>  }
> }
>
> 
>
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Damn, get an exception with f:attribute.  I thought that should work.
> >
> > To do  I would have to do a choose/when
> > condition checking the value of #{linkPage} which can have like 12
> different
> > values.  Seems like a messy solution to me.
> >
> > Shawn
> >
> > -Original Message-
> > From: Garner, Shawn
> > Sent: Tuesday, January 17, 2006 10:29 AM
> > To: 'MyFaces Discussion'
> > Subject: RE: Problem hardcoding commandLink action outcome
> >
> > How about using the f:attribute tag for name="action"?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 10:21 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > You are correct.   It's trying to resolve it as a method binding.
> >
> > You need to either use
> >
> > 
> >
> > or
> >
> > 
> >
> > The attribute "action" takes only a string literal or a method binding
> > that returns a String.  It does not take a value binding that
> > evaluates to a String.  So if you need the action target to be
> > variable, you need to write java code to perform this logic.
> > Possibly you could use some kind of JSP EL expression instead of a JSF
> > EL expression, but I wouldn't recommend this approach.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > I'm trying to hardcode the action to "college" which is in the
linkPage
> > > request scope variable.
> > >
> > > I think it's trying to resolve it as a bean action or something
instead
> of
> > > an outcome.
> > >
> > > Can somebody help me with how to do this.
> > >
> > >
> > >
> > > linkPage: 
> > >
> > > 
> > >
> > >
> > >
> > > This prints out:
> > >
> > >
> > >
> > > linkPage: college
> > >  Modify Your Answer
> > >
> > >
> > >
> > >
> > >
> > > I want it to resolve as if I put in  > > value="Modify Your Answer"/>
> > >
> > >
> > >
> > > However when I click on the link I get: javax.faces.FacesException:
> Error
> > > calling action method of component with id _id1:_id15
> > > at
> > >
> >
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> > erImpl.java:74)
> > > at
> > > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > > at
> > >
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> > > at
> > >
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> > > at
> > >
> >
>
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
> > ava:316)
> > > at
> > >
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> > > at
> > > javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> > > at
> > > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> > > at
> > > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> > > at
> > >
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> > > at
> > >
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> > > at
> > > jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> > > at
> > >
> >
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
> > )
> > > at
> > > jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > > Caused by: javax.faces.el.ReferenceSyntaxException:
> > > Expression not a valid method binding: #{linkPage}
> > > at
> > >
> >
>
org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
> > ngImpl.java:186)
> > > at
> > >
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBin

Re: Shale and MyFaces

2006-01-17 Thread Craig McClanahan
On 1/17/06, Werner Punz <[EMAIL PROTECTED]> wrote:
Anyway, I checked out the extensions, and personally think they areheavens sent, but in my opinion there is huge room for more.What I really love about Seam and what is missing in the extensions isan easy dialog mechanism. Currently you have to define your own dialog
flow in a file. Seam does it rather basic, and easy to understand with a@begin and @end annotation marking the dialog flow borders, everythingin between is not interesting configurationwise.Is there anything similar planned for Shale?
Not currently -- and I doubt I would be in favor of it anyway :-).Annotations are absolutely fantastic for use cases where there is one and only one decision to make, and it would never be changed anyway because too much other stuff would break.  Annotated managed beans are a perfect example of that ... the managed bean name gets baked into every value binding _expression_ that references that bean, and the choice of scope can dramatically affect how and wehre you encode functionality.  So why risk having the configuration settings get out of sync because they are in a config file instead of the code?
Navigation is a different situation, however.  I believe that the developer creating the backing beans, and therefore implementing the action methods, should be focused on communicating *outcomes* through the return values of the methods.  They should describe "what happened" not "where to go next".  The navigational aspect of this is up to the person who is architecting the overall navigation of the application, gluing it all together.  Even if it is the same person doing both roles, you will improve the quality of your code by separating those concerns.  In particular, you will avoid the bad habit of mixing view tier concerns into the adapter to your model tier code.
If you don't like XML configuration formats for navigation rules (I don't have a problem with them -- indeed, the fact that Struts *had* config files originally is one of the things that made it popular :-), the answer is a graphical tool that lets you draw the state chart diagram, and then just uses a 
faces-config.xml file as its persistence format.  Sun Java Studio Creator does that for pure JSF navigation, for example.  You can edit the raw XML if you really want to, but few people bother.  Its much easier to drag a line from one page to another, and label it with an outcome, than it is to type in a navigation rule.
Also one room for improval might be an annotation or implicit navigationhandler which directs with an implicit return "nextPage"; onto a
nextPage.jsp/jsf if it can be located within a search path, unless it isoverridden by the config file. That would reduce the number ofnavigational entries tremendously.That kind of thing is a separate concept, and would be interesting to explore.  You can already define wildcards in the "from" expressions of a navigation rule, and there are rules about the order in which patterns are tested, but they don't provide the explicit control over the search path that you are describing here.  (But I'd still vote for encoding navigation in a config file, not in code :-).
Craig


Re: Problem hardcoding commandLink action outcome

2006-01-17 Thread Mike Kienenberger
It doesn't need to.   The value is resolved during render time.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Can you explain what this is actually doing?
> How does it know how to resolve ("#{param.linkPage}") after the page is
> rendered?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 10:57 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> Yes, you're trying to fight the technology.
>
> Just do this.
>
> public class YourBean
> {
>  public String getActionForLinkPage()
>  {
>  FacesContext facesContext = FacesContext.getCurrentInstance();
>  String action =
> (String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
> ).getValue(facesContext);
>   return action;
>  }
> }
>
> 
>
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > Damn, get an exception with f:attribute.  I thought that should work.
> >
> > To do  I would have to do a choose/when
> > condition checking the value of #{linkPage} which can have like 12
> different
> > values.  Seems like a messy solution to me.
> >
> > Shawn
> >
> > -Original Message-
> > From: Garner, Shawn
> > Sent: Tuesday, January 17, 2006 10:29 AM
> > To: 'MyFaces Discussion'
> > Subject: RE: Problem hardcoding commandLink action outcome
> >
> > How about using the f:attribute tag for name="action"?
> >
> > Shawn
> >
> > -Original Message-
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 17, 2006 10:21 AM
> > To: MyFaces Discussion
> > Subject: Re: Problem hardcoding commandLink action outcome
> >
> > You are correct.   It's trying to resolve it as a method binding.
> >
> > You need to either use
> >
> > 
> >
> > or
> >
> > 
> >
> > The attribute "action" takes only a string literal or a method binding
> > that returns a String.  It does not take a value binding that
> > evaluates to a String.  So if you need the action target to be
> > variable, you need to write java code to perform this logic.
> > Possibly you could use some kind of JSP EL expression instead of a JSF
> > EL expression, but I wouldn't recommend this approach.
> >
> > On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > I'm trying to hardcode the action to "college" which is in the linkPage
> > > request scope variable.
> > >
> > > I think it's trying to resolve it as a bean action or something instead
> of
> > > an outcome.
> > >
> > > Can somebody help me with how to do this.
> > >
> > >
> > >
> > > linkPage: 
> > >
> > > 
> > >
> > >
> > >
> > > This prints out:
> > >
> > >
> > >
> > > linkPage: college
> > >  Modify Your Answer
> > >
> > >
> > >
> > >
> > >
> > > I want it to resolve as if I put in  > > value="Modify Your Answer"/>
> > >
> > >
> > >
> > > However when I click on the link I get: javax.faces.FacesException:
> Error
> > > calling action method of component with id _id1:_id15
> > > at
> > >
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> > erImpl.java:74)
> > > at
> > > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > > at
> > > javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> > > at
> > > javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> > > at
> > >
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
> > ava:316)
> > > at
> > >
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> > > at
> > > javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> > > at
> > > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> > > at
> > > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> > > at
> > >
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> > > at
> > >
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> > > at
> > > jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> > > at
> > >
> >
> jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
> > )
> > > at
> > > jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > > Caused by: javax.faces.el.ReferenceSyntaxException:
> > > Expression not a valid method binding: #{linkPage}
> > > at
> > >
> >
> org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
> > ngImpl.java:186)
> > > at
> > >
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> > > at
> > >
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> > erImpl.java:63)
> > > ... 13 more
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Shawn D. Garner
> > >
> > > Software Developer
> > >
> > > CASD EAI I
> > >
> > > I

RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
Can you explain what this is actually doing?
How does it know how to resolve ("#{param.linkPage}") after the page is
rendered?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:57 AM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

Yes, you're trying to fight the technology.

Just do this.

public class YourBean
{
 public String getActionForLinkPage()
 {
 FacesContext facesContext = FacesContext.getCurrentInstance();
 String action =
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}"
).getValue(facesContext);
  return action;
 }
}




On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Damn, get an exception with f:attribute.  I thought that should work.
>
> To do  I would have to do a choose/when
> condition checking the value of #{linkPage} which can have like 12
different
> values.  Seems like a messy solution to me.
>
> Shawn
>
> -Original Message-
> From: Garner, Shawn
> Sent: Tuesday, January 17, 2006 10:29 AM
> To: 'MyFaces Discussion'
> Subject: RE: Problem hardcoding commandLink action outcome
>
> How about using the f:attribute tag for name="action"?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 10:21 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> You are correct.   It's trying to resolve it as a method binding.
>
> You need to either use
>
> 
>
> or
>
> 
>
> The attribute "action" takes only a string literal or a method binding
> that returns a String.  It does not take a value binding that
> evaluates to a String.  So if you need the action target to be
> variable, you need to write java code to perform this logic.
> Possibly you could use some kind of JSP EL expression instead of a JSF
> EL expression, but I wouldn't recommend this approach.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I'm trying to hardcode the action to "college" which is in the linkPage
> > request scope variable.
> >
> > I think it's trying to resolve it as a bean action or something instead
of
> > an outcome.
> >
> > Can somebody help me with how to do this.
> >
> >
> >
> > linkPage: 
> >
> > 
> >
> >
> >
> > This prints out:
> >
> >
> >
> > linkPage: college
> >  Modify Your Answer
> >
> >
> >
> >
> >
> > I want it to resolve as if I put in  > value="Modify Your Answer"/>
> >
> >
> >
> > However when I click on the link I get: javax.faces.FacesException:
Error
> > calling action method of component with id _id1:_id15
> > at
> >
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> erImpl.java:74)
> > at
> > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > at
> > javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> > at
> > javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> > at
> >
>
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
> ava:316)
> > at
> >
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> > at
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> > at
> > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> > at
> > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> > at
> >
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> > at
> >
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> > at
> > jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> > at
> >
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
> )
> > at
> > jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > Caused by: javax.faces.el.ReferenceSyntaxException:
> > Expression not a valid method binding: #{linkPage}
> > at
> >
>
org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
> ngImpl.java:186)
> > at
> >
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> > at
> >
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> erImpl.java:63)
> > ... 13 more
> >
> >
> >
> >
> >
> >
> >
> >
> > Shawn D. Garner
> >
> > Software Developer
> >
> > CASD EAI I
> >
> > Internet Development
> >
> >
> >
> > Email:  [EMAIL PROTECTED]
> >
> > Work:  (319) 665-7796
> >
> > Cell:  (319) 480-4409
> >
> >
> >
> > Pearson Government Solutions
> >
> > 2450 Oakdale Blvd
> >
> > Coralville, IA 52241
> >
> >
> >
> >
>

> >
> > This email may contain confidential
> > material. If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may mo

Re: Error during model data update

2006-01-17 Thread ::SammyRulez::
It happens to me wher I mistype the neame of the managed bean bound
tho the component

2006/1/17, Arash Bijanzadeh <[EMAIL PROTECTED]>:
> Hi
> After some changes, all I get from the application is this error message
> next to inputs, there is no exception no warnings, nothing just "Error
> during model data update"!
>  Could somebody guess what is wrong?
>
>
> --
> from debian manifesto:
> Debian Linux is a brand-new kind of Linux distribution.
>  Rather than being developed by one isolated individua
> l or group, as other distributions of Linux have been developed in the
>  past, Debian is being developed openly in the spirit of Linux and GNU.


--
::SammyRulez::
http://sammyprojectz.blogspot.com


RE: Tree2 editting from other JSF page

2006-01-17 Thread Gal Kirpichnikov








Thanks, but I’m talking about the opposite
event: change in “detailedFrame” effects the tree,

Do you have idea?

 

Best regards,

 









From: Saurabh
Rasinghaney [mailto:[EMAIL PROTECTED] 
Sent: ג 17 ינואר 2006 18:38
To: MyFaces Discussion
Subject: RE: Tree2 editting from
other JSF page
Importance: High



 

By setting the target to the second page u
can do that

Eg: see target in facet



   


   


 
   


 
   
   


 
   


   
     


   


   
h:commandLink>

   
h:panelGroup>

   
f:facet>

 

 



Best Regards,



Saurabh
Raisinghaney 











From: Gal Kirpichnikov
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
2:25 AM
To: 'users@myfaces.apache.org'
Subject: Tree2 editting from other
JSF page



 

Having two JSF pages on screen (the
controller and the second in iframe of the first),

How can I change Tree2 component content,
expansion, selection of node as a result of application activity at JSF page
located in the iframe?

 

Thanks,


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__





Re: I need help in dataList.

2006-01-17 Thread Marco
Any suggestions please...All i need to do is to update the model from the generated UI components from the dataList.Thanks a lot


welcome-file-list + facelets question

2006-01-17 Thread Kalman Hazins
Hi, group.

I am just starting out on the long Facelets/JSF path and have the following
(simple I hope) question.

I have a login.xhtml page in my .../webapps/myproj directory on Tomcat 5.5.
I have configured facelets to work for my application and the following
works just fine

http://localhost/myproj/login.jsf

I would like the following to work as well

http://localhost/myproj/

and go to my login.xhtml page.

However, when I add login.jsf to the welcome-file-list element in the
web.xml file - it does not work.

I have read that the workaround is to add a dummy/empty login.jsf file and
that seems to do it, but do not understand WHY the dummy file has to be in
there. 

It's almost like it's looking for an actual file (login.jsf) file to be
there, but why? The 2.4 servlet specification allows you to place a servlet
name in the welcome-file-list which is obviously just a mapping, so why
would login.jsf (mapping) be any worse?

Thanx, 
   - Kalman 



inputDate seems to be Caching a value

2006-01-17 Thread James Reynolds



Hello 
all,
 
I'm 
using the inputdate component in a panelgrid and it appears to be caching the 
first value to which it's assigned.  I searched the mail archives and found 
one note from Colin Chambers describing the same issue.  He indicated that 
it was due to including the component in a panelgrid, but I couldn't find any 
follow up messages.  Has anyone else dealt with this?
 
A possible contributing factor is the panelgrid that contains 
the component is not rendered by default.  If my user selects a record in a 
separate datatable (to edit the date of the record), the panelgrid is rendered 
with the next page reload and is designed to mimic a "pop up" using css 
positioning and styling.
 
Thanks 
for your time!


Re: Problem hardcoding commandLink action outcome

2006-01-17 Thread Mike Kienenberger
Yes, you're trying to fight the technology.

Just do this.

public class YourBean
{
 public String getActionForLinkPage()
 {
 FacesContext facesContext = FacesContext.getCurrentInstance();
 String action =
(String)facesContext.getApplication().createValueBinding("#{param.linkPage}").getValue(facesContext);
  return action;
 }
}




On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> Damn, get an exception with f:attribute.  I thought that should work.
>
> To do  I would have to do a choose/when
> condition checking the value of #{linkPage} which can have like 12 different
> values.  Seems like a messy solution to me.
>
> Shawn
>
> -Original Message-
> From: Garner, Shawn
> Sent: Tuesday, January 17, 2006 10:29 AM
> To: 'MyFaces Discussion'
> Subject: RE: Problem hardcoding commandLink action outcome
>
> How about using the f:attribute tag for name="action"?
>
> Shawn
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 17, 2006 10:21 AM
> To: MyFaces Discussion
> Subject: Re: Problem hardcoding commandLink action outcome
>
> You are correct.   It's trying to resolve it as a method binding.
>
> You need to either use
>
> 
>
> or
>
> 
>
> The attribute "action" takes only a string literal or a method binding
> that returns a String.  It does not take a value binding that
> evaluates to a String.  So if you need the action target to be
> variable, you need to write java code to perform this logic.
> Possibly you could use some kind of JSP EL expression instead of a JSF
> EL expression, but I wouldn't recommend this approach.
>
> On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I'm trying to hardcode the action to "college" which is in the linkPage
> > request scope variable.
> >
> > I think it's trying to resolve it as a bean action or something instead of
> > an outcome.
> >
> > Can somebody help me with how to do this.
> >
> >
> >
> > linkPage: 
> >
> > 
> >
> >
> >
> > This prints out:
> >
> >
> >
> > linkPage: college
> >  Modify Your Answer
> >
> >
> >
> >
> >
> > I want it to resolve as if I put in  > value="Modify Your Answer"/>
> >
> >
> >
> > However when I click on the link I get: javax.faces.FacesException: Error
> > calling action method of component with id _id1:_id15
> > at
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> erImpl.java:74)
> > at
> > javax.faces.component.UICommand.broadcast(UICommand.java:106)
> > at
> > javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> > at
> > javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> > at
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
> ava:316)
> > at
> > org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> > at
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> > at
> > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> > at
> > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> > at
> > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> > at
> > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> > at
> > jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> > at
> >
> jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
> )
> > at
> > jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > Caused by: javax.faces.el.ReferenceSyntaxException:
> > Expression not a valid method binding: #{linkPage}
> > at
> >
> org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
> ngImpl.java:186)
> > at
> > org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> > at
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
> erImpl.java:63)
> > ... 13 more
> >
> >
> >
> >
> >
> >
> >
> >
> > Shawn D. Garner
> >
> > Software Developer
> >
> > CASD EAI I
> >
> > Internet Development
> >
> >
> >
> > Email:  [EMAIL PROTECTED]
> >
> > Work:  (319) 665-7796
> >
> > Cell:  (319) 480-4409
> >
> >
> >
> > Pearson Government Solutions
> >
> > 2450 Oakdale Blvd
> >
> > Coralville, IA 52241
> >
> >
> >
> >
> 
> >
> > This email may contain confidential
> > material. If you were not an intended recipient,
> > Please notify the sender and delete all copies.
> > We may monitor email to and from our network.
> >
> >
> ***
> >
>
> 
>
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete a

RE: myFaces - servlet redirect.

2006-01-17 Thread Jeffrey Porter


Firstly I'd like to thank Matthias & Volker for there help so far with this!

Ok, I've stripped out all the excess code and got a sample of problem together.

Download the ear (inc src)
http://www.porter.eu.com/jeff/servletRedirect.ear

URL to request once running...
http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1

The two class files are located in...
servredirect-support.jar 
  - \org\iarc\ebusiness\model\
  - BackingBean.class
servredirect.war 
  - \WEB-INF\lib 
  - servredirect-support-action.jar 
  - \org\iarc\ebusiness\reports 
  - NonFacesRequestServlet.class

The page should contain a textfield with ...
" Jeff Porter - request completed "
when the page is first requested.

When the "cancel" button is clicked, the text should change to "alfa".

The src is contained in a separate zip file in the route of the ear.

I'm hoping that someone else can also see my problem.
Thanks
Jeff

p.s. I've read the wiki page and have followed it. 
Part of me is hoping that this all turns out to me some stupid mistake on my 
part.
url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

Note:
jboss-4.0.3SP1
myfaces-1.1.1.zip




-Original Message-
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 14:38
To: Matthias Wessendorf
Cc: [EMAIL PROTECTED]; MyFaces Discussion
Subject: Re: myFaces - servlet redirect.

Hi,

i didn't implement this, i just have mentioned we have this in tobago :-).

@Jeff: i don't understand yout last post on [EMAIL PROTECTED]

you have a mapping of "/view/" for the servlet ant the url
  http://localhost:8080/ebusiness/faces/view/task?id=1
i wonder why "/view/task" is mapped to the Servlet .

try mapping "/view" and url
  http://localhost:8080/ebusiness/faces/view?id=1

If this not works, create a small example app we can work with.

regards
  Volker

Matthias Wessendorf wrote:
> Hi Volker,
> 
> since you implemented the NonFacesRequestServlet, could you helpout?
> I have not used the mentioned Servlet, just looked at the source to
> talk about "how to redirect to a faces page" that part seems to work,
> but his commandbutton has some issues.
> 
> Thanks,
> Matthias
> 
> On 1/17/06, Jeff Porter <[EMAIL PROTECTED]> wrote:
> 
>>Hi Matthias,
>>
>>Sorry to email you directly, but I'm stuck and in need of help.
>>
>>We talked on the myFaces mailing list, the subject was "How can I redirect
>>from a servlet to a JSF page".
>>
>>I've still got the problem that after I redirect from the servlet to my JSF,
>>the commandButtons on the page no longer work.
>>(I get a 404 page displayed)
>>
>>If I do not add the following to web.xml, then the commandButton's requests
>>are passed to my NonFacesRequestServlet.
>>
>>With the following added, the commandButton's requests are not passed to
>>NonFacesRequestServlet, but they also do not invoke the action in the
>>commandButton link.
>>
>>Web.xml code...
>>
>>
>>Faces Servlet
>>/faces/*
>>
>>
>>
>>If you have any ideas, that would be great.
>>I'm going nuts over this problem.
>>
>>Thanks for taking the time to read this.
>>
>>Jeff
>>
> 
> 
> 
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
>>The attribute "action" takes only a string literal or a method binding
>>that returns a String.  It does not take a value binding that evaluates to
>>a String.  So if you need the action target to be variable, you need to
>>write java code to perform this logic.  
>>Possibly you could use some kind of JSP EL expression instead of a JSF EL
>>expression, but I wouldn't recommend this approach.

I don't believe I can do a method binding because they are just request
variables and once the page is rendered I have no idea which link goes with
which method outcome.

Shawn

-Original Message-
From: Garner, Shawn 
Sent: Tuesday, January 17, 2006 10:39 AM
To: 'MyFaces Discussion'
Subject: RE: Problem hardcoding commandLink action outcome

Damn, get an exception with f:attribute.  I thought that should work.

To do  I would have to do a choose/when
condition checking the value of #{linkPage} which can have like 12 different
values.  Seems like a messy solution to me.

Shawn

-Original Message-
From: Garner, Shawn 
Sent: Tuesday, January 17, 2006 10:29 AM
To: 'MyFaces Discussion'
Subject: RE: Problem hardcoding commandLink action outcome

How about using the f:attribute tag for name="action"?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:21 AM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

You are correct.   It's trying to resolve it as a method binding.

You need to either use



or



The attribute "action" takes only a string literal or a method binding
that returns a String.  It does not take a value binding that
evaluates to a String.  So if you need the action target to be
variable, you need to write java code to perform this logic.  
Possibly you could use some kind of JSP EL expression instead of a JSF
EL expression, but I wouldn't recommend this approach.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> I'm trying to hardcode the action to "college" which is in the linkPage
> request scope variable.
>
> I think it's trying to resolve it as a bean action or something instead of
> an outcome.
>
> Can somebody help me with how to do this.
>
>
>
> linkPage: 
>
> 
>
>
>
> This prints out:
>
>
>
> linkPage: college
>  Modify Your Answer
>
>
>
>
>
> I want it to resolve as if I put in  value="Modify Your Answer"/>
>
>
>
> However when I click on the link I get: javax.faces.FacesException: Error
> calling action method of component with id _id1:_id15
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:74)
> at
> javax.faces.component.UICommand.broadcast(UICommand.java:106)
> at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> at
>
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
ava:316)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> at
> jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> at
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> at
> jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> at
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
> at
> jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> Caused by: javax.faces.el.ReferenceSyntaxException:
> Expression not a valid method binding: #{linkPage}
> at
>
org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
ngImpl.java:186)
> at
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:63)
> ... 13 more
>
>
>
>
>
>
>
>
> Shawn D. Garner
>
> Software Developer
>
> CASD EAI I
>
> Internet Development
>
>
>
> Email:  [EMAIL PROTECTED]
>
> Work:  (319) 665-7796
>
> Cell:  (319) 480-4409
>
>
>
> Pearson Government Solutions
>
> 2450 Oakdale Blvd
>
> Coralville, IA 52241
>
>
>
>

>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
>
***
>



This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all cop

Re: How can I redirect from a servlet to a JSF page (that isbacked by a bean)?

2006-01-17 Thread Matthias Wessendorf
Jeff

can you update wiki page, if udos hint is successful ?

-Matthias

On 1/17/06, Udo Schnurpfeil <[EMAIL PROTECTED]> wrote:
> Hi Jeff,
>
> please try to map the NonFacesRequestServlet like:
>
>   
> NonFacesRequestServlet
> /NonFacesRequestServlet
>   
>
> And use the external URL:
>
> http://localhost:8080/ebusiness/faces/NonFacesRequestServlet?id=1
>
> By the way: Which ServletContainer? Version?
>
> Hope that helps
>
> Udo
>
> Jeffrey Porter wrote:
> > I'm still really stuck over this.
> >
> > Has anyone any ideas why I, when I click on a commandButton, get 404
> > Error & no call is made to the code behind the commandButton. This only
> > occurs on the page when it is displayed via the NonFacesRequestServlet
> > and not when I get to the page from another action.
> >
> > I have the following settings.
> >
> > The web.xml contains...
> > 
> > Faces Servlet
> > /faces/*
> > 
> > 
> > Faces Servlet
> > *.jsf
> > 
> >
> > The URL I request is..
> > http://localhost:8080/ebusiness/faces/view/task?id=1
> >
> > /view/ is mapped to my NonFacesRequestServlet
> >
> > The NonFacesRequestServlet sets the following..
> > UIViewRoot view = viewHandler.createView(facesContext, "/jsp/view.jsp");
> > navigationHandler.handleNavigation(facesContext, null,
> > "showExistingNCM");
> >
> > The faces-config.xml contains...
> >   
> > /jsp/view.jsp
> > 
> >   showExistingNCM
> >   /jsp/theNCM.jsp
> > 
> >   
> >
> > The commandButton that's clicked is...
> >  > action="#{managerDocument.abortSaveNCM }"/>
> >
> > The code called is (or not called in this case, since I never hit the
> > break point on it)...
> > public String abortSaveNCM() {
> > //insert any bus logic here
> > return ("abort");
> > }
> >
> > The faces-config.xml contains for the page that is displayed...
> >   
> > /jsp/theNCM.jsp
> > 
> >   abort
> >   /jsp/taskList.jsp
> >   
> > 
> >   
> >
> > The URL shown after I click the commandButton...
> > http://localhost:8080/ebusiness/view/task/jsp/theNCM.jsp
> > HTML:  HTTP Status 404 - /view/task/jsp/theNCM.jsp
> >
> > A screen shot of the page I get from the sevlet...
> > http://www.porter.eu.com/jeff/1a.JPG
> >
> > A screen shot of the page I get when I click the "cancel" commandButton
> > http://www.porter.eu.com/jeff/2a.JPG
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Simon Kitching [mailto:[EMAIL PROTECTED]
> > Sent: 13 January 2006 06:01
> > To: MyFaces Discussion
> > Subject: Re: How can I redirect from a servlet to a JSF page (that
> > isbacked by a bean)?
> >
> > Hi Mike,
> >
> > I've gathered the info posted so far and created this page:
> >   http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> >
> > Anyone who actually gets this working, please review the wiki page and
> > make any necessary corrections/enhancements!
> >
> > Cheers,
> >
> > Simon
> >
> > Corrections or enhancements
> > On Wed, 2006-01-11 at 13:50 -0500, Mike Kienenberger wrote:
> >
> >> If nothing else, this question has been asked enough times that
> >> someone who's using it or has ideas how to solve it should write up a
> >> wiki page on the topic :)
> >>
> >> On 1/11/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> >>
> >>> Hi Jeffrey,
> >>>
> >>> you are in the situation to serve a Non-Faces Request to a Faces
> >>> Response as described in the jsf 1.1 spec in section 2.1.1.
> >>>
> >>> Take a look at tobagos NonFacesRequestServlet [1] how this situation
> >>> could handled.
> >>>
> >>> I don't know if there is somthing like this in tomahawk, could be a
> >>> candidate for commons.jar.
> >>>
> >>> Regards,
> >>>   Volker
> >>>
> >>> [1]:
> >>>
> >>>
> > http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src
> > /main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java
> > ?view=markup
> >
> >>> Jeffrey Porter wrote:
> >>>
>  Hello all.
> 
> 
> 
>  I have the situation where I want to send a URL out in an email
> 
> > for a
> >
>  person to click on, so that they can then see a page in my system.
> 
> 
> 
>  Normally I'd have a backing servlet that takes the parameters in
> 
> > and
> >
>  redirects to the page I want the user to view.
> 
>  But since I'm using myfaces, I don't know how to redirect to a JSF
> 
> > page.
> >
> 
>  In this case I'm at a complete loss to where I should start.
> 
> 
> 
>  Can some one please prod me in the correct direction.
> 
> 
> 
>  Thanks
> 
>  Jeff
> 
> 
> 
> 
> >>> --
> >>> Don't answer to From: address!
> >>> Mail to this account are droped if not recieved via mailinglist.
> >>> To contact me direct create the mail address by
> >>> concatenating my forename to my senders domain.
> >>>
> >>>
> >
> >
> >
>
>


--
Matthias

RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
Damn, get an exception with f:attribute.  I thought that should work.

To do  I would have to do a choose/when
condition checking the value of #{linkPage} which can have like 12 different
values.  Seems like a messy solution to me.

Shawn

-Original Message-
From: Garner, Shawn 
Sent: Tuesday, January 17, 2006 10:29 AM
To: 'MyFaces Discussion'
Subject: RE: Problem hardcoding commandLink action outcome

How about using the f:attribute tag for name="action"?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:21 AM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

You are correct.   It's trying to resolve it as a method binding.

You need to either use



or



The attribute "action" takes only a string literal or a method binding
that returns a String.  It does not take a value binding that
evaluates to a String.  So if you need the action target to be
variable, you need to write java code to perform this logic.  
Possibly you could use some kind of JSP EL expression instead of a JSF
EL expression, but I wouldn't recommend this approach.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> I'm trying to hardcode the action to "college" which is in the linkPage
> request scope variable.
>
> I think it's trying to resolve it as a bean action or something instead of
> an outcome.
>
> Can somebody help me with how to do this.
>
>
>
> linkPage: 
>
> 
>
>
>
> This prints out:
>
>
>
> linkPage: college
>  Modify Your Answer
>
>
>
>
>
> I want it to resolve as if I put in  value="Modify Your Answer"/>
>
>
>
> However when I click on the link I get: javax.faces.FacesException: Error
> calling action method of component with id _id1:_id15
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:74)
> at
> javax.faces.component.UICommand.broadcast(UICommand.java:106)
> at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> at
>
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
ava:316)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> at
> jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> at
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> at
> jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> at
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
> at
> jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> Caused by: javax.faces.el.ReferenceSyntaxException:
> Expression not a valid method binding: #{linkPage}
> at
>
org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
ngImpl.java:186)
> at
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:63)
> ... 13 more
>
>
>
>
>
>
>
>
> Shawn D. Garner
>
> Software Developer
>
> CASD EAI I
>
> Internet Development
>
>
>
> Email:  [EMAIL PROTECTED]
>
> Work:  (319) 665-7796
>
> Cell:  (319) 480-4409
>
>
>
> Pearson Government Solutions
>
> 2450 Oakdale Blvd
>
> Coralville, IA 52241
>
>
>
>

>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
>
***
>



This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: Tree2 editting from other JSF page

2006-01-17 Thread Saurabh Rasinghaney








By setting the target to the second page u
can do that

Eg: see target in facet



    

    

      

          

      

          

    

    h:commandLink>

    h:panelGroup>

   
f:facet>

 

 



Best Regards,



Saurabh
Raisinghaney 











From: Gal Kirpichnikov
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006
2:25 AM
To: 'users@myfaces.apache.org'
Subject: Tree2 editting from other
JSF page



 

Having two JSF pages on screen (the
controller and the second in iframe of the first),

How can I change Tree2 component content,
expansion, selection of node as a result of application activity at JSF page
located in the iframe?

 

Thanks,


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__








Re: How can I redirect from a servlet to a JSF page (that isbacked by a bean)?

2006-01-17 Thread Matthias Wessendorf
url:
http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls

On 1/17/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> Jeff
>
> can you update wiki page, if udos hint is successful ?
>
> -Matthias
>
> On 1/17/06, Udo Schnurpfeil <[EMAIL PROTECTED]> wrote:
> > Hi Jeff,
> >
> > please try to map the NonFacesRequestServlet like:
> >
> >   
> > NonFacesRequestServlet
> > /NonFacesRequestServlet
> >   
> >
> > And use the external URL:
> >
> > http://localhost:8080/ebusiness/faces/NonFacesRequestServlet?id=1
> >
> > By the way: Which ServletContainer? Version?
> >
> > Hope that helps
> >
> > Udo
> >
> > Jeffrey Porter wrote:
> > > I'm still really stuck over this.
> > >
> > > Has anyone any ideas why I, when I click on a commandButton, get 404
> > > Error & no call is made to the code behind the commandButton. This only
> > > occurs on the page when it is displayed via the NonFacesRequestServlet
> > > and not when I get to the page from another action.
> > >
> > > I have the following settings.
> > >
> > > The web.xml contains...
> > > 
> > > Faces Servlet
> > > /faces/*
> > > 
> > > 
> > > Faces Servlet
> > > *.jsf
> > > 
> > >
> > > The URL I request is..
> > > http://localhost:8080/ebusiness/faces/view/task?id=1
> > >
> > > /view/ is mapped to my NonFacesRequestServlet
> > >
> > > The NonFacesRequestServlet sets the following..
> > > UIViewRoot view = viewHandler.createView(facesContext, "/jsp/view.jsp");
> > > navigationHandler.handleNavigation(facesContext, null,
> > > "showExistingNCM");
> > >
> > > The faces-config.xml contains...
> > >   
> > > /jsp/view.jsp
> > > 
> > >   showExistingNCM
> > >   /jsp/theNCM.jsp
> > > 
> > >   
> > >
> > > The commandButton that's clicked is...
> > >  > > action="#{managerDocument.abortSaveNCM }"/>
> > >
> > > The code called is (or not called in this case, since I never hit the
> > > break point on it)...
> > > public String abortSaveNCM() {
> > > //insert any bus logic here
> > > return ("abort");
> > > }
> > >
> > > The faces-config.xml contains for the page that is displayed...
> > >   
> > > /jsp/theNCM.jsp
> > > 
> > >   abort
> > >   /jsp/taskList.jsp
> > >   
> > > 
> > >   
> > >
> > > The URL shown after I click the commandButton...
> > > http://localhost:8080/ebusiness/view/task/jsp/theNCM.jsp
> > > HTML:  HTTP Status 404 - /view/task/jsp/theNCM.jsp
> > >
> > > A screen shot of the page I get from the sevlet...
> > > http://www.porter.eu.com/jeff/1a.JPG
> > >
> > > A screen shot of the page I get when I click the "cancel" commandButton
> > > http://www.porter.eu.com/jeff/2a.JPG
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: Simon Kitching [mailto:[EMAIL PROTECTED]
> > > Sent: 13 January 2006 06:01
> > > To: MyFaces Discussion
> > > Subject: Re: How can I redirect from a servlet to a JSF page (that
> > > isbacked by a bean)?
> > >
> > > Hi Mike,
> > >
> > > I've gathered the info posted so far and created this page:
> > >   http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> > >
> > > Anyone who actually gets this working, please review the wiki page and
> > > make any necessary corrections/enhancements!
> > >
> > > Cheers,
> > >
> > > Simon
> > >
> > > Corrections or enhancements
> > > On Wed, 2006-01-11 at 13:50 -0500, Mike Kienenberger wrote:
> > >
> > >> If nothing else, this question has been asked enough times that
> > >> someone who's using it or has ideas how to solve it should write up a
> > >> wiki page on the topic :)
> > >>
> > >> On 1/11/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> > >>
> > >>> Hi Jeffrey,
> > >>>
> > >>> you are in the situation to serve a Non-Faces Request to a Faces
> > >>> Response as described in the jsf 1.1 spec in section 2.1.1.
> > >>>
> > >>> Take a look at tobagos NonFacesRequestServlet [1] how this situation
> > >>> could handled.
> > >>>
> > >>> I don't know if there is somthing like this in tomahawk, could be a
> > >>> candidate for commons.jar.
> > >>>
> > >>> Regards,
> > >>>   Volker
> > >>>
> > >>> [1]:
> > >>>
> > >>>
> > > http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src
> > > /main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java
> > > ?view=markup
> > >
> > >>> Jeffrey Porter wrote:
> > >>>
> >  Hello all.
> > 
> > 
> > 
> >  I have the situation where I want to send a URL out in an email
> > 
> > > for a
> > >
> >  person to click on, so that they can then see a page in my system.
> > 
> > 
> > 
> >  Normally I'd have a backing servlet that takes the parameters in
> > 
> > > and
> > >
> >  redirects to the page I want the user to view.
> > 
> >  But since I'm using myfaces, I don't know how to redirect to a JSF
> > 
> > > page.
> > >
> >

RE: Problem hardcoding commandLink action outcome

2006-01-17 Thread Garner, Shawn
How about using the f:attribute tag for name="action"?

Shawn

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:21 AM
To: MyFaces Discussion
Subject: Re: Problem hardcoding commandLink action outcome

You are correct.   It's trying to resolve it as a method binding.

You need to either use



or



The attribute "action" takes only a string literal or a method binding
that returns a String.  It does not take a value binding that
evaluates to a String.  So if you need the action target to be
variable, you need to write java code to perform this logic.  
Possibly you could use some kind of JSP EL expression instead of a JSF
EL expression, but I wouldn't recommend this approach.

On 1/17/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> I'm trying to hardcode the action to "college" which is in the linkPage
> request scope variable.
>
> I think it's trying to resolve it as a bean action or something instead of
> an outcome.
>
> Can somebody help me with how to do this.
>
>
>
> linkPage: 
>
> 
>
>
>
> This prints out:
>
>
>
> linkPage: college
>  Modify Your Answer
>
>
>
>
>
> I want it to resolve as if I put in  value="Modify Your Answer"/>
>
>
>
> However when I click on the link I get: javax.faces.FacesException: Error
> calling action method of component with id _id1:_id15
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:74)
> at
> javax.faces.component.UICommand.broadcast(UICommand.java:106)
> at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
> at
>
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
ava:316)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
> at
> jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
> jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> at
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> at
> jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> at
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
> at
> jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> Caused by: javax.faces.el.ReferenceSyntaxException:
> Expression not a valid method binding: #{linkPage}
> at
>
org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindi
ngImpl.java:186)
> at
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
> at
>
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:63)
> ... 13 more
>
>
>
>
>
>
>
>
> Shawn D. Garner
>
> Software Developer
>
> CASD EAI I
>
> Internet Development
>
>
>
> Email:  [EMAIL PROTECTED]
>
> Work:  (319) 665-7796
>
> Cell:  (319) 480-4409
>
>
>
> Pearson Government Solutions
>
> 2450 Oakdale Blvd
>
> Coralville, IA 52241
>
>
>
>

>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
>
***
>

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



  1   2   >