Re: GAE problem

2010-12-13 Thread ken keller
primefaces & richfaces teams seem to dismiss myfaces. Maybe the myfaces team
should get closer to these teams. Latest icefaces might not work w/ myfaces:
http://jira.icefaces.org/browse/ICE-5858

Being a Java programmer isn't easy
:)

On Mon, Dec 13, 2010 at 12:23 PM, Werner Punz  wrote:

> Ok outside of the crypto stuff I do not see any problem.
> Try to remove the encryption alltogether for a quick testing and see if it
> resolves your problem (also turn it off).
> The problem also could be primefaces related.
> With the exact crypto config i also had problems (I think the documentation
> is not entirely correct on our page there, I noticed that after a while I
> got viewexpiredexceptions with that one)
>
> What myfaces version do you use. I did my testing on 2.0.2 but my testcase
> was rather basic:
>
> http://2.testinck4040.appspot.com/welcome.jsf
>
>
> Werner
>
>
>
> Am 13.12.10 20:28, schrieb Nikolay Rychkov:
>
>> 
>> http://java.sun.com/xml/ns/javaee";
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>> 
>> Sight www.agost.ru
>> 
>> 
>> I really need www.agost.ru
>> 
>>
>> 
>>
>>
>>  
>> org.apache.myfaces.config.annotation.LifecycleProvider
>>
>>
>>  
>> org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
>> 
>>
>> 
>> org.apache.myfaces.SECRET
>> x
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> javax.faces.DEFAULT_SUFFIX
>> .xhtml
>> 
>>
>> 
>> Faces Servlet
>> *.do
>> 
>> 
>> 
>> Faces Servlet
>> javax.faces.webapp.FacesServlet
>> 
>> 
>> 10
>> 
>> 
>> index.do
>> 
>> 
>> 
>> 
>> 
>> javax.faces.PROJECT_STAGE
>> Production
>> 
>> 
>> primefaces.skin
>> none
>> 
>> 
>>
>>
>>  
>> javax.faces.application.ViewExpiredException
>> /sessionerror.xhtml
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>>
>>  
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 2010/12/13 Werner Punz
>>
>>  Hi can you show me your web.xml,
>>> I have done some extensive jsf testing on the weekend with gae and did
>>> not
>>> have this error.
>>>
>>>
>>> Werner
>>>
>>> Am 13.12.10 18:45, schrieb Nikolay Rychkov:
>>>
>>>  I have this error in every page on GAE:
>>>
 What is it?



 java.lang.IllegalStateException: STREAM
 at org.mortbay.jetty.Response.getWriter(Response.java:616)
 at


 javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:115)
 at


 org.apache.myfaces.context.servlet.ServletExternalContextImpl.getResponseOutputWriter(ServletExternalContextImpl.java:184)
 at


 org.apache.myfaces.shared_impl.view.JspViewDeclarationLanguageBase.renderView(JspViewDeclarationLanguageBase.java:154)
 at


 org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263)
 at


 org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85)
 at

 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
 at


 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
 at


 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
 at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
 at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
 at


 com.google.appengine.tools.development.StaticFileUtils.serveWelcomeFileAsForward(StaticFileUtils.java:80)
 at


 com.google.appengine.tools.development.LocalResourceFileServlet.maybeServeWelcomeFile(LocalResourceFileServlet.java:247)
 at


 com.google.appengine.tools.development.LocalResourceFileServlet.doGet(LocalResourceFileServlet.java:120)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
 at


 org.mortbay.jett

Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-12-11 Thread ken keller
I've verified that if you set the cipher & MAC keys in web.xml, myfaces
works reliably on gae w/ client-side state saving. I've appended sample
settings.

http://wiki.apache.org/myfaces/Secure_Your_Application
"encryption* must be used in production* environments and disable it could
only be valid on testing/development environments."
myfaces doesn't enforce this.

Even if password field value isn't stored in ViewState or ViewState is
encrypted, password is sent in cleartext and thus vulnerable to MITM. That's
easier than rev-engr ViewState. If a black hat has physical access to the
browser, stealing a cookie is easier than rev-engr ViewState. Am I
over-simplifying?



org.apache.myfaces.USE_ENCRYPTION
true
 





org.apache.myfaces.ALGORITHM

DES




org.apache.myfaces.ALGORITHM.PARAMETERS
ECB/PKCS5Padding



org.apache.myfaces.SECRET
01234567890==




org.apache.myfaces.MAC_ALGORITHM
HmacSHA1
 


org.apache.myfaces.MAC_SECRET
01234567890=


  
javax.faces.STATE_SAVING_METHOD
client
  


Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-12-10 Thread ken keller
I disabled encryption (see below), redeployed, & everything works--seemingly
it is much more responsive too.

What's the purpose of the encryption? When I View Source, ViewState field
looks like a long, hex string. Even if it can be reverse-engineered, the
values are likely to be the same ones sent in the http request. These are
vulnerable to MITM attack unless one uses https. Is JSF smart enough to
exclude a password field's value from ViewState?


org.apache.myfaces.USE_ENCRYPTION
false
 

  
javax.faces.STATE_SAVING_METHOD
client
  

On Fri, Dec 10, 2010 at 2:40 PM, Leonardo Uribe  wrote:

> Hi
>
> One last note, to make client side state saving work try configure this two
> params:
>
>
> org.apache.myfaces.SECRET
>
> org.apache.myfaces.MAC_SECRET
>
>
> It is probably that the ViewExpiredException is thrown because you are not
> configured the mac secret.
>
> See http://wiki.apache.org/myfaces/Secure_Your_Application  for details.
>
> regards,
>
> Leonardo Uribe
>
> 2010/12/10 Leonardo Uribe 
>
> > Hi
> >
> > Is there any way to see the app log? In theory, when a
> ViewExpiredException
> > is thrown, the reason is logged there, but there is not on the browser.
> >
> >
> > I readed your previous emails related to this one and one possibility
> that
> > comes to my mind is we are storing something on session without implement
> > Serializable interface. If that so, as soon as GAE serialize the session
> to
> > disk, that code causes an Exception and when MyFaces try to restore the
> > state it just has dissapeared (servlet session is invalid, so a new one
> is
> > created and our value in javax.faces.ViewState request parameter is not
> > found, so a ViewExpiredException is thrown).
> >
> > The solution if that is the case is check all lines that do something
> with
> > session map and check if it is possible to serialize to disk.
> >
> > regards,
> >
> > Leonardo
> >
>


Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-12-10 Thread ken keller
Today all these URLs are behaving w/ client-side saving. Unfortunately
following deployment or when I haven't used the app in awhile:
* ViewExpiredException is thrown after an action. This is surprising since
I'm using client-side saving.
* Typing into hello-prime.jsf's Autocomplete tab's Autocomplete box hangs.

http://notcourage-jsf.appspot.com/hello-prime.jsf
 <http://notcourage-jsf.appspot.com/hello-prime.jsf>
http://notcourage-jsf.appspot.com/bank-balance.jsf<http://notcourage-jsf.appspot.com/hello-prime.jsf>
<http://notcourage-jsf.appspot.com/hello-prime.jsf>
http://notcourage-jsf.appspot.com/bank-balance-ajax.jsf<http://notcourage-jsf.appspot.com/hello-prime.jsf>
 <http://notcourage-jsf.appspot.com/hello-prime.jsf>valid id's are id00{1-3}
password is "secret"
http://notcourage-jsf.appspot.com/context.jsf<http://notcourage-jsf.appspot.com/hello-prime.jsf>
--
shows stateSavingMethod

The reason I'm interested in appengine is it is the only auto-scaling cloud
I'm aware of. When you use AWS or the like, you must choose/manage the
OS/webServer/appServer, scale, & deal w/ data center failover. Having
managed 1,000 servers, I certainly appreciate the simplification which
clouds offer but language-specific clouds like Heroku & appengine yield
greater simplification.

On Fri, Dec 10, 2010 at 1:20 AM, Werner Punz  wrote:

> Ok last mail regarding it, I just posted a single message regarding all
> this in the developers list, maybe one of the server side developers has an
> idea if we can fix this on our side, but the behavior especially since it
> seems to be come less and less over time, looks eerily like a cache issue on
> GAEs side to me, from time to time the memcache delivers null instead of the
> object although the object still is not evicted.
>
>
> Werner
>
>
> Am 10.12.10 10:03, schrieb Werner Punz:
>
>  Ok correction, there is something fishy going on, it still is related to
>> GAE though, I now set a keepalive and still occasionally from time to
>> time I am getting a no view can be found exception, the funny stuff is
>> that once I am triggering the ajax part a few seconds later it is picked
>> up again.
>>
>> I assume now following, that from time to time the cloud simply does not
>> deliver session objects (probably a serialisation deserialisation
>> issue), but a few seconds later it is picking them up again if they are
>> still available.
>>
>> You can reproduce the issue on my testing site:
>> http://testinck4040.appspot.com/
>>
>> I will investigate more, but I guess the fault here lies really on GAE
>> and there is not too much we can do, unless someone has posted an api
>> hook or workaround which bypasses the problem. It should not be the key
>> in the session because the keepalive definitely triggers the
>> session.getAttribute functions, also it happens only occasionally and
>> shortly after it is picked up again, which means the session object then
>> is not null anymore but is there again.
>>
>>
>>
>>
>> Werner
>>
>>
>> Am 10.12.10 09:31, schrieb Werner Punz:
>>
>>> Hi Ken, sorry this will become a long answer, first of all:
>>>
>>> http://people.apache.org/~werpu/testinck4040.tar.gz
>>>
>>> is the download of the small sample project I did, you need maven to run
>>> it you can deploy directly once you have setup the project by using
>>> mvn gae:deploy and you can run locally by using mvn gae:run.
>>> You also can run it into a standard jetty stack by running it via mvn
>>> jetty:run-exploded or mvn jetty:run.
>>>
>>> Secondly, I assume half of your problems are mapping problems, I ran
>>> into with the auto assumption GAE does on the mapping if you dont
>>> explicitely redirect and use an ending pattern instead of a path pattern.
>>>
>>> Secondly to the session, I dont think my assumption is invalid in fact
>>> it just fills a little bit of the gaps the link leave in the
>>> understanding.
>>>
>>> I will give you a more detailed example why I recommended to use some
>>> kind of keepalive to keep the session alive.
>>>
>>> The session is not a classical session as app servers do it, but more
>>> along the lines of a mem cache with a rather short timeout period, and
>>> supportive to it some serialisation into the cloud. As it seems either
>>> due to a bug or something else, the session bombs out after 5 minutes if
>>> nothing is done, and that is reproducable, ignoring the timeout settings
>>> in the web.xml. I am not sure if this is a proble

Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-12-09 Thread ken keller
Werner,

Thx for digging into this.

I think you're incorrect about how httpsession works. Here is an article
about gae httpsession:
http://blog.comtaste.com/2010/07/managing_session_data_in_gae_a.html
If you want a consistent behaviour you need to invoke setAttribute again
after having modified the Person object in the session.
http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
Because App Engine stores session data in the *datastore and memcache*, all
values stored in the session must implement the java.io.Serializable
interface.

<http://blog.comtaste.com/2010/07/managing_session_data_in_gae_a.html>Thing
is I was getting the ViewExpiredException even w/ client-side state saving.
(I consider this option a great scalability advantage of jsf. wicket seems
to use httpsession.)

Here's a thoughtful article which recommends jsf2 over wicket because of the
active component libs:
http://www.theserverside.com/discussions/thread.tss?thread_id=60755
 <http://www.theserverside.com/discussions/thread.tss?thread_id=60755>Any
opinions on the pros/cons of richfaces, primefaces, icefaces?

On Thu, Dec 9, 2010 at 5:01 PM, Werner Punz  wrote:

> Ok I have to add something, another issue is, that google does not adhere
> to the session-timeout values given in the web.xml.
> Currently google handles the session in the app cache, and drops it after a
> view minutes no matter what, not sure what you can do about that. One
> strategy might be to apply some kind of keepalive to the browser which sends
> a keepalive ajax request periodically to keep the cache alive. Also if
> possible shift the state saving to client as recommended earlier. The
> keepalive itself might work out well to keep the app alive but probably both
> measures have to be added.
>
> What I assume now is that you ran into a bunch of those issues, literally
> all on the App Engine side. If you are aware of them you can work around
> them if not oh well.
>
> Werner
>
>
> Am 10.12.10 01:43, schrieb Werner Punz:
>
>  Ok took me a while to get everything together, since this is my first
>> App Engine Project project. But I think i have all info now.
>> First it seems that both server and client side state handling now works
>> (since 1.4 that is).
>> Secondly, MyFaces works fine with GAE so does the MyFaces Ajax.
>>
>> here is my example: http://testinck4040.appspot.com/
>>
>> The MyFaces configuration also is correct, you have to add:
>>
>> 
>> 
>>
>>
>> org.apache.myfaces.config.annotation.LifecycleProvider
>>
>>
>>
>> org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
>>
>> 
>>
>> 
>> 
>> org.apache.myfaces.SECRET
>> NzY1NDMyMTA=
>> 
>>
>> To the web.xml and also have to enable sesssion handling on the gae side
>> as documented.
>>
>> One thing I noticed however is following, if you do not redirect
>> properly to a real jsf page, you will get the ViewExpired exception you
>> were getting hence I set my welcome file to index.jsp
>> with a simple redirect on the jsp side so that the jsf page is properly
>> accessed:
>>
>> 
>> <% response.sendRedirect("welcome.jsf"); %>
>> 
>>
>> The funny stuff was that in the original setting GAE was picking up my
>> original index.xhtml file but was doing some jsf remapping for one
>> reason or the other (otherwise I would not have gotten the view expired
>> exception), but for some strange kind of reason everything went haywire
>> because it was not passing down the proper view but triggering jsf due
>> to some internal path mapping probably. Either way doing the proper jsf
>> ending mapping and redirection resolves that.
>>
>> Either way outside of that the view id must point properly to the jsf
>> page I could not find any pitfall, I will give you a download link to
>> the full project tomorrow, so that you can try it out yourself. As you
>> can see in the demo ajax works fine.
>>
>> Here are quick links to my web.xml files and appenging-web.xml files,
>> the full download will follow tomorrow.
>>
>> http://www.pastie.org/1363893
>>
>> http://www.pastie.org/1363894
>>
>>
>>
>>
>>
>> Werner
>>
>>
>>
>>
>> Am 10.12.10 00:50, schrieb Werner Punz:
>>
>>> Ok Ken, so far I have setup my testproject and on ajax I run into the
>>> same crypto exception you have been reporting (state saving method
>>> server) this points towards a bug in the non ajax part somewhere, I will
>>> keep you informed about my results.
>>>

Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-12-09 Thread ken keller
I use both of those.

I've started playing with wicket because Gavin recommends JSF or wicket
(both have component models). wicket doesn't appear to have active component
libs like richfaces, primefaces, icefaces.

I'm surprised that richfaces adores mojarra. The lists
http://java.net/projects/javaserverfaces/lists have low activity. Issues
http://java.net/jira/browse/JAVASERVERFACES/ seem to get resolved.

I can only dream of a framework:
* Reliable on gae.
* Several component lib developers conforming to an open look&feel std like
nimbus.
* Client-side validation first to avoid server load & bandwidth for silly
mistakes like not filling in a required field.

On Thu, Dec 9, 2010 at 12:21 PM, Werner Punz  wrote:

> Ok here is a hint which could indicate to the root of your problems,
> apparently GAE has session handling disabled you have to enable it.
>
>
> true
> in the appeninge-web.xml file to enable it.
>
>
> Also some links indicate you should only use state saving client.
>
>
>
> Werner
>
>
> Am 09.12.10 20:42, schrieb Werner Punz:
>
>> Ok this could be an indication to the viewstate issue you are facing
>>
>> http://java.dzone.com/news/jsf2-configuration-google-app
>>
>> seems like GAE has its fair share of problems or the underlying
>> container of GAE that is.
>>
>> All I can say, if it is just for learning purposes try to program your
>> program locally and when it comes to deployment find a hoster which
>> allows you to use your own app stack. As for the ajax stuff, I will give
>> GAE a try as I said, but I assume your problem is related to the other
>> session scope problems GAE seems to have.
>>
>>
>> Werner
>>
>>
>> Am 09.12.10 20:38, schrieb Werner Punz:
>>
>>> Ok I cannot really help with the viewExpired Problem except for that it
>>> indicates a problem on GAEs side.
>>>
>>> But I ran your Ajax problem quickly through and for me it works locally
>>> here. So I assume you run into a GAE related issue here as well.
>>>
>>> I will do a GAE testsetup as my scarce time permits to run this through,
>>> but I really assume a gae related problem or a deployment related
>>> problem here.
>>> It would be interesting to know if in the ajax case the browser throws
>>> any errors. What does the browser error console say?
>>>
>>>
>>> Werner
>>>
>>> Am 24.10.10 20:14, schrieb ken keller:
>>>
>>>> Yesterday evening I noticed java.io.InvalidObjectException stopped being
>>>> thrown. I don't know why but I hope it is related to switching from
>>>> eclipse
>>>> to intellij& not due to gae. (I also learned facelets is built into
>>>> jsf2 so
>>>> a separate jar isn't required.)
>>>>
>>>> I have two new problems which only happen on live gae--not dev gae:
>>>>
>>>> 1) I'm testing jsf-basics.zip on
>>>> http://www.coreservlets.com/JSF-Tutorial/jsf2/code/.
>>>> * open bank-lookup.jsf
>>>> * fill in form
>>>> * click [Show Current Balance]
>>>> * the correct jsf page is displayed
>>>> * click chrome's Back
>>>> * javax.faces.application.ViewExpiredException is thrown (whether using
>>>> client or server state saving):
>>>>
>>>> org.apache.myfaces.shared_impl.util.StateUtils reconstruct: View State
>>>> cannot be reconstructed
>>>> javax.faces.FacesException:
>>>> javax.faces.application.ViewExpiredException
>>>> at
>>>> org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:
>>>> 490)
>>>> at
>>>>
>>>> org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:
>>>>
>>>>
>>>> 378)
>>>> at
>>>>
>>>> org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(Ht
>>>>
>>>>
>>>> mlResponseStateManager.java:
>>>> 213)
>>>> at
>>>>
>>>> org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlRes
>>>>
>>>>
>>>> ponseStateManager.java:
>>>> 160)
>>>> at
>>>>
>>>> org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.res
>>>>
>>>>
>>>> toreView
>>>>
>>>> (DefaultFaceletsStateManagementStrategy.java:
>>>> 140)
>>>> at
>>&

Re: myfaces popularity

2010-12-06 Thread ken keller
Which of the 3 styles is best? Am I missing one?

On Mon, Dec 6, 2010 at 1:45 AM, Mark Struberg  wrote:

> Yes, I feared that :(
>
> They have a relative defensive update policy.
>
> On one side this is good for existing apps which doesn't have much
> compatibility problems. But they e.g. still ship a very old jetty container
> which contains lots of known bugs.
>
> LieGrue,
> strub
>
> --- On Mon, 12/6/10, Nikolay Rychkov  wrote:
>
> > From: Nikolay Rychkov 
> > Subject: Re: myfaces popularity
> > To: "MyFaces Discussion" 
> > Date: Monday, December 6, 2010, 2:02 AM
> > GAE does not support it.
> >
> http://code.google.com/p/googleappengine/issues/detail?id=3431&q=el&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component%20Language
> >
> > 2010/12/5 Mark Struberg 
> >
> > > > thingy.edit('X')
> > >
> > > So what you need is UEL-2.2. No idea if gae supports
> > this. Maybe there is
> > > an option to get it (comes with Servlet-3.0). In this
> > case you would not
> > > need to do anything - but if gae doesn't support it,
> > then you would most
> > > likely be doomed :/
> > >
> > > Maybe try asking Ali Ok, he did a few things on GAE in
> > the past.
> > >
> > > LieGrue,
> > > strub
> > >
> > > --- On Sun, 12/5/10, ken keller 
> > wrote:
> > >
> > > > From: ken keller 
> > > > Subject: Re: myfaces popularity
> > > > To: "MyFaces Discussion" 
> > > > Date: Sunday, December 5, 2010, 8:14 PM
> > > > I don't see how CDI helps. I tried 3
> > > > ways:
> > > >
> > > > X denotes the value of the ID.
> > > >
> > > > 1) Pass id as view param using h:link:
> > > > 
> > > >> value="X"/>
> > > > 
> > > > and bind to pseudo-property named idToLoad in
> > > > edit_thing.xhtml:
> > > > 
> > > >> > > value="#{thingy.idToLoad}"/>
> > > > 
> > > >
> > > > 2) Pass id as view param using h:commandLink:
> > > >  > action="#{thingy.edit}">
> > > >> value="X"/>
> > > > 
> > > > Action method named edit() gets id from
> > FacesContext:
> > > >
> > >
> >
> FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id");
> > > > If that isn't inconvenient, what is? :)
> > > >
> > > > 3) Pass id as EL param using h:commandLink:
> > > >  > > > action="#{thingy.edit('X')}">
> > > > 
> > > > myfaces complains:
> > > > java.lang.NoSuchMethodError:
> > > >
> > >
> >
> javax.el.ELResolver.invoke(Ljavax/el/ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
> > > > My action method is:
> > > > public String edit(String id) { ... }
> > > > My web.xml has:
> > > > 
> > > >
> > > >
> > com.sun.faces.expressionFactory
> > > >
> > > >
> > com.sun.el.ExpressionFactoryImpl
> > > > 
> > > > 
> > > >
> > > >
> > org.apache.myfaces.EXPRESSION_FACTORY
> > > >
> > > >
> > com.sun.el.ExpressionFactoryImpl
> > > > 
> > > > My pom.xml has:
> > > > 
> > > >
> > javax.el
> > > >
> > el-api
> > > >2.2
> > > >
> > > >
> > > >
> > org.glassfish.web
> > > >
> > el-impl
> > > >2.2
> > > >
> > > > I don't know why this fails.
> > > >
> > > > What's the best style?
> > > >
> > > > On Sat, Dec 4, 2010 at 8:31 AM, Gerhard 
> > > > wrote:
> > > >
> > > > > short addition:
> > > > >
> > > > > with myfaces codi also beans annotated with
> > > > @ManagedBean are normal cdi
> > > > > beans (automatically).
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF powerhouse -
> > > > > JSF Consulting

Re: myfaces popularity

2010-12-05 Thread ken keller
I don't see how CDI helps. I tried 3 ways:

X denotes the value of the ID.

1) Pass id as view param using h:link:

  

and bind to pseudo-property named idToLoad in edit_thing.xhtml:

  


2) Pass id as view param using h:commandLink:

  

Action method named edit() gets id from FacesContext:
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id");
If that isn't inconvenient, what is? :)

3) Pass id as EL param using h:commandLink:


myfaces complains:
java.lang.NoSuchMethodError:
javax.el.ELResolver.invoke(Ljavax/el/ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
My action method is:
public String edit(String id) { ... }
My web.xml has:

  com.sun.faces.expressionFactory
  com.sun.el.ExpressionFactoryImpl


  org.apache.myfaces.EXPRESSION_FACTORY
  com.sun.el.ExpressionFactoryImpl

My pom.xml has:

   javax.el
   el-api
   2.2
   
   
   org.glassfish.web
   el-impl
   2.2
   
I don't know why this fails.

What's the best style?

On Sat, Dec 4, 2010 at 8:31 AM, Gerhard  wrote:

> short addition:
>
> with myfaces codi also beans annotated with @ManagedBean are normal cdi
> beans (automatically).
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/12/4 Mark Struberg 
>
> > +1, with CDI you would be able to simply @Inject all your needed
> > parameters. In general I'd say that one should generally use CDI instead
> of
> > the JSF @ManagedBean mechanism.
> >
> > LieGrue,
> > strub
> >
> > --- On Sat, 12/4/10, Jakob Korherr  wrote:
> >
> > > From: Jakob Korherr 
> > > Subject: Re: myfaces popularity
> > > To: "MyFaces Discussion" 
> > > Date: Saturday, December 4, 2010, 3:45 PM
> > > ... or, you know, use CDI for your
> > > managed beans ;)
> > >
> > > Regards,
> > > Jakob
> > >
> > > 2010/12/4 Jakob Korherr :
> > > > Hi,
> > > >
> > > > Sorry, I just skimmed your mail, but for your last
> > > point
> > > >
> > > >>Finally, what's the correct way to implement an
> > > editor action? The managed
> > > >>bean needs to be initialized before rendering it.
> > > So instead of invoking the
> > > >>no-arg constructor, I want something like:
> > > >>Foo(id)
> > > >>to be invoked.
> > > >
> > > > you can use a no-arg constructor and an init method
> > > annotated with
> > > > @PostConstruct. So something like this:
> > > >
> > > > @PostConstruct
> > > > private void init() { // init bean here }
> > > >
> > > > However, you can't pass arguments neither to the
> > > constructor nor to
> > > > this init method. You need to 1) get everything you
> > > need from the
> > > > context or 2) set them from outside via setter
> > > methods.
> > > >
> > > > Hope this helps.
> > > >
> > > > Regards,
> > > > Jakob
> > > >
> > > > 2010/12/3 ken keller :
> > > >> My last startup is www.collectrium.com. We use
> > > AWS/py/django. This was my
> > > >> first non-Java app & I missed strong typing.
> > > django's template language is
> > > >> verbose & there's not much of a widget
> > > library. So I'm back to Java. AWS
> > > >> avoids setting up a data center (as co-founder of
> > > IGN.com, I don't miss
> > > >> managing 1,000 servers) but one still must manage
> > > the OS & scaling. So I'm
> > > >> trying appengine.
> > > >>
> > > >> jsf's attractions are validation, data binding,
> > > component model, component
> > > >> libraries. Too bad it doesn't include safe HTML
> > > (ala
> > > >>
> > http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html#SafeHtml)
> > > but
> > > >> it should be easy to wrap text components. Too bad
> > > the component library
> > > >> suppliers won't rally around a standard
> > > look-&-feel so one could mix
> > > >> components.
> > > >>
> > > >> I like gwt but it doesn't have validation &
> > > SEO is too hard. I might use gwt
&

Re: myfaces popularity

2010-12-03 Thread ken keller
My last startup is www.collectrium.com. We use AWS/py/django. This was my
first non-Java app & I missed strong typing. django's template language is
verbose & there's not much of a widget library. So I'm back to Java. AWS
avoids setting up a data center (as co-founder of IGN.com, I don't miss
managing 1,000 servers) but one still must manage the OS & scaling. So I'm
trying appengine.

jsf's attractions are validation, data binding, component model, component
libraries. Too bad it doesn't include safe HTML (ala
http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html#SafeHtml) but
it should be easy to wrap text components. Too bad the component library
suppliers won't rally around a standard look-&-feel so one could mix
components.

I like gwt but it doesn't have validation & SEO is too hard. I might use gwt
for editing functionality & a lightweight template language (which doesn't
require a servlet container or mock for unit testing) like freemarker for
browsing functionality.

My current startup is a productivity tool in the cloud. I hope it will be
used by many people of course.

I'm using IntelliJ & appengine 1.3.8. From my web.xml:

 
com.sun.faces.expressionFactory
com.sun.el.ExpressionFactoryImpl
  

>From my pom.xml:

  
   javax.el
   el-api
   2.2
   
   
   org.glassfish.web
   el-impl
   2.2
   

When I run the app, the log shows:

INFO: Either you haven't specified the ExpressionFactory implementation, or
an error occured while instantiating the implementation you've specified.
However, attempting to load a known implementation.

The app works but I wonder why.

I'm having trouble w/ primefaces too.

Finally, what's the correct way to implement an editor action? The managed
bean needs to be initialized before rendering it. So instead of invoking the
no-arg constructor, I want something like:
Foo(id)
to be invoked.

On Fri, Dec 3, 2010 at 10:04 AM, Kito Mann  wrote:

> Hello Ken,
>
> There's definitely a lot of activity in the JSF world, and it's used by a
> lot of large and smaller companies (see http://www.javaserverfaces.org/for
> a list of sites built using JSF or Seam under "JSF in Production"). There
> are a variety of industries, but it's quite popular in Finance (banks and
> insurance companies).
>
> In terms of active development, you can just look at the recent releases to
> see there's a lot going on.
>
> It's worthwhile also to point out that Trinidad is used as the foundation
> for all of the Oracle Fusion applications.
>
> What sort of application is your startup intending to build with MyFaces?
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> twitter:
> jsfcentral
> +1 203-404-4848 x3
>
> Public JSF 2 Training this January in London: JSF 2 Update for JSF 1.x
> users
> (http://bit.ly/jsf2updatecourse<
> http://skillsmatter.com/course/java-jee/jsf2-update-course>)
> and JSF 2 in Action
> (http://bit.ly/jsf2course<
> http://skillsmatter.com/course/java-jee/jsf-and-ajax>
> )
>
>
>
> On Fri, Dec 3, 2010 at 11:44 AM, ken keller  wrote:
>
> > 1Mpvs/day on which URL?
> >
> > mojarra looks inactive:
> > http://java.net/projects/mojarra/lists
> > The richfaces team seems to prefer mojarra to myfaces. Given the effort
> > being devoted to richfaces & primefaces atop jsf2, one would think there
> > would be much more activity on the lists.
> >
> > I've posted twice over the last few months about
> > javax.faces.application.ViewExpiredException
> > thrown on appengine but nobody replied.
> >
> > http://www.irian.at/myfaces_support
> > costs $5,300/yr for basic support--$10,600 for advanced. My startup can't
> > afford this--especially without trying it first--perhaps a paygo option.
> >
> > I haven't studied the source code to see if there's unit testing.
> >
> > As compelling as jsf2 is, I'm scared to bet my startup on it.
> >
> > On Fri, Dec 3, 2010 at 12:30 AM, Mark Struberg 
> wrote:
> >
> > > Hi!
> > >
> > > With the pretty fast development on the spec side (last year 2.0, last
> > week
> > > 2.1 - thanks Ed!) there is a very steady development going on atm. Also
> > > remember that EE6 is pretty fresh.
> > >
> > > So while there is currently not that much traffic on the us...@mf list
> > > there is pretty much of it on the dev list atm.
> > > The move from JSF-1.x to JSF-2.x is still to be done for most

Re: myfaces popularity

2010-12-03 Thread ken keller
1Mpvs/day on which URL?

mojarra looks inactive:
http://java.net/projects/mojarra/lists
The richfaces team seems to prefer mojarra to myfaces. Given the effort
being devoted to richfaces & primefaces atop jsf2, one would think there
would be much more activity on the lists.

I've posted twice over the last few months about
javax.faces.application.ViewExpiredException
thrown on appengine but nobody replied.

http://www.irian.at/myfaces_support
costs $5,300/yr for basic support--$10,600 for advanced. My startup can't
afford this--especially without trying it first--perhaps a paygo option.

I haven't studied the source code to see if there's unit testing.

As compelling as jsf2 is, I'm scared to bet my startup on it.

On Fri, Dec 3, 2010 at 12:30 AM, Mark Struberg  wrote:

> Hi!
>
> With the pretty fast development on the spec side (last year 2.0, last week
> 2.1 - thanks Ed!) there is a very steady development going on atm. Also
> remember that EE6 is pretty fresh.
>
> So while there is currently not that much traffic on the us...@mf list
> there is pretty much of it on the dev list atm.
> The move from JSF-1.x to JSF-2.x is still to be done for most of the legacy
> projects, but there are a few JFS-2 projects already in production with lot
> of success (we currently serve ~ 1 mio page hits per day with MyFaces-2,
> OpenWebBeans, CODI, OpenJPA2 and our servers are pretty 'cold')
>
> LieGrue,
> strub
>
> --- On Fri, 12/3/10, Matthias Wessendorf  wrote:
>
> > From: Matthias Wessendorf 
> > Subject: Re: myfaces popularity
> > To: "MyFaces Discussion" 
> > Date: Friday, December 3, 2010, 7:44 AM
> > On Fri, Dec 3, 2010 at 7:28 AM, ken
> > keller 
> > wrote:
> > > This mailing list isn't very active. Most of the
> > messages seem to be about
> > > component libs like Trinidad.
> > >
> > > Is myfaces popular?
> >
> > yes it is.
> >
> > >
> > > Wouldn't a searchable group be more convenient than a
> > mailing list?
> >
> > the archives *are* searchable (e.g. markmail).
> >
> > >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > twitter: http://twitter.com/mwessendorf
> >
>
>
>
>


myfaces popularity

2010-12-02 Thread ken keller
This mailing list isn't very active. Most of the messages seem to be about
component libs like Trinidad.

Is myfaces popular?

Wouldn't a searchable group be more convenient than a mailing list?


Re: java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-10-24 Thread ken keller
Yesterday evening I noticed java.io.InvalidObjectException stopped being
thrown. I don't know why but I hope it is related to switching from eclipse
to intellij & not due to gae. (I also learned facelets is built into jsf2 so
a separate jar isn't required.)

I have two new problems which only happen on live gae--not dev gae:

1) I'm testing jsf-basics.zip on
http://www.coreservlets.com/JSF-Tutorial/jsf2/code/.
* open bank-lookup.jsf
* fill in form
* click [Show Current Balance]
* the correct jsf page is displayed
* click chrome's Back
* javax.faces.application.ViewExpiredException is thrown (whether using
client or server state saving):

org.apache.myfaces.shared_impl.util.StateUtils reconstruct: View State
cannot be reconstructed
javax.faces.FacesException:
javax.faces.application.ViewExpiredException
at
org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:
490)
at
org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:
378)
at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(Ht
mlResponseStateManager.java:
213)
at
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlRes
ponseStateManager.java:
160)
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.res
toreView

(DefaultFaceletsStateManagementStrategy.java:
140)
at
org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspState
ManagerImpl.java:
388)
at
org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView
(ViewDeclarationLanguageBase.java:
106)
at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView
(FaceletViewDeclarationLanguage.java:
1277)


This doesn't happen if I submit the form with errors, fix them, & click
[Show Current Balance] button:
* open bank-lookup.jsf
* click [Show Current Balance] button
* validation errors are shown (post back)
* correct errors
* click [Show Current Balance] button
* click Back button

2) A simple use of  doesn't update:








On Thu, Oct 21, 2010 at 9:32 PM, ken keller  wrote:

> I'm a JSF2/myfaces rookie. I have it working w/ Eclipse Helios & gae
> Eclipse plugin. When I deploy it & visit my test page, a blank page is
> displayed & the log entry is appended to this message. It appears to be a
> session deserialization problem. Thx. for your help.
>
>
> javax.servlet.ServletException: java.lang.RuntimeException: 
> java.io.InvalidObjectException: enum constant attributes does not exist in 
> class javax.faces.component.UIComponent$PropertyKeys
>   at 
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:240)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>   at org.mortbay.jetty.Server.handle(Server.java:326)
>   at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>   at 
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at 
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
>   at 
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
>   at 
> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8486)
>   at 
> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8484)
>   at 
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
>   at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:418)
>   at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:572)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
>   at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>   at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.RuntimeException: java.io.InvalidObjectException: enu

java.io.InvalidObjectException: enum constant attributes does not exist in class javax.faces.component.UIComponent$PropertyKeys

2010-10-21 Thread ken keller
I'm a JSF2/myfaces rookie. I have it working w/ Eclipse Helios & gae Eclipse
plugin. When I deploy it & visit my test page, a blank page is displayed &
the log entry is appended to this message. It appears to be a session
deserialization problem. Thx. for your help.


javax.servlet.ServletException: java.lang.RuntimeException:
java.io.InvalidObjectException: enum constant attributes does not
exist in class javax.faces.component.UIComponent$PropertyKeys
at 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:240)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
at 
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8486)
at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8484)
at 
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:418)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:572)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at 
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.RuntimeException: java.io.InvalidObjectException:
enum constant attributes does not exist in class
javax.faces.component.UIComponent$PropertyKeys
at 
com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java:413)
at 
com.google.apphosting.runtime.jetty.SessionManager.createSessionFromEntity(SessionManager.java:376)
at 
com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:314)
at 
com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:284)
at 
org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:237)
at 
org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:246)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:136)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
... 21 more
Caused by: java.io.InvalidObjectException: enum constant attributes
does not exist in class javax.faces.component.UIComponent$PropertyKeys
at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1721)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1343)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1684)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1340)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1684)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1340)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1684)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1340)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at java.util.HashMap.readObject(HashMap.java:1047)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
at java.io.Ob

inputHtml

2010-09-20 Thread Ken McArthur
Hi,

Has anyone successfully used Tomahawk  inputHtml with MyFaces
implementation 1.2.5, Tomahawk 12-1.1.9, and Facelets 1.1.15?

When I try something simple like:

   
...
   


When I put some data in the inputHtml box and click commandButton:
   valueChangeListener never gets called
   converter gets called with empty string
   pageContentDO.value setter method never gets called

This code worked fine with earlier release of MyFaces and Tomahawk so
I'm wondering when it went bad and how far back I have to go to get
inputHtml working again.  Maybe I'm attempting to use bad combination
of MyFaces and Tomahawk.  What is latest release combination of
MyFaces and Tomahawk is anyone seeing inputHtml work?

Thanks for any ideas you may have,
Ken



-- 
303-619-6607
dynoSite creator
adsea.com


Re: inputHtml

2008-02-07 Thread Ken McArthur
Martin,

Yea, I originally thought it must be tomahawk but then thought otherwise
because 1.1.6 worked fine with myfaces 1.1.5.  Anyway, new issue is
https://issues.apache.org/jira/browse/TOMAHAWK-1192

Thanks,
Ken


On Feb 6, 2008 11:57 PM, Martin Marinschek <[EMAIL PROTECTED]>
wrote:

> P.S.: it als helps if you send me a mail with the link to the issue.
>
> regards,
>
> Martin
>
> On Feb 7, 2008 7:57 AM, Martin Marinschek <[EMAIL PROTECTED]>
> wrote:
> > Hi Ken,
> >
> > as far as I can tell, you have been reporting a bug for Tomahawk - so
> > it should have a TOMAHAWK- issue key. I deleted the issue - please use
> > the tomahawk issue tracker.
> >
> > regards,
> >
> > Martin
> >
> >
> > On Feb 7, 2008 1:54 AM, Ken McArthur <[EMAIL PROTECTED]> wrote:
> > > Martin,
> > >
> > > Issue key = myfaces-1813
> > >
> > > Thanks again and have a great day,
> > > Ken
> > >
> > >
> > >
> > >
> > > On Feb 6, 2008 5:21 PM, Martin Marinschek <[EMAIL PROTECTED]
> >
> > > wrote:
> > >
> > > > http://myfaces.apache.org/issue-tracking.html
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> > > > On Feb 7, 2008 1:08 AM, Ken McArthur <[EMAIL PROTECTED]> wrote:
> > > > > Martin,
> > > > >
> > > > > That's very cool you found the problem.  I could not find myfaces
> > > project on
> > > > > jira.codehaus.org.  Where do I need to go to open an issue?
> > > > >
> > > > > Thanks,
> > > > >  Ken
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Feb 6, 2008 1:14 PM, Martin Marinschek <
> [EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > >
> > > > > > I have a fix for this problem - please open an issue, I will
> commit
> > > it.
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Feb 5, 2008 4:54 AM, Ken McArthur <[EMAIL PROTECTED]>
> wrote:
> > > > > >
> > > > > > > Attempting to upgrade from myfaces 1.1.5 to 1.2.2 and all
> works
> > > great
> > > > > except for inputHtml.
> > > > > > >
> > > > > > > Using myfaces 1.2.2, tomahawk 1.1.6, facelets 1.1.13.
> > > > > > >
> > > > > > > Get the following exception in the rendering facelets phases:
> > > > > > >
> > > > > > > Caused by: java.lang.ClassCastException: java.lang.Class
> > > > > > > at
> > > > >
> > > org.apache.myfaces.util.AbstractAttributeMap.put(
> AbstractAttributeMap.java:35)
> > > > > > > at
> > > > >
> > >
> org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.setThisPageAlreadyRenderedAnInputHtml
> (InputHtmlRenderer.java:107)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > at
> > > > >
> > > org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.encodeEnd(
> InputHtmlRenderer.java:93)
> > > > > > > at
> > > > >
> > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java
> :556)
> > > > > > > Any ideas?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Ken
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF powerhouse -
> > > > > > JSF Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 303-619-6607
> > > > > http://adsea.com
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > > 303-619-6607
> > > http://adsea.com
> >
> >
> >
> > --
> >
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



-- 
303-619-6607
http://adsea.com


Re: inputHtml

2008-02-06 Thread Ken McArthur
Martin,

Issue key = myfaces-1813

Thanks again and have a great day,
Ken


On Feb 6, 2008 5:21 PM, Martin Marinschek <[EMAIL PROTECTED]>
wrote:

> http://myfaces.apache.org/issue-tracking.html
>
> regards,
>
> Martin
>
> On Feb 7, 2008 1:08 AM, Ken McArthur <[EMAIL PROTECTED]> wrote:
> > Martin,
> >
> > That's very cool you found the problem.  I could not find myfaces
> project on
> > jira.codehaus.org.  Where do I need to go to open an issue?
> >
> > Thanks,
> >  Ken
> >
> >
> >
> >
> > On Feb 6, 2008 1:14 PM, Martin Marinschek <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> > > I have a fix for this problem - please open an issue, I will commit
> it.
> > >
> > > regards,
> > >
> > > Martin
> > >
> > >
> > >
> > >
> > >
> > > On Feb 5, 2008 4:54 AM, Ken McArthur <[EMAIL PROTECTED]> wrote:
> > >
> > > > Attempting to upgrade from myfaces 1.1.5 to 1.2.2 and all works
> great
> > except for inputHtml.
> > > >
> > > > Using myfaces 1.2.2, tomahawk 1.1.6, facelets 1.1.13.
> > > >
> > > > Get the following exception in the rendering facelets phases:
> > > >
> > > > Caused by: java.lang.ClassCastException: java.lang.Class
> > > > at
> > org.apache.myfaces.util.AbstractAttributeMap.put(
> AbstractAttributeMap.java:35)
> > > > at
> >
> org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.setThisPageAlreadyRenderedAnInputHtml
> (InputHtmlRenderer.java:107)
> > > >
> > > >
> > > >
> > > > at
> > org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.encodeEnd(
> InputHtmlRenderer.java:93)
> > > > at
> > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java
> :556)
> > > > Any ideas?
> > > >
> > > > Thanks,
> > > > Ken
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> >
> >
> >
> >
> > --
> > 303-619-6607
> > http://adsea.com
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



-- 
303-619-6607
http://adsea.com


Re: inputHtml

2008-02-06 Thread Ken McArthur
Martin,

That's very cool you found the problem.  I could not find myfaces project on
jira.codehaus.org.  Where do I need to go to open an issue?

Thanks,
Ken



On Feb 6, 2008 1:14 PM, Martin Marinschek <[EMAIL PROTECTED]>
wrote:

> I have a fix for this problem - please open an issue, I will commit it.
>
> regards,
>
> Martin
>
>
> On Feb 5, 2008 4:54 AM, Ken McArthur <[EMAIL PROTECTED]> wrote:
>
> > Attempting to upgrade from myfaces 1.1.5 to 1.2.2 and all works great
> > except for inputHtml.
> >
> > Using myfaces 1.2.2, tomahawk 1.1.6, facelets 1.1.13.
> >
> > Get the following exception in the rendering facelets phases:
> >
> > Caused by: java.lang.ClassCastException: java.lang.Class
> > at 
> > org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
> > at 
> > org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.setThisPageAlreadyRenderedAnInputHtml(InputHtmlRenderer.java:107)
> >
> >
> > at 
> > org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.encodeEnd(InputHtmlRenderer.java:93)
> > at 
> > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:556)
> >
> > Any ideas?
> >
> > Thanks,
> > Ken
> >
> >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces




-- 
303-619-6607
http://adsea.com


inputHtml

2008-02-04 Thread Ken McArthur
Attempting to upgrade from myfaces 1.1.5 to 1.2.2 and all works great except
for inputHtml.

Using myfaces 1.2.2, tomahawk 1.1.6, facelets 1.1.13.

Get the following exception in the rendering facelets phases:

Caused by: java.lang.ClassCastException: java.lang.Class
at 
org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
at 
org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.setThisPageAlreadyRenderedAnInputHtml(InputHtmlRenderer.java:107)
at 
org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.encodeEnd(InputHtmlRenderer.java:93)
at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:556)

Any ideas?

Thanks,
Ken


Re: javax.faces.ViewState contents?

2007-08-23 Thread Ken McArthur
Mario,

ViewStateDumper is awesome!  I get a large number of "#null?"s in output but
everything else is as expected.  In my situation bottleneck is bandwidth;
especially since ViewState is sent back to server and upload speeds are most
always much slower than download speeds.  Compressed ViewState by adding the
following to web.xml:

  
org.apache.myfaces.COMPRESS_STATE_IN_CLIENT
true
  

This cut ViewState down by about 1/5th.

Thanks again to all.  I think I have good temporary solution but will look
more into server side state saving.

Ken




On 8/23/07, Ken McArthur <[EMAIL PROTECTED]> wrote:
>
> Great advise, I'll try it all and update board when I figure it out.
> Thanks.
>
> On 8/23/07, Mario Ivankovits <[EMAIL PROTECTED] > wrote:
> >
> > Hi!
> > > With client state saving, I was under the impression that only managed
> >
> > > beans in session scope or used in t:saveState would be serialized into
> > > the hidden javax.faces.ViewState variable.  However, my application's
> > > creating ViewStates in pages with very simple forms that are almost 70
> >
> > > kb long!
> > I've create a simple ViewState dumper which allows you to .. well ...
> > dump the view state :-) ... as long as you do not compression or
> > encryption.
> > Just set the viewState variable to the content of the viewState in the
> > HTML output.
> > Maybe you can figure out what happens.
> >
> > Unhappily there is no information about which component added the data
> > to the state, though, it might be a start anyway.
> >
> >
> > import org.apache.commons.codec.binary.Base64 ;
> >
> > import java.io.ByteArrayInputStream;
> > import java.io.IOException;
> > import java.io.ObjectInputStream;
> > import java.util.Collection;
> >
> > public class ViewStateDumper
> > {
> > public static void main(String[] args) throws IOException,
> > ClassNotFoundException
> > {
> > String viewState="";
> >
> > byte[] viewStateData =
> > Base64.decodeBase64(viewState.getBytes("US-ASCII"));
> > ObjectInputStream ois = new ObjectInputStream(new
> > ByteArrayInputStream(viewStateData));
> >
> > Object[] state = (Object[]) ois.readObject();
> > dumpState("", state);
> > }
> >
> > private static void dumpState(String prefix, Object[] state)
> > {
> > for (Object object : state)
> > {
> > System.err.print(prefix);
> >
> > if (object == null)
> > {
> > System.err.println("#null?");
> > }
> > else if (object instanceof Object[])
> > {
> > System.err.println(prefix + "array");
> > dumpState(prefix + "", (Object[]) object);
> > }
> > else if (object instanceof Collection)
> > {
> > System.err.println(prefix + "collection");
> > dumpState(prefix + "", ((Collection)
> > object).toArray());
> > }
> > else
> > {
> > System.err.print(object.getClass().getName());
> > System.err.print(" ");
> > System.err.println(object.toString ());
> > }
> > }
> > }
> > }
> >
> >
> > Ciao,
> > Mario
> >
> >
>
>
> --
> 303-619-6607
> http://adsea.com
>



-- 
303-619-6607
http://adsea.com


Re: javax.faces.ViewState contents?

2007-08-23 Thread Ken McArthur
Great advise, I'll try it all and update board when I figure it out.
Thanks.

On 8/23/07, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
>
> Hi!
> > With client state saving, I was under the impression that only managed
> > beans in session scope or used in t:saveState would be serialized into
> > the hidden javax.faces.ViewState variable.  However, my application's
> > creating ViewStates in pages with very simple forms that are almost 70
> > kb long!
> I've create a simple ViewState dumper which allows you to .. well ...
> dump the view state :-) ... as long as you do not compression or
> encryption.
> Just set the viewState variable to the content of the viewState in the
> HTML output.
> Maybe you can figure out what happens.
>
> Unhappily there is no information about which component added the data
> to the state, though, it might be a start anyway.
>
>
> import org.apache.commons.codec.binary.Base64;
>
> import java.io.ByteArrayInputStream;
> import java.io.IOException;
> import java.io.ObjectInputStream;
> import java.util.Collection;
>
> public class ViewStateDumper
> {
> public static void main(String[] args) throws IOException,
> ClassNotFoundException
> {
> String viewState="";
>
> byte[] viewStateData =
> Base64.decodeBase64(viewState.getBytes("US-ASCII"));
> ObjectInputStream ois = new ObjectInputStream(new
> ByteArrayInputStream(viewStateData));
>
> Object[] state = (Object[]) ois.readObject();
> dumpState("", state);
> }
>
> private static void dumpState(String prefix, Object[] state)
> {
> for (Object object : state)
> {
> System.err.print(prefix);
>
> if (object == null)
> {
> System.err.println("#null?");
> }
> else if (object instanceof Object[])
> {
> System.err.println(prefix + "array");
> dumpState(prefix + "", (Object[]) object);
> }
> else if (object instanceof Collection)
> {
> System.err.println(prefix + "collection");
> dumpState(prefix + "", ((Collection)
> object).toArray());
> }
> else
> {
> System.err.print(object.getClass().getName());
> System.err.print(" ");
> System.err.println(object.toString());
> }
> }
> }
> }
>
>
> Ciao,
> Mario
>
>


-- 
303-619-6607
http://adsea.com


Re: javax.faces.ViewState contents?

2007-08-23 Thread Ken McArthur
You mention what I believed to be true.  Since my simple page with a 70kb
ViewState is not requesting saveState for anything, I suspect it must be
something else that's being serialized.  Any ideas on what else it could be?


On 8/23/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
>
> Anything that is returned from saveState on any object implementing
> StateHolder is saved into the view state. (All UIComponents implement
> StateHolder)
>
> On 8/23/07, Ken McArthur <[EMAIL PROTECTED]> wrote:
> >
> > With client state saving, I was under the impression that only managed
> beans
> > in session scope or used in t:saveState would be serialized into the
> hidden
> > javax.faces.ViewState variable.  However, my application's creating
> > ViewStates in pages with very simple forms that are almost 70 kb long!
> >
> > I'm thinking that if I serialized all managed beans in all scopes +
> resource
> > bundle, it might come to about that.
> >
> > Do you know what specifically is stored in ViewState?  Put in other
> words,
> > what is best way to architect application to minimize size of ViewState
> > while still using client state saving?
> >
> > Thanks, I appreciate any advice,
> > Ken
>



-- 
303-619-6607
http://adsea.com


javax.faces.ViewState contents?

2007-08-23 Thread Ken McArthur
With client state saving, I was under the impression that only managed beans
in session scope or used in t:saveState would be serialized into the hidden
javax.faces.ViewState variable.  However, my application's creating
ViewStates in pages with very simple forms that are almost 70 kb long!

I'm thinking that if I serialized all managed beans in all scopes + resource
bundle, it might come to about that.

Do you know what specifically is stored in ViewState?  Put in other words,
what is best way to architect application to minimize size of ViewState
while still using client state saving?

Thanks, I appreciate any advice,
Ken


Re: jscookMenu target attribute

2007-07-24 Thread Ken McArthur

Found answer in another posting:



Thanks,
Ken


On 7/24/07, Ken McArthur <[EMAIL PROTECTED]> wrote:



It would seem normal to have a link in a dropdown menu to a url (i.e. not
an action but  http://... ) where target="_self" or "_parent" in
navigationMenuItem so that target is loaded in current frame.  However,
target attribute is ignored in this circumstance so page is always loaded in
new frame.  Ignoring target attribute seems very odd.  Anyone come up with a
clean way around this override?

Thanks,
Ken




jscookMenu target attribute

2007-07-24 Thread Ken McArthur

It would seem normal to have a link in a dropdown menu to a url (i.e. not an
action but  http://... ) where target="_self" or "_parent" in
navigationMenuItem so that target is loaded in current frame.  However,
target attribute is ignored in this circumstance so page is always loaded in
new frame.  Ignoring target attribute seems very odd.  Anyone come up with a
clean way around this override?

Thanks,
Ken


Re: Need to switch image depending on odd or even row in datatable

2007-06-19 Thread Ken Clark

It turns out that the component change would be too time-consuming (and risky
-- we are two days from code freeze, just trying to clean up a few things.)  

It should have been obvious to me at the beginning how to do this -- I just
added a simple method to the underlying DataModel implementation and then
referenced that.

In the next release we will switch to extending the Tomahawk datatable. 
Thanks for the assistance!

Thanks,
ken


Mike Kienenberger wrote:
> 
> Extend org.apache.myfaces.component.html.ext.HtmlDataTable instead,
> and you should be set.
> 
> 
> On 6/18/07, Ken Clark <[EMAIL PROTECTED]> wrote:
>>
>> I think our problem is that we have build our own datatable extension
>> that I
>> thought was based on the Tomahawk datatable but is actually based on the
>> MyFaces baseline datatable implementation.
>>
>> Looking into switching that now...
>>
>> Thanks,
>> ken
>>
>>
>> Ken Clark wrote:
>> >
>> > Thanks for the quick reply.
>> >
>> > I tried that and got this error:
>> >
>> > javax.servlet.ServletException: Failed to compile JSP
>> > /order/viewOrdersTable.jsp
>> > viewOrdersTable.jsp:17:14: This attribute is not recognized.
>> >  rowIndexVar="_index"
>> >
>> > We are using tomahawk 1.1.3 -- is there a version dependency for
>> > rowIndexVar?
>> >
>> > Thanks,
>> > ken
>> >
>> >
>> > Christopher Cudennec wrote:
>> >>
>> >> Hi Ken,
>> >>
>> >> you can use attribute "rowIndexVar" for that. E.g.
>> >>
>> >> 
>> >>   #{_index % 2 == 0 ? 'even' : 'odd'}
>> >> 
>> >>
>> >> see: http://myfaces.apache.org/tomahawk/extDataTable.html
>> >>
>> >> Cheers,
>> >>
>> >> Christopher
>> >>
>> >> Ken Clark schrieb:
>> >>> I have a t:datatable which is declared as:
>> >>>
>> >>> > >>>  var="order"
>> >>>  value="#{orderTable.dataModel}"
>> >>>  first="#{orderTable.pageHandler.firstRowIndex}"
>> >>>  rows="#{orderTable.noOfRows}"
>> >>>  styleClass="dataTable"
>> >>>  rowClasses="odd,even">
>> >>>
>> >>> The odd and even styleclasses work fine.  However, I have an image on
>> >>> each
>> >>> row, and because the background color changes, I need to use 2
>> different
>> >>> icons.
>> >>>
>> >>> How can I go about defining the output such that it uses a different
>> >>> icon
>> >>> depending on whether the row is odd or even?
>> >>>
>> >>> Thanks,
>> >>> ken
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Need-to-switch-image-depending-on-odd-or-even-row-in-datatable-tf3941849.html#a11182063
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-to-switch-image-depending-on-odd-or-even-row-in-datatable-tf3941849.html#a11194092
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Need to switch image depending on odd or even row in datatable

2007-06-18 Thread Ken Clark

I think our problem is that we have build our own datatable extension that I
thought was based on the Tomahawk datatable but is actually based on the
MyFaces baseline datatable implementation.

Looking into switching that now...

Thanks,
ken


Ken Clark wrote:
> 
> Thanks for the quick reply.  
> 
> I tried that and got this error:
>  
> javax.servlet.ServletException: Failed to compile JSP
> /order/viewOrdersTable.jsp
> viewOrdersTable.jsp:17:14: This attribute is not recognized.
>  rowIndexVar="_index"
> 
> We are using tomahawk 1.1.3 -- is there a version dependency for
> rowIndexVar?
> 
> Thanks,
> ken 
> 
> 
> Christopher Cudennec wrote:
>> 
>> Hi Ken,
>> 
>> you can use attribute "rowIndexVar" for that. E.g.
>> 
>> 
>>   #{_index % 2 == 0 ? 'even' : 'odd'}
>> 
>> 
>> see: http://myfaces.apache.org/tomahawk/extDataTable.html
>> 
>> Cheers,
>> 
>> Christopher
>> 
>> Ken Clark schrieb:
>>> I have a t:datatable which is declared as:
>>>
>>> >>  var="order"
>>>  value="#{orderTable.dataModel}"
>>>  first="#{orderTable.pageHandler.firstRowIndex}"
>>>  rows="#{orderTable.noOfRows}"
>>>  styleClass="dataTable"
>>>  rowClasses="odd,even">
>>>
>>> The odd and even styleclasses work fine.  However, I have an image on
>>> each
>>> row, and because the background color changes, I need to use 2 different
>>> icons.
>>>
>>> How can I go about defining the output such that it uses a different
>>> icon
>>> depending on whether the row is odd or even?
>>>
>>> Thanks,
>>> ken
>>>
>>>   
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-to-switch-image-depending-on-odd-or-even-row-in-datatable-tf3941849.html#a11182063
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Need to switch image depending on odd or even row in datatable

2007-06-18 Thread Ken Clark

Thanks for the quick reply.  

I tried that and got this error:
 
javax.servlet.ServletException: Failed to compile JSP
/order/viewOrdersTable.jsp
viewOrdersTable.jsp:17:14: This attribute is not recognized.
 rowIndexVar="_index"

We are using tomahawk 1.1.3 -- is there a version dependency for
rowIndexVar?

Thanks,
ken 


Christopher Cudennec wrote:
> 
> Hi Ken,
> 
> you can use attribute "rowIndexVar" for that. E.g.
> 
> 
>   #{_index % 2 == 0 ? 'even' : 'odd'}
> 
> 
> see: http://myfaces.apache.org/tomahawk/extDataTable.html
> 
> Cheers,
> 
> Christopher
> 
> Ken Clark schrieb:
>> I have a t:datatable which is declared as:
>>
>> >  var="order"
>>  value="#{orderTable.dataModel}"
>>  first="#{orderTable.pageHandler.firstRowIndex}"
>>  rows="#{orderTable.noOfRows}"
>>  styleClass="dataTable"
>>  rowClasses="odd,even">
>>
>> The odd and even styleclasses work fine.  However, I have an image on
>> each
>> row, and because the background color changes, I need to use 2 different
>> icons.
>>
>> How can I go about defining the output such that it uses a different icon
>> depending on whether the row is odd or even?
>>
>> Thanks,
>> ken
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-to-switch-image-depending-on-odd-or-even-row-in-datatable-tf3941849.html#a11181821
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Need to switch image depending on odd or even row in datatable

2007-06-18 Thread Ken Clark


I have a t:datatable which is declared as:



The odd and even styleclasses work fine.  However, I have an image on each
row, and because the background color changes, I need to use 2 different
icons.

How can I go about defining the output such that it uses a different icon
depending on whether the row is odd or even?

Thanks,
ken

-- 
View this message in context: 
http://www.nabble.com/Need-to-switch-image-depending-on-odd-or-even-row-in-datatable-tf3941849.html#a11180728
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Solved] GraphicImage Question

2007-02-22 Thread Ken McArthur

Michael,

Here's another option you can try that I've used successfully.  Store images
in a database and create a PhaseListener to retrieve image and output the
content.

Ken


On 2/22/07, m1380103 <[EMAIL PROTECTED]> wrote:



Oh yeah of course.  Can't believe I got stuck on this problem without
thinking of it as being run through a remote browser.  I'll fix this by
making an image object reference in the code running on the server, rather
than in the web page.

Thanks, I'll try using my brain next time.
Michael.



Veit Guna-2 wrote:
>
> Did I miss something? You're talking about an webapp right? That means,
> a user from location A calls your application at location B (A and B are
> on different machines). So when the user uploads the image, it will be
> stored on B, right? So you (browser on A)can't access that file through
> an absolute (local) path! I think "value" takes an URL that the browser
> has to resolve. When this is C: it can't be reached on the server - it
> will try to find it on the local (A) machine. Just look into the source
> of your page, it will point to something like "C:...". It should be
> something like "http://youtserver/webapp/file"; or "/webapp/file".
>
> But maybe I didn't get you right...
>
> regards,
> Veit
>
> m1380103 schrieb:
>> See that's why my problem came about.
>>
>> I wanted to save on the local folder thinking it would be simple to use
>> graphicimage with either c:\\images\\uniqueId or c:\images or c:/images
>> but
>> I haven't found any way to work yet.  I think it might be helped if I
>> pass
>> the image directory location from the java class.  The strange thing I
>> noticed from the page source after JSF had rendered was that the
windows
>> \
>> was not shown in the source.  That's why I thought it might be related
to
>> the graphicImage tag's use of the \ symbol, even when \\ was used.
>>
>> I can't seem to find an example anywhere online where the tag is used
to
>> read from outside the deployment directory, maybe the original idea for
>> writing a renderer so the directory for the images can be set is the
only
>> way to go about this.
>>
>>
>> Michał  wrote:
>>> Perhaps:
>>>
>>> 
>>>
>>> ?
>>>
>>> michael
>>>
>>> On 22/02/07, m1380103 <[EMAIL PROTECTED]> wrote:
>>>> Thanks for the quick reply,
>>>>
>>>> I have spent some time looking over the JSF examples, including the
>>>> sandboxes graphicDynamicImage.  My problem really lies in displaying
an
>>>> image from outside the deployment directory.  There is no dynamic
>>>> action
>>>> needed in my application so I thought the standard graphicImage would
>>>> do,
>>>> just not sure why my 
wouldn't
>>>> work.
>>>>
>>>> I will look into extending the imagerenderer to read images from a
>>>> directory
>>>> on the hard drive, though if anyone knows a simple example of using
the
>>>> graphicImage and reading from a standard windows folder, the help
would
>>>> be
>>>> much appreciated.
>>>>
>>>> Thanks
>>>> Michael.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Veit Guna-2 wrote:
>>>>> Hi.
>>>>>
>>>>> Take a look at the sandbox graphicDynamicImage. There you can write
>>>> your
>>>>> own ImageRenderer and you're free where you read the images from.
>>>>>
>>>>> In my webapp uploaded files go to a separate directory outside the
>>>>> deployment directory of tomcat. The ImageRenderer reads files from
>>>> there
>>>>> and displays them to the user.
>>>>>
>>>>> Perhaps it helps.
>>>>>
>>>>> regards,
>>>>> Veit
>>>>>
>>>>>
>>>>> m1380103 schrieb:
>>>>>> Basically I'm building an ecommerce site using MyFaces.  I have
over
>>>>>> a
>>>>>> years
>>>>>> experience with it, though I've come across a problem I have never
>>>>>> encountered before.
>>>>>>
>>>>>> For this site the user can upload images of the item they are
>>>>>> selling.
>>>>>> Except I am having some problems with storing this and displaying
the
>>>>

jscookMenu with outputLink?

2007-01-31 Thread Ken McArthur

Hi,

Is there any way to use jscookMenu with a basic url instead of having to
declare an action navigation rule?

Thanks,
Ken


jscookMenu with outputLink

2007-01-31 Thread Ken McArthur

Hi,

Is there any way to use jscookMenu with a basic url instead of having to
declare an action navigation rule?

Thanks for great stuff,
Ken


Re: t:inputHtml not working in IE

2006-11-30 Thread Ken McArthur

I've also experienced this.  It appears Kupu cleans up all the html you
enter here.  In some ways it's good because it makes it xml compliant.
However it also removes  tags. :(
Short answer - no.
If anyone else has a clean workaround for this, I'm all ears.

Ken




On 11/23/06, Dave <[EMAIL PROTECTED]> wrote:


can the inputHtml editor add video/audio, eg. ?  in text editor
mode.
It did not work form me. Any one experiencing this issue?

*Ken McArthur <[EMAIL PROTECTED]>* wrote:


Stefan,

In case this still helps you or anyone else, I've just had the same
experienced.  For some reason adding a hight style attribute to inputHtml
fixed rendering problem in IE.

 wrote:
>
> Hi Andrew,
>
>
> Thx for looking into this: I assume that it is then a weird combination
> of
> properties, that breaks the code in ie. I will upgrade to 1.1.1 and
> check,
> if the problem goes away with another set of properties...
>
> Cheers
> stefan
>
> > -Original Message-
> > From: Andrew Robinson [mailto:[EMAIL PROTECTED] ]
> > Sent: Dienstag, 8. August 2006 17:40
> > To: MyFaces Discussion
> > Subject: Re: t:inputHtml not working in IE
> >
> > FYI - I can't reproduce the issue. On my IE everything worked fine. I
> > don't know what the user was experiencing.
> >
> > On 8/4/06, Stefan Frank <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I'm having troubles with the htmleditor on Internetexplorer. The
> > following
> > > snippet
> > >
> > >  > >  value="#{chapterBean.currentChapter.summary}"
> > >  style="CSSClass"
> > >  fallback="false"
> > >  type="fragment"
> > >  allowExternalLinks="false"
> > >  addKupuLogo="false"
> > >  showAllToolBoxes="false"
> > >  allowEditSource="true"
> > >  showPropertiesToolBox="false"
> > >  showLinksToolBox="false"
> > >  showImagesToolBox="false"
> > >  showTablesToolBox="false"
> > >  showDebugToolBox="false"
> > >  showCleanupExpressionsToolBox="false"/>
> > >
> > > renders and behaves correctly in firefox, but fails terribly in
> Internet
> > > Explorer(checked several 6+ versions): The Buttonbar is rendered,
> but
> > the
> > > text is not and the textfield is not editable. Switching to full
> browser
> > > mode or using one of the buttons (e.g. indent) makes the field
> editable,
> > > although it remains empty.
> > >
> > > Has anyone else encountered this strange behaviour?! Am I missing a
> > certain
> > > IE-switch or does the control simply not work on ie?
> > >
> > > Cheers&thx for any help
> > > Stefan
> > >
> > >
> > >
>
>
>


--
303-619-6607
http://adsea.com


 --
Cheap Talk? Check 
out<http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>Yahoo!
 Messenger's low PC-to-Phone call rates.




Re: t:inputHtml not working in IE

2006-11-23 Thread Ken McArthur

Stefan,

In case this still helps you or anyone else, I've just had the same
experienced.  For some reason adding a hight style attribute to inputHtml
fixed rendering problem in IE.

 wrote:


Hi Andrew,


Thx for looking into this: I assume that it is then a weird combination of
properties, that breaks the code in ie. I will upgrade to 1.1.1 and check,
if the problem goes away with another set of properties...

Cheers
stefan

> -Original Message-
> From: Andrew Robinson [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 8. August 2006 17:40
> To: MyFaces Discussion
> Subject: Re: t:inputHtml not working in IE
>
> FYI - I can't reproduce the issue. On my IE everything worked fine. I
> don't know what the user was experiencing.
>
> On 8/4/06, Stefan Frank <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm having troubles with the htmleditor on Internetexplorer. The
> following
> > snippet
> >
> >  >  value="#{chapterBean.currentChapter.summary}"
> >  style="CSSClass"
> >  fallback="false"
> >  type="fragment"
> >  allowExternalLinks="false"
> >  addKupuLogo="false"
> >  showAllToolBoxes="false"
> >  allowEditSource="true"
> >  showPropertiesToolBox="false"
> >  showLinksToolBox="false"
> >  showImagesToolBox="false"
> >  showTablesToolBox="false"
> >  showDebugToolBox="false"
> >  showCleanupExpressionsToolBox="false"/>
> >
> > renders and behaves correctly in firefox, but fails terribly in
Internet
> > Explorer(checked several 6+ versions): The Buttonbar is rendered, but
> the
> > text is not and the textfield is not editable. Switching to full
browser
> > mode or using one of the buttons (e.g. indent) makes the field
editable,
> > although it remains empty.
> >
> > Has anyone else encountered this strange behaviour?! Am I missing a
> certain
> > IE-switch or does the control simply not work on ie?
> >
> > Cheers&thx for any help
> > Stefan
> >
> >
> >






--
303-619-6607
http://adsea.com


Need help in getting 'commandButton'

2006-11-02 Thread ken carlino

I have the following form. The whole form is displayed correctly,
include the input text field values are put out correctly.

But when I click the 'save' button, it does not submit.  It stays at
the same page.

And if I take out the following block(a label and an input text), the
submit works.

  
   
   
   


Can anyone please tell me what the problem? Again, the page is
displayed correctly with the right value. I have checked that
'myAgent' class has getter/setting for 'phone' class and 'phone' class
has getter/setting for 'no'.

Thanks for any help.


Here is my form:







   
   
   
   
   

  
   
   
   

   
   

   
   
   





How to use the inputfileupload component

2006-10-31 Thread ken carlino

All,


I am trying to use the  in myfaces.

Here is my html file:

   

   
   
   
   

And in my backbean, I have this :
private UploadedFile file;

public UploadedFile geFile() {
return file;
}

public void setFile(UploadedFile file) {
this.file = file;
}

But when I click the submit, the file property is null. I expect it is
popular by myfaces.

Can you please tell me what am i missing?

Thank you.


[newbie] managed-property in face-config.xml

2006-10-31 Thread ken carlino

Can you help me understanding what is the difference between putting
'#{param.userName}' vs putting '#{userManager}' as the value of a
managed property?

What is the meaning of the 'param' in the expression?

 
 userName
 #{param.userName}
   
   
   userManager
   #{userManager}
   


Common practice of using JSF to develop webapp

2006-10-29 Thread ken carlino

Hi,

i am going to develop a Java webapp from scratch.
What is the common/recommend practice of using JSF?

What i learn so far is:
* use facelet instead of jsp
* use hibernate for ORM (instead of the whole EJB stuff)
* run it inside servlet container instead of a full blown J2EE server

What are other common/recommend practice?
* Do I need Spring?
* Do I need Shale?
* Do I need Seam?


Re: Problem in marking an InputText to 'readonly' and 'disabled'

2006-10-29 Thread ken carlino

I am looking at this documentation,
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/renderkitdocs/HTML_BASIC/javax.faces.Inputjavax.faces.Text.html

I don't see it has the '"disabledOnClientSide" attribute.

Thanks.

On 10/29/06, ken carlino <[EMAIL PROTECTED]> wrote:

Thanks.  Is this '"disabledOnClientSide" a JSF standard attribute (JSF
1.0? 1.1?) ?
or it is a myfaces extension?

I can't find any documentation about that.

 Thanks for any help.

On 10/29/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> this is because the value is not posted back to server and it is
> ignored by the browser when submiting the form.
>
> But you can use t:inputText in combination with the attribute
> "disabledOnClientSide" which should be set to true.
>
> This makes sure that the value will be pushed to the form.
>
> regards,
>
> Gerald
>
> On 10/29/06, ken carlino <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have page using inputText in myfaces. It works okay. But when I try
> > to mark the username field to either 'readonly' or 'disabled' equals
> > to 'true'.
> >
> > Like this:
> > > required="true" styleClass="text large" readonly="true">
> >
> >
> >
> > the input field of the page in browser is not-changeable (as
> > expected).  But when i try to do a submit my form, I get this
> > error message 'This username (null) or e-mail address (null) already
> > exists. Please try a different username.'
> >
> >
> > Can you please tell why the username becomes 'null' when I try to
> > submit? If i remove the 'readonly='true'' the submit works (i.e. the
> > username is not null).
> >
> >
> > Thank you for any help.
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



Re: Problem in marking an InputText to 'readonly' and 'disabled'

2006-10-29 Thread ken carlino

Thanks.  Is this '"disabledOnClientSide" a JSF standard attribute (JSF
1.0? 1.1?) ?
or it is a myfaces extension?

I can't find any documentation about that.

Thanks for any help.

On 10/29/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:

Hi,

this is because the value is not posted back to server and it is
ignored by the browser when submiting the form.

But you can use t:inputText in combination with the attribute
"disabledOnClientSide" which should be set to true.

This makes sure that the value will be pushed to the form.

regards,

Gerald

On 10/29/06, ken carlino <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have page using inputText in myfaces. It works okay. But when I try
> to mark the username field to either 'readonly' or 'disabled' equals
> to 'true'.
>
> Like this:
> required="true" styleClass="text large" readonly="true">
>
>
>
> the input field of the page in browser is not-changeable (as
> expected).  But when i try to do a submit my form, I get this
> error message 'This username (null) or e-mail address (null) already
> exists. Please try a different username.'
>
>
> Can you please tell why the username becomes 'null' when I try to
> submit? If i remove the 'readonly='true'' the submit works (i.e. the
> username is not null).
>
>
> Thank you for any help.
>


--
http://www.irian.at

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

Professional Support for Apache MyFaces



Problem in marking an InputText to 'readonly' and 'disabled'

2006-10-29 Thread ken carlino

Hi,

I have page using inputText in myfaces. It works okay. But when I try
to mark the username field to either 'readonly' or 'disabled' equals
to 'true'.

Like this:
  
  
  

the input field of the page in browser is not-changeable (as
expected).  But when i try to do a submit my form, I get this
error message 'This username (null) or e-mail address (null) already
exists. Please try a different username.'


Can you please tell why the username becomes 'null' when I try to
submit? If i remove the 'readonly='true'' the submit works (i.e. the
username is not null).


Thank you for any help.


minor inputHtml oversight

2006-06-22 Thread Ken


Hi,

Must thank you all for great product.  Through Tomahawk 1.1.3 I've
noticed a minor issue with inputHtml.  Tomahawk logs following
error:

- Unable to find resource resource/kupudrawers/kupublank.html for
component inputHtml.InputHtmlRenderer. Check that this file is
available in the classpath in sub-directory /resource of the
package-directory.

In fact, kupublank.html is in the resource directory.  When I copy file to resource/kupudrawers error message goes away.

What is best way for noncommitter such as myself to fix this problem for everyone?

Thanks,
Ken





submit or fix inputHtml bug?

2006-06-21 Thread Ken McArthur

Hi,

Must thank you all for great product.  Through Tomahawk 1.1.3 I've
noticed a minor issue with inputHtml.  Tomahawk logs following
error:

- Unable to find resource resource/kupudrawers/kupublank.html for
component inputHtml.InputHtmlRenderer. Check that this file is
available in the classpath in sub-directory /resource of the
package-directory.

In fact, kupublank.html is in the resource directory.  When I copy file to resource/kupudrawers error message goes away.

What is best way for noncommitter such as myself to fix this problem for everyone?

Thanks,
Ken



jscookmenu nesting h:hiddenInput

2006-05-23 Thread Ken Clark

We are trying to use jscookmenu to add some navigation to our web app...

However, we need to pass some data via an inputHidden tag (for a
request-scope managed bean) so that after the post, the data will be
available.

Our tests show that the h:inputHidden tag is not generated within the
jscookmenu's form.  

Is there any way to do this?

Thanks,
ken clark
--
View this message in context: 
http://www.nabble.com/jscookmenu+nesting+h%3AhiddenInput-t1669456.html#a4524641
Sent from the MyFaces - Users forum at Nabble.com.



Tomahawk 1.1.2 and inputCalendar with Safari

2006-05-16 Thread Ken
inputCalendar worked fine with Safari with myfaces_1.1.1.  Now with MyFaces 1.1.3 / Tomahawk 1.1.2 inputCalendar returns Na/Na/Na.  This is only a problem with Safari; all other browsers I've tested work fine.  Anyone have any ideas?



Re: Tomcat 5.5.16 problem

2006-05-11 Thread Ken McArthur
Try removing a couple of jar files from WEB-INF/lib of the application in webapp.I'm pretty sure one of them is commons-el-1.0.jar. Don't remember the other one but the MyFaces Tomcat configuration help page lists it.
They conflict with what's shipped with Tomcat.  Good luck.On 5/11/06, Garg, Apoorv <[EMAIL PROTECTED]
> wrote:









Hello,


I am trying to integrate a myfaces test app under my current webapp. Initially I thought I had it running but that was because I had the test app sitting under the CATALINA_HOME/webapp folder. I removed it from there, moved the required files around under my own webapp and now I am not able to launch the test app jsp page. 


My guess is that I am missing some configuration value for the web.xml file under my own webapp. I would appreciate the help.

Thanks.

Apoorv Garg.







when is form tag required?

2006-05-11 Thread Ken
Hi,Given commandButton, commandLink, and outputLink all render as html anchors, I only wrapped them with form tags when a form field was required (inputText, selectItem...).  Everything worked fine across multiple browsers in myfaces 
1.1.1.Now with myfaces 1.1.3 and tomahawk 1.1.2, I'm having a difficult time finding consistent behavior.  Does anyone know when the commandButton and commandLink tags require to be in a form (or require a form within it's page) in order to execute its action event?
Thank you all for any insights you may share,Ken


Re: Problem with simple JSF MyFaces deployment

2006-04-19 Thread Ken Clark

Thanks for pointing me in the right direction.

I added jsp-2.0.jar to the WEB-INF/lib and that fixed the problem.

Thanks,
ken
--
View this message in context: 
http://www.nabble.com/Problem-with-simple-JSF-MyFaces-deployment-t1472317.html#a3986692
Sent from the MyFaces - Users forum at Nabble.com.



Problem with simple JSF MyFaces deployment

2006-04-18 Thread Ken Clark

I have built a very simple JSF web app and am having trouble trying to deploy
it.

I am getting an error that I am unable to track down via google.  It is:

   
<[ServletContext(id=17083797,name=SampleW
ar,context-path=/SampleWar)] Root cause of ServletException.
javax.faces.FacesException: javax/servlet/jsp/el/FunctionMapper
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.servlet.ServletException:
javax/servlet/jsp/el/FunctionMapper
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:469)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:322)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
... 13 more

I have a simple .jsp with this tag:


The faces-config contains:

calc
test.CalcBean
session


and the CalcBean class has methods getResult():String and
setResult(String):void

it all seems like it should work, but I get the error above.

I am using the MyFaces 1.1.2 release (core only) and Weblogic 8.1sp4.

It is a bit frustrating that the error that actually occurs does not show up
in the stack trace -- only its getMessage() value
"javax/servlet/jsp/el/FunctionMapper" which doesn't tell me much of
anything.

Any ideas?

Thanks, 
ken clark
--
View this message in context: 
http://www.nabble.com/Problem-with-simple-JSF-MyFaces-deployment-t1472317.html#a3981514
Sent from the MyFaces - Users forum at Nabble.com.



myfaces and Geronimo

2006-03-22 Thread Ken McArthur

I just noticed that Geronimo is not listed under working myFaces Servlet Containers.

I've successfully run myFaces 1.1.1 using Goneronimo 1.0 Tomcat and Jetty distributions.




Re: normal Link

2006-03-07 Thread Ken McArthur
Try something like this:

http://www.domainName.com"
 
title="#{bundle.link_name}"
 
>
  target="myId"
          styleClass="lnk01 borderLeft">
  
 
value="#{bundle.link_name}"/>


where popup01 = 

function popup02(id,width,height) {
  winOptions=eval("'width="+ width
+",height="+height+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no'");
  popup = window.open("",id,winOptions);
  popup.openerFormId = id;
  popup.focus();
}


On 3/7/06, Volker Weber <[EMAIL PROTECTED]> wrote:
Hi Hans,seehttp://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/outputLink.htmlRegards,  Volker
Hans Sowa wrote:> Hi>> I want to add a normal link like http:// to my jsf site. This link> should go to a non-jsf site. The link should be open in a new browser> independent from the browser wich the link was called. How can I do this?
> With a commandLink and if yes where should I add the http link?>> Thanks in advance.>> --> mfg Hans Sowa> mailto:[EMAIL PROTECTED]
>--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 byconcatenating my forename to my senders domain.



Re: javascript function getScrolling()

2006-03-07 Thread Ken McArthur
Great call Jana,
I forgot about that. Thanks for the tip.On 3/7/06, Jana Parvanova <[EMAIL PROTECTED]> wrote:
I think you could change this behaviour by changing   org.apache.myfaces.AUTO_SCROLL  true 
in your web.xml to   org.apache.myfaces.AUTO_SCROLL  false - Original Message -
From: "Ken McArthur" <[EMAIL PROTECTED]>To: "MyFaces Discussion" <users@myfaces.apache.org>Sent: Tuesday, March 07, 2006 5:33 AM
Subject: _javascript_ function getScrolling()Sometimes I'm returning to the same jsp page after executing an action.Page is rebuilt fine but position in browser returns to where I was.  Lookslike culprit is _javascript_ function called getScrolling().
Anyone know how to suppress this _javascript_?I've put  into my body tag but load nowflickers.Page loads positioned at top -> Page scrolls down to getScrolling() position
-> Page returns to top.Any ideas would be greatly appreciated.


javascript function getScrolling()

2006-03-06 Thread Ken McArthur

Sometimes I'm returning to the same jsp page after executing an
action.  Page is rebuilt fine but position in browser returns to
where I was.  Looks like culprit is _javascript_ function called
getScrolling().
Anyone know how to suppress this _javascript_?

I've put  into my body tag but load now flickers.
Page loads positioned at top -> Page scrolls down to getScrolling() position -> Page returns to top.

Any ideas would be greatly appreciated.


Re: problem getting 1.1.1 from svn

2006-01-04 Thread Ken Weiner
Even with that suggested URL,

    svn co http://svn.apache.org/repos/asf/myfaces/legacy/tags/before_maven_reorg/release/tags/1_1_1/

I get the same error:

    Fetching external item into '1_1_1\share'
    svn: URL 'https://svn.apache.org/repos/asf/myfaces/share/tags/1_1_1' doesn't exist

I'm not familiar with the term "externals".  I've always been
confused by the way the MyFaces SVN repository works (how you can't see
the files if you view
http://svn.apache.org/repos/asf/myfaces/legacy/tags/before_maven_reorg/release/tags/1_1_1/
in a web browser) but you can use that URL to check out files).

Anyway, I'll hold off for now until you have a chance to sort things
out after restructuring for Maven.  I'm very much looking forward
to the new Maven 2 build...
On 1/4/06, Sean Schofield <[EMAIL PROTECTED]> wrote:
This is because we renamed the share project to commons.  Even thougheverything is preserved in the legacy folder[1] there are apparentlysome effects we hadn't anticipated.  For now you should be able to getit using the legacy/release folder[2].
This is actually a pretty big mess to clean up.  Maybe we can fix thisby creating externals for the release tags.  I'm still not sure whatto do about all of the other externals for the other tags and branches
...Sean[1] http://svn.apache.org/repos/asf/myfaces/legacy/tags/before_maven_reorg/[2] 
http://svn.apache.org/repos/asf/myfaces/legacy/tags/before_maven_reorg/release/tags/1_1_1/



Re: utf-8 from resource bundle?

2006-01-04 Thread Ken McArthur
Got it working. Thanks a ton.
On 1/4/06, xzuma <[EMAIL PROTECTED]> wrote:
ResourceBundles need to be converted by native2ascii before use. The
ResourceBundle Editor plugin for Eclipse does this conversion
automatically.On 1/4/06, Ken McArthur <
[EMAIL PROTECTED]> wrote:

Hi,

All my pages start with <[EMAIL PROTECTED] pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
and have  in the html head tag.

Output from all database derived unicode characters look fine. 
However, output from resource bundle is garbled.  i.e. "Español"
comes back as "Espa&#195;&#177;ol". 
File check on resource properties file comes back returns UTF-8 Unicode
English text, with very long lines.  Any ideas what I'm doing
wrong or what more I need to add?

Thanks,
Ken







Re: utf-8 from resource bundle?

2006-01-04 Thread Ken McArthur

By the way, I'm using Tomcat 5 where I set URIEncoding="UTF-8" in the Connector tag.
Also have a catch all filter setting.
  request.setCharacterEncoding("utf-8");
  response.setCharacterEncoding("utf-8");

All is good except for display of content from my ResourceBundle.

I'd really appreciate any ideas any one may have.

Thanks,
Ken

On 1/4/06, Ken McArthur <[EMAIL PROTECTED]> wrote:

Hi,

All my pages start with <[EMAIL PROTECTED] pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
and have  in the html head tag.

Output from all database derived unicode characters look fine. 
However, output from resource bundle is garbled.  i.e. "Español"
comes back as "Espa&#195;&#177;ol". 
File check on resource properties file comes back returns UTF-8 Unicode
English text, with very long lines.  Any ideas what I'm doing
wrong or what more I need to add?

Thanks,
Ken





utf-8 from resource bundle?

2006-01-04 Thread Ken McArthur

Hi,

All my pages start with <[EMAIL PROTECTED] pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
and have  in the html head tag.

Output from all database derived unicode characters look fine. 
However, output from resource bundle is garbled.  i.e. "Español"
comes back as "Espa&#195;&#177;ol". 
File check on resource properties file comes back returns UTF-8 Unicode
English text, with very long lines.  Any ideas what I'm doing
wrong or what more I need to add?

Thanks,
Ken



problem getting 1.1.1 from svn

2006-01-03 Thread Ken Weiner
I tried to checkout the MyFaces source tree from SVN using this command:

svn co https://svn.apache.org/repos/asf/myfaces/release/tags/1_1_1/

It was able to get the api and impl subfolders, but when it got to share, I got this error:

Fetching external item into '1_1_1\share'
svn: URL 'https://svn.apache.org/repos/asf/myfaces/share/tags/1_1_1' doesn't exist

Am I using the right technique to obtain the MyFaces 1.1.1 sources from SVN?

-Ken


Re: how can i arrange the style in the t:selectChecManyBox

2005-12-21 Thread Ken Weiner
Could you draw an example of the arrangement of the checkboxes that you're trying to produce?On 12/19/05, Lee YanSong <
[EMAIL PROTECTED]> wrote:Hi all
now i use  to display a list of checkbox, but the style displayed is 
not my wanted. if i want to arrange the width every column, how did i do ?
 
this is my code, but the  
 
 

 




Re: MyFaces Cherokee

2005-12-18 Thread Ken Weiner
Hi Matthias,

Does the book have some good examples of building components that are
based on child components, e.g. a PhoneNumber component with 3
InputText child components?

-KenOn 12/16/05, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
PS: The book is cool, I have read it already ;)On 12/16/05, Nicklas Karlsson <[EMAIL PROTECTED]> wrote:> February 2006 - book release: Pro JSF by Jonas Jacobi and John Fallows
> (Apress); targeted at JSF Component developers



Re: ?

2005-11-18 Thread Ken Weiner
A while ago, I wrote some instructions regarding its use on the MyFaces
wiki: http://wiki.apache.org/myfaces/ConvertBoolean .  I hope that
helps.On 11/18/05, Bruno Aranda <[EMAIL PROTECTED]> wrote:
That component is on the sandbox right now...Regards,Bruno2005/11/18, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]>:> I recall awhile back that someone created a 
> component.  Is this in the current release?  I believe we're using> 1.1.1RC3, but I can't find this component.>> - Brendan



Re: Prevent Firefox from caching..

2005-11-10 Thread Ken Weiner
We use something similar which seems to work fine on Firefox and IE:

no Cache
no-store,no-cache
0

These are taglibs from http://jakarta.apache.org/taglibs/On 11/10/05, Mario Ivankovits <
[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED]
 wrote:>> Does anyone know, how to tell Firefox not to cache pages...> I have implemented a Chart via Jenia and the problem is that, when the> page is display, the chart from the previous request is shown, until I
> press F5>We useresponse.setHeader("Cache-Control", "no-store");response.setHeader("Pragma", "no-cache");And this works.---Mario



Re: ApplicationImpl Configuration Problem

2005-11-09 Thread Ken Weiner
Thanks for the reply, Martin.

I'm not really sure if I understand whether or not they are MyFaces
specific or not.  Some seem to be "standard" as they have
javax.faces in their ID's and come from a file called
standard-faces.config.xml.

These are the converter ID's for which FacesConfigurator tries to set the Converter configuration instance:

javax.faces.convert.BooleanConverter
javax.faces.convert.NumberConverter
javax.faces.convert.BigIntegerConverter
javax.faces.convert.DoubleConverter
org.lmb.faces.converter.bool.BooleanConverter
javax.faces.convert.FloatConverter
javax.faces.convert.IntegerConverter
javax.faces.convert.ByteConverter
org.apache.myfaces.convert.StringArrayConverter
org.apache.myfaces.custom.fileupload.UploadedFileConverter
javax.faces.convert.BigDecimalConverter
javax.faces.convert.ShortConverter
javax.faces.convert.CharacterConverter
javax.faces.convert.LongConverter
javax.faces.convert.DateTimeConverter
Since my Application is not an ApplicationImpl, then FacesConfigurator
doesn't inject the configuration into ApplicationImpl and then when
MyApplication delegates to ApplicationImpl, ApplicationImpl throws a
NullPointerException in this code because it has a registered converter
but not the corresponding configuration:

private Converter internalCreateConverter(Class targetClass) {

   
Converter converter = (Converter) converterClass.newInstance();

   
org.apache.myfaces.config.impl.digester.elements.Converter
converterConfig =
   
(org.apache.myfaces.config.impl.digester.elements.Converter)
   
_converterClassNameToConfigurationMap.get(converterClass.getName());

   
Iterator it = converterConfig.getProperties(); <-- a NPE is thrown
here because converterConfig is null

}

The result is this stack trace.  My application is "SpringApplication":

Caused by: javax.faces.FacesException: Could not instantiate converter: class javax.faces.convert.IntegerConverter
    at org.apache.myfaces.application.ApplicationImpl.internalCreateConverter(ApplicationImpl.java:556)
    at org.apache.myfaces.application.ApplicationImpl.createConverter(ApplicationImpl.java:494)
    at org.lmb.web.jsf.SpringApplication.createConverter(SpringApplication.java:287)
    ... 34 more
Caused by: java.lang.NullPointerException
    at org.apache.myfaces.application.ApplicationImpl.internalCreateConverter(ApplicationImpl.java:534)
    ... 36 more


Does this make sense? Is this a problem, or am I doing something wrong
by writing my own application factory and application and delegating to
the original?

-Ken
On 11/9/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
But this is just additional, MyFaces specific configuration, right?The converters get added alright, they are just not processingadditional stuff in the faces-config file that would be special toMyFaces?
regards,MartinOn 11/9/05, Ken Weiner <[EMAIL PROTECTED]> wrote:> I have a custom ApplicationFactory that wraps the original> ApplicationFactory so that it can produce a custom Application that wraps
> the original Application.  It is configured via faces-config.xml:>>  >  custom.MyApplicationFactory>  
>>  As a result, the FacesConfigurator class is not able to properly configure> all the standard Converters (for Integer, Long, etc) because it relies on> setting instances of> org.apache.myfaces.config.impl.digester.elements.Converter
> on the ApplicationImpl (and my Application is not an instance of> ApplicationImpl):>>  if(application instanceof ApplicationImpl)>  {>  for (Iterator it => _dispenser.getConverterConfigurationByClassName();
> it.hasNext();)>  {>  String converterClassName = (String) it.next();>>  ((ApplicationImpl)> application).addConverterConfiguration(converterClassName,>
> _dispenser.getConverterConfiguration(converterClassName));>  }>  }>>  Therefore this inner block of code is passed over in my environment.  Is> there any way that MyFaces can be changed so that ApplicationImpl does not
> need to know about> org.apache.myfaces.config.impl.digester.elements.Converter> internally?  It would be nice if the FacesConfigurator could configure any> Application without relying on it being an ApplicationImpl.
>>>--http://www.irian.atYour JSF powerhouse -JSF Consulting, Development andCourses in English and GermanProfessional Support for Apache MyFaces



ApplicationImpl Configuration Problem

2005-11-08 Thread Ken Weiner
I have a custom ApplicationFactory that wraps the original
ApplicationFactory so that it can produce a custom Application that
wraps the original Application.  It is configured via
faces-config.xml:


    custom.MyApplicationFactory


As a result, the FacesConfigurator class is not able to properly
configure all the standard Converters (for Integer, Long, etc) because
it relies on setting instances of
org.apache.myfaces.config.impl.digester.elements.Converter on the
ApplicationImpl (and my Application is not an instance of
ApplicationImpl):

if(application instanceof ApplicationImpl)
{
    for (Iterator it = _dispenser.getConverterConfigurationByClassName(); it.hasNext();)
    {
    String converterClassName = (String) it.next();

    ((ApplicationImpl) application).addConverterConfiguration(converterClassName,
    _dispenser.getConverterConfiguration(converterClassName));
    }
}

Therefore this inner block of code is passed over in my
environment.  Is there any way that MyFaces can be changed so that
ApplicationImpl does not need to know about
org.apache.myfaces.config.impl.digester.elements.Converter
internally?  It would be nice if the FacesConfigurator could
configure any Application without relying on it being an
ApplicationImpl.




Re: t:commandLink disableOnUserRole

2005-09-27 Thread Ken
 
Set up your own user role managed bean.  Give it a boolean property and tie it to the rendered attribute of the commandLink.
  
On 9/27/05, Eduardo Leite <[EMAIL PROTECTED]> wrote:

Guys,
 
just to know if I'm not reinventing the wheel...
 
I need a property to tell a commandLink component when it needs to print the 
I need something simpler, just like the disabled property for the commandButton component. Is there anything like this implemented anywhere on MyFaces?
 
Thanks in advance,


Eduardo Bastos Leite
Analista de Sistemas
QuickMind Tecnologia em Conhecimento
http://www.quickmind.com.br
Tel.: +55 21 2524-2956 Ext. 215
Cel.: +55 21 9953-2223
 


Re: Session expired

2005-09-25 Thread Ken

Assuming user logged in with an id, you could save this value as a
property in your managed bean in session scope.  Then, you can see
if session is expired by to checking if this property is null or empty.
On 9/25/05, Dave <[EMAIL PROTECTED]> wrote:
How to identify expired session so that I can show a message to
tell user that session is expired and need to login in again? If I
check if session is null, I can not tell whether the session has
not been created or expired.  All data are kept in session scope,
if a session is expired, all data lost. So I can not tell if the user
has ever logged in. In JSF, what is the best way to do this? Thanks for
help. 
		Yahoo! for Good 
Click here to donate to the Hurricane Katrina relief effort. 




setting headers on the response in JSF

2005-09-15 Thread Ken Weiner
What is the best way to set headers on the HttpResponse to control things such as caching directives?

For example:
response.setHeader("Cache-Control", "no-cache");

Would I need to implement a PhaseListener? Is this done through config
parameters of some kind?  Should I just include a scriptlet in
each JSP page?

-Ken


Re: Boolean converter?

2005-09-15 Thread Ken Weiner
Yes, the issue in JIRA was http://issues.apache.org/jira/browse/MYFACES-451
You can get the source code from the MyFaces sandbox.On 9/14/05, Dennis Byrne <[EMAIL PROTECTED]> wrote:
I think he put it in JIRA. Original message >Date: Wed, 14 Sep 2005 18:00:05 -0500
>From: "CONNER, BRENDAN \(SBCSI\)" <[EMAIL PROTECTED]>>Subject: Boolean converter?>To: "MyFaces Discussion" <
users@myfaces.apache.org>>>I recall from one of the earlier postings that someone haddeveloped a>boolean converter.  Is that available?>>- BrendanDennis Byrne



extentions vs. tomahawk

2005-09-09 Thread Ken

Quick simple question.  Is there really a difference between

<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>

and

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>

Thanks,
Ken


Re: changing the rendering behavior of HtmlSelectManyCheckbox

2005-09-09 Thread Ken Weiner
Thanks.  Does your columns attribute work with page direction and
line direction?  I ended up extending the component as well to
handle a "width" of checkboxes in both directions.  I'll take a
look at your code next week to see if it is similar and if I can
enhance it with both drawing directions if it isn't already done.On 9/7/05, Jan Bols <[EMAIL PROTECTED]> wrote:
I had the same problem and ended up extending the HtmlSelectManyCheckboxcomponent. I added a "columns" attribute where you can specify the number
of columns you want the selectManyCheckbox to use. Like this:layout="pageDirection"columns="2">
You can find the sourcecode on http://sourceforge.net/projects/jsf-comp
but there's also a jar that you can add to WEB-INF/lib directory. The jarfile is found on http://www.ivpv.ugent.be/~jan/myfacessandbox.jar. The jar
file is for use with the nightly version (so not the 1.0.9 version) ofmyfaces dating from 2005-08-15 but with a bit of luck it should also workwith the current nightly version of myfaces.You can find a working example of this on
https://www.ivpv.ugent.be/contact/new.faces?lang=en . Also onhttp://www.ivpv.ugent.be/~jan/selectTest.jsp
 you can find a jsf file toget you started...Hope this helps.JanOn Thu, 01 Sep 2005 22:19:36 +0200, Ken Weiner <[EMAIL PROTECTED]> wrote:
> I need to find a way to render the checkboxes in HtmlSelectManyCheckbox> in a> format other than a single horizontal or vertical row. My first thought> was> to extend HtmlSelectManyCheckbox and make a new attribute called "width"
> and> use this in conjunction with the "layout" attribute as follows:>> > layout="pageDirection" width="3">
> > >> would produce>> [x] [x] [x]> [x] [x] [x]> [x] [x] [x]> [x] [x] [x]
> [x] [x] [x]> [x] [x] [x]> etc.>> and>> > layout="lineDirection" width="3">
> > >> would produce>> [x] [x] [x] [x] [x] [x] etc.> [x] [x] [x] [x] [x] [x]
> [x] [x] [x] [x] [x] [x]>> Is there better way to accomplish this? Should I be thinking about using> SelectItemGroups? I'm ultimately trying to create a 2 X 2 set of> checkboxes.> Thanks!
>> -Ken


Re: h:commandLink with h:dataTable problem

2005-09-06 Thread Ken

Use tomahawks dataTable with preserveDataModel="true".

Sun's RI requires backing bean in dataModel to be in session scope; an
unnecessary cost in many cases.  MyFaces will store your backing
bean in this page only; an awsome extention without cost of making
baking bean session scope!
On 9/6/05, Lou Morin <[EMAIL PROTECTED]> wrote:
Hi,Does anybody know if the following is valid :width="100%">
actionListener="#{teamsManager.teamHomeEvent}">  
  
The backing bean "teamsManager" is in request scope ... the actionListenerin the commandLink within the dataTable does not get invoked. The samecommandLink outside of a dataTable works fine.I am converting my application from struts/tiles to myfaces/tiles ... I was
initially converting it to RI/tiles but, RI had the same problem.Any help would be appreciated.Thanks,Lou


Re: help with JSF life cycle

2005-09-06 Thread Ken

If it helps, I'm certain that actionListeners get called before actionEvents; like one or two phases beforehand.
On 9/6/05, javaone9 <[EMAIL PROTECTED]> wrote:
I am looking at JSF spec. It is not clear to me. If the spec have had some examples/scenarios, it would have been much nicer.
 
Apply Request value Phase:
During the decoding of request values, some components perform special processing, including:


 Components that implement ActionSource (such as 
UICommand), which recognize that they were activated, will queue an ActionEvent. The event will be delivered at the end of 
Apply Request Values phase, or at the end of Invoke Application 
phase, depending upon the state of the immediate property on the activated component.

 Components that implement EditableValueHolder 
(such as UIInput), and whose immediate property is set to 
true, will cause the conversion and validation processing (including the potential to fire ValueChangeEvent 
events) that normally happens during Process Validations phase to occur during 
Apply Request Values phase instead.
If I have  or commandButton that has
immediate=true, the all their action listeners will be executed in
Apply Request Value phase before updating model. IF immediate=false,
all the action listeners will be executed after ACTION(Invoke
application). My understanding of Invoke Application is the action
method binding such as "#{backingBean.submit}". correct?
 
For #2, conversion is updating model data from local data?
IF immedaite=true for , will this update model
data(conversion) before Update Model phase? Any usage for
immediate=true for UIInput? 
 
I am confused with life cycle, and do not have confidence on
coding until this clear up. Thanks for
any ideas/comments.  Joshua Davis <[EMAIL PROTECTED]
> wrote:
> For #2, I don't remember when actionListeners are> executed, but one> quick thing to try would be to use action instead of
> actionListener> and see if it makes any difference. It seems to me> that what you've> posted in your second scenario should work, though.I'm pretty sure actionListener is invoked before
action. This way the event handler (actionListener)can affect the outcome of an action (well... at leastthat's how I'm using it, don't know if that's exactly right).
		 Click here to donate to the Hurricane Katrina relief effort.




saveState vs. inputHidden

2005-09-01 Thread Ken

I agree that saveState is a great asset to MyFaces.  You can store
whole classes between requests and it doesn't have to be nested between
form tags.  Beyond this, does anyone know how it's any different
then inputHidden?



Re: changing the rendering behavior of HtmlSelectManyCheckbox

2005-09-01 Thread Ken Weiner
I just came across the mention of an attribute called "spread" when
reading the tomahawk.tld file.  Is this what I'm looking
for?  Is this "spread" feature implemented yet?  I couldn't
find any use of it within the code.  Could someone describe what
it is for?  Thanks.

    Extends standard selectManyCheckbox by user role support.
   
Additionally this extended selectManyCheckbox accepts a layout attribute
    of value "spread" (see custom checkbox tag).

-KenOn 9/1/05, Ken Weiner <[EMAIL PROTECTED]> wrote:
I need to find a way to render the checkboxes in HtmlSelectManyCheckbox
in a format other than a single horizontal or vertical row.  My
first thought was to extend HtmlSelectManyCheckbox and make a new
attribute called "width" and use this in conjunction with the "layout"
attribute as follows:


    


would produce

[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
etc.

and 



    



would produce

[x] [x] [x] [x] [x] [x]  etc.
[x] [x] [x] [x] [x] [x]
[x] [x] [x] [x] [x] [x]

Is there better way to accomplish this? Should I be thinking about
using SelectItemGroups?  I'm ultimately trying to create a 2 X 2
set of checkboxes.  Thanks!

-Ken




changing the rendering behavior of HtmlSelectManyCheckbox

2005-09-01 Thread Ken Weiner
I need to find a way to render the checkboxes in HtmlSelectManyCheckbox
in a format other than a single horizontal or vertical row.  My
first thought was to extend HtmlSelectManyCheckbox and make a new
attribute called "width" and use this in conjunction with the "layout"
attribute as follows:


    


would produce

[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
[x] [x] [x]
etc.

and 



    



would produce

[x] [x] [x] [x] [x] [x]  etc.
[x] [x] [x] [x] [x] [x]
[x] [x] [x] [x] [x] [x]

Is there better way to accomplish this? Should I be thinking about
using SelectItemGroups?  I'm ultimately trying to create a 2 X 2
set of checkboxes.  Thanks!

-Ken


Re: best way to initialize BackingBean?

2005-08-31 Thread Ken Weiner
I hadn't thought of that.  I guess it would work fine when you
want to specify a converter by ID.  However, it wouldn't work when
JSF looks for a converter by Class, would it?On 8/31/05, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 8/31/05, Ken Weiner <
[EMAIL PROTECTED]> wrote:

The Spring JSF integration I've seen focuses on enabling Spring IoC for
JSF managed beans.  There is a way to enable IoC for JSF
Converters, Validators, and UIComponents too.  I posted
information on the Spring JSF Wiki: http://opensource.atlassian.com/confluence/spring/x/Qgo

I was hoping Spring would incorporate the SpringApplication and
SpringApplicationFactory code in a future release, but there haven't
yet been comments on the Wiki page.

For converters, isn't this already possible out of the box (if you've got the Spring IoC integration with managed beans)?

    

where "myConverter" is a spring bean.  

For validators, you can bind to a validator *method* of some bean that happens to be created via the IoC facility. 


-Ken
Craig





Re: JSF + Spring + Hibernate

2005-08-31 Thread Ken Weiner
The issue I was getting at was that knowing that your app has this lazy
loading capability, you may make different design decisions on what
methods go into your domain objects and what your domain object graph
looks like. I prefer to design the domain object graphs, keeping in
mind that the DAO layer would be responsible for completely loading the
graphs.  So if there are many Employees for a Company and you
don't always want to load the Employees when you load a Company, then I
probably wouldn't put a getEmployees() method on the Company
class.  I guess you could argue that it is okay to add the
getEmployees() method and document it so that sometimes it returns null
and sometimes it doesn't, but that seems undesireable to me.  I'd
rather leave off the method and add an extra method to a DAO that can
fetch the employees for a Company whenever I need them.

-KenOn 8/31/05, Werner Punz <[EMAIL PROTECTED]> wrote:
well OpenSessionInView... is one of those rare circumstances where itactually makes sense, because it eases the portability and implementation...I would not say it reall is dependend on the view layer, more on the
control layer of the server...It is one of those border cases...Larry Meadors wrote:> Heheh, are you suggesting that making your DAO layer depend upon your> view layer is a bad idea?>
> I would have to agree>> Larry>>> On 8/31/05, Ken Weiner <[EMAIL PROTECTED]> wrote:>>>I have a question about designing a webapp to use a DAO layer, lazily loaded
>>objects, Hibernate, and the OpenSessionInView technique.>>>> Doesn't this strategy make it very difficult to reimplement the DAO layer>>sometime in the future?  If you switched a DAO implementation from Hibernate
>>to let's say, Spring JDBC, then how would all the lazy loading work?  There>>would be no equivalent OpenSessionInView technique for Spring JDBC.  For>>this reason, I have been shying away from designing my domain objects such
>>that the rest of the app expects them to lazily load data.>>>> So, instead of a Company class having a getEmployees() method, I would>>choose, instead, to have a CompanyDao.getEmployees
(Company company) method>>that must be called at the point my webapp needs all the Employees for a>>Company.>>>> Have any of you had the same concerns?  Or am I missing how a webapp that
>>relies on lazy-loaded object graphs can change DAO implementations easily?>>>> -Ken>>>>


Re: best way to initialize BackingBean?

2005-08-31 Thread Ken Weiner
The Spring JSF integration I've seen focuses on enabling Spring IoC for
JSF managed beans.  There is a way to enable IoC for JSF
Converters, Validators, and UIComponents too.  I posted
information on the Spring JSF Wiki: http://opensource.atlassian.com/confluence/spring/x/Qgo
I was hoping Spring would incorporate the SpringApplication and
SpringApplicationFactory code in a future release, but there haven't
yet been comments on the Wiki page.

-KenOn 8/31/05, Werner Punz <[EMAIL PROTECTED]> wrote:
I really can recomment, to add the spring JSF integration library to theentire mix of libs in the project, you get many benefits by using springIOC, like integrated AOP mechanisms...WernerEnrique Medina wrote:
> At the moment, the IoC provided by JSF is only about objects and> properties, I'm afraid.>> You'll have to use Spring or another advance IoC container for> constructor dependency injection, etc.
>



Re: JSF + Spring + Hibernate

2005-08-31 Thread Ken Weiner
I have a question about designing a webapp to use a DAO layer, lazily
loaded objects, Hibernate, and the OpenSessionInView technique.

Doesn't this strategy make it very difficult to reimplement the DAO
layer sometime in the future?  If you switched a DAO
implementation from Hibernate to let's say, Spring JDBC, then how would
all the lazy loading work?  There would be no equivalent
OpenSessionInView technique for Spring JDBC.  For this reason, I
have been shying away from designing my domain objects such that the
rest of the app expects them to lazily load data.

So, instead of a Company class having a getEmployees() method, I would
choose, instead, to have a CompanyDao.getEmployees(Company company)
method that must be called at the point my webapp needs all the
Employees for a Company.

Have any of you had the same concerns?  Or am I missing how a
webapp that relies on lazy-loaded object graphs can change DAO
implementations easily?

-Ken


Re: Errors

2005-08-29 Thread Ken Weiner
I think you need to make sure servlet.jar is in your classpath.On 8/29/05, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Hello!I try to implement my own custom compontent. But I get one Error in my 
Tag.java  and one Error for the project.The type javax.servlet.jsp.tagext.Tag cannot be resolved. It is indirectly referenced from required .class filesThe
project was not built since its build path is incomplete. Cannot find
the class file for javax.servlet.jsp.tagext.Tag. Fix the build path
then try building this projectWhats the problem?Thanks shed--Ein Service von http://www.sms.at


Re: x:convertBoolean

2005-08-26 Thread Ken Weiner
Thanks Sean.  I just created
http://issues.apache.org/jira/browse/MYFACES-451 and uploaded my code
and patches in case anyone wants to take a look.  I'm happy to add
more docs and unit tests if required.

On 8/25/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> Looking forward to your contribution.  Dennis is correct in pointing
> out that the patch should be for sandbox.  Feel free to ask around on
> the dev list if you have questions regarding procedure, patching, etc.
> 
> sean


Re: h:commandLink with f:param not working with expired session.

2005-08-26 Thread Ken
FYI, Looks like there's a bug in JSF.  See
http://forum.java.sun.com/thread.jspa?threadID=549675&tstart=0

Hope this helps anyone else who may be running into this problem.


On 8/24/05, Ken <[EMAIL PROTECTED]> wrote:
> I'm attempting to convert working Sun JSF RI application to MyFaces
> containing many h:commandLinks with nested f:param tags.
> 
> For some reason most but not all of my commandLinks no longer execute
> the action method when my session has expired.  I'm not sure why some
> work and others don't anymore with MyFaces.  Can't determine the
> difference but behavior is inconsistent even within the same h:form
> tag.  Instead, framework goes straight back to the same jsp page for
> many of my commandLinks without giving me a chance to do anything in
> the action method.
> 
> I've tried various configurations of the type attribute (button,
> submit).  Tried commandButton.  Also tried various
> org.apache.myfaces.DETECT_JAVASCRIPT and
> org.apache.myfaces.ALLOW_JAVASCRIPT parameter settings in web.xml.
> 
> What am I missing?  Anyone have any ideas why my action methods aren't
> getting called after my session has expired?
> 
> Thanks,
> Ken
>


Re: x:convertBoolean

2005-08-25 Thread Ken Weiner
Ok, great, I will get familiar with the sandbox, change my code to
follow the packages for tomahawk, and submit patches to JIRA.  Looking
forward to participating...

On 8/25/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> Suggestion: Add an issue to JIRA (select "sandbox" as the component
> type.)  This gives committers a chance to shout down any ideas they
> find completely objectionable so you don't waste your time (this is
> not one of those ideas btw.)
> 
> Then provide a SVN patch and we'll add it to sandbox.  Be prepared to
> provide documentation and a simple example (or add to an existing
> simple example) when appropriate.  The docs and examples are now
> required for new tomahawk goodies.
> 
> sean
> 
> On 8/25/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Looks convenient Ken.  Please post your code.  I would like to see it, even
> > if this does not make it to the issue tracker.
> >
> > Dennis Byrne
> >
>


x:convertBoolean

2005-08-25 Thread Ken Weiner
JSF has  and , but nothing I've
seen to convert Booleans to custom values.  Has something like
 already been written by anyone?  I have just
written one and would be willing to contribute it to MyFaces if there
is interest.

It is used like this:


    


-Ken


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken Weiner
I am not sure if this is the best way, but one idea that could work is
to create a PhaseListener that acts after the view is restored.  In
this phase listener, you could check if the view being restored is the
view for which you want to call your backing bean method.  Then, you
could obtain a MessageBinding object for your backing bean expression
and use that to call your method.

Create YourPhaseListener and register it in faces-config.xml:

...

com.yourcompany.YourPhaseListener



public class YourPhaseListener implements PhaseListener {

public void beforePhase(PhaseEvent event) {
// Nothing to do
}

public void afterPhase(PhaseEvent event) {
FacesContext facesContext = event.getFacesContext();
UIViewRoot viewRoot = facesContext.getViewRoot();
String idOfYourPage = ...
if (viewRoot.getId().equals(idOfYourPage)) {
Application application = facesContext.getApplication();
String methodExpression = ...
Class[] params = ...
MethodBinding methodBinding =
application.getMessageBinding(methodExpression, params);
methodBinding.invoke(facesContext, ...);
}

public PhaseId getPhaseId() {
return PhaseId.RESTORE_VIEW;
}

}

Disclaimer: I haven't tried this code so I don't know if it would work
or even compile.

-Ken

On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> Thanks for your response. I guess I didn't make me clear here. My question
> is how to call a method in the backing bean from a JSF page without
> rendering out anything to the screen.


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken
Yes, commandLink and commandButton will render an anchor tag.  If you
don't want to do this you can do work in your properies getter method
when it gets called by outputText value and return an empty string. 
However, I don't believe there is any guarante as to call order. 
Putting your target outputText in the first line of your jsp file
doesn't mean it will get called before other getter methods further
down in the jsp file get called.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> Thanks for your reply, that makes sense. But won't h:commandLink render a
> link and h:commandButton render a button in the page? I don't want to
> display anything on the screen. My purpose is to initiate a call from the
> JSF page to a method in the backing bean when the JSF page loads. I'm
> returning an empty string from the method so nothing gets printed out from
> .
> 
> 
> - Original Message -
> From: "Ken" <[EMAIL PROTECTED]>
> To: "MyFaces Discussion" 
> Sent: Wednesday, August 24, 2005 9:53 PM
> Subject: Re: How to call a method in the backing bean from a JSF page
> 
> 
> > Try h:commandLink or h:commandButton.
> > If your method returns a string that doesn't match any navigation-rule
> > in your faces-confix.xml then the same page you came from will be
> > rendered again.
> >
> >
> > On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> I'm wondering what's the correct way to call a method in the backing bean
> >> from a JSF page. What I tried is to use  >> value="#{theBackingBean.theMethod}" />, the backing bean method returns
> >> an
> >> empty string, so nothing gets printed out in the page. Which works, but I
> >> am
> >> not sure this is the correct way to do it.
> >>
> >> thanks,
> >> Saul
> 
>


Re: How to call a method in the backing bean from a JSF page

2005-08-24 Thread Ken
Try h:commandLink or h:commandButton.
If your method returns a string that doesn't match any navigation-rule
in your faces-confix.xml then the same page you came from will be
rendered again.


On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
>  
> Hi, 
>   
> I'm wondering what's the correct way to call a method in the backing bean
> from a JSF page. What I tried is to use  value="#{theBackingBean.theMethod}" />, the backing bean method returns an
> empty string, so nothing gets printed out in the page. Which works, but I am
> not sure this is the correct way to do it. 
>   
> thanks, 
> Saul


h:commandLink with f:param not working with expired session.

2005-08-24 Thread Ken
I'm attempting to convert working Sun JSF RI application to MyFaces
containing many h:commandLinks with nested f:param tags.

For some reason most but not all of my commandLinks no longer execute
the action method when my session has expired.  I'm not sure why some
work and others don't anymore with MyFaces.  Can't determine the
difference but behavior is inconsistent even within the same h:form
tag.  Instead, framework goes straight back to the same jsp page for
many of my commandLinks without giving me a chance to do anything in
the action method.

I've tried various configurations of the type attribute (button,
submit).  Tried commandButton.  Also tried various
org.apache.myfaces.DETECT_JAVASCRIPT and
org.apache.myfaces.ALLOW_JAVASCRIPT parameter settings in web.xml.

What am I missing?  Anyone have any ideas why my action methods aren't
getting called after my session has expired?

Thanks,
Ken


Re: Questions on required="true" attribute

2005-08-24 Thread Ken Weiner
Thanks so much for pointing out that messages tag.  I was just about
to write something similar because I didn't know about it.  Is it
listed somewhere on the MyFaces website?  I don't see it here:
http://myfaces.apache.org/tomahawk/overview.html

Regarding your comment on it being specific to MyFaces:  Isn't it only
specific to the MyFaces extensions?  In other words, couldn't I use it
with the RI as long as I included the myfaces-extensions-1.0.9.jar and
referenced the taglib?

-Ken

On 8/24/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Use the t:message/t:messages tags, and MyFaces will automatically use
> the label (or the column header if you are in a table) for the field
> identification.
> 
> Bear in mind that this is MyFaces specific!
> 
> regards,
> 
> Martin


Re: confusion on best practices in regard to a VO in BackingBean

2005-08-24 Thread Ken Weiner
I believe Slawek was referring to "Rick Hightower".

On 8/24/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> On 8/24/05, Slawek <[EMAIL PROTECTED]> wrote:
> >  
> > but Rick says in his article that:
> > view is only jsp page, controler is backing bean and model has business
> > logic
> 
>  I take it by article you mean 'e-mail post' ? I don't think I posted any
> comments on JSF architecture since I obviously am just learning it myself. 
>  
>  -- 
>  Rick


Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Ken Weiner
> Trust me ... you don't want to read all the EG threads on that topic
> :-).  But the short answer is, consider what happens in a future
> version of JSF, when (for good reason) a new method signature is added
> to the Renderer API.  If it were an interface, you've just broken
> every current implementation in the world.  As an abstract base class,
> you can add a default implementation that mirrors the previous
> behavior, so the only potential breakage is if an implementation had
> their own version of that very same method signature.

It seems like you could get the best of both worlds with an interface
and an abstract class that implements it.  Since this has been
well-vetted by the EG, I'll accept the reasons it was done without an
interface.

> An actual instance, of course, must be of a concrete class that can be
> instantiated.  But whether that concrete class extends an abstract
> base class, or implements an interface, is irrelevant to how many
> copies there are.  In this particular case, it simply has to be that
> "instanceof Renderer" returns true, since the JSF implementation is
> going to cast it to this before calling its methods.

So, it sounds like the JSF implementation *does* get to choose whether
or not javax.faces.render.Renderer is an abstract class or in
interface since an "instanceof Renderer" check could be done for an
instance of either.  Am I understanding correctly?

> 
> Craig
>


Re: Why not reuse jsf-api.jar from Sun?

2005-08-24 Thread Ken Weiner
Martin, yes, I will file this as an issue in Jira and reference this
email thread.

Craig, thank you so much for your response.  I now understand the
relationship between a java spec and the physical API source code much
better.  You brought up an interesting point about JSF being different
in that there is more executable code than in other frameworks.  What
was the reason that classes like javax.faces.render.Renderer were
defined as abstract classes rather than interfaces?  In Section 8.2,
the spec refers to what an "instance" of Renderer should do.  Does the
word "instance" imply a class rather than interface or is it up to the
implementation?

-Ken

On 8/24/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> Ken,
> 
> can I ask you to file that as a jira-issue?
> 
> If possible, include both yours and Craigs evaluation of the problem
> as comments.
> 
> regards,
> 
> Martin
> 
> On 8/24/05, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> > On 8/23/05, Ken Weiner <[EMAIL PROTECTED]> wrote:
> > > Thanks for the replies.  Do other specs from JCP behave this way?
> >
> > Yes, they *all* do.  An implementation of a JCP spec is required to
> > provide the javax.foo classes, as well as whatever implementation
> > classes they require to conform to the spec requirements.  The primary
> > difference for JSF is there is relatively more executable code in the
> > javax.faces classes, rather than just specifying APIs.  But the
> > compatibility test that MyFaces will be required to pass include
> > signature tests that ensure any given implementation implements
> > *exactly* the set of public and protected methods (and variables if
> > any) as is required by the spec.
> >
> > > don't remember ever seeing another situation where there are multiple
> > > versions of the same exact (same fully-qualified name) class.
> >
> > Question -- where do you get your definition of javax.servlet.Servlet
> > when you compile your webapp?  Answer ... that is totally up to the
> > server implementation you are using -- they do *not* all necessarily
> > share the same physical source code (although such sharing is not
> > uncommon either -- lots of app server vendors use the same
> > javax.servlet classes that Tomcat does, for example, because they are
> > available under the Apache license).
> >
> > The same principle applies to all of the JCP specs.
> >
> > > Here is an example of how my component would break if I switched
> > > implementations:
> > >
> > > Let's say I am coding a component that has children components.  My
> > > component extends javax.faces.render.Renderer.  If I am using the RI,
> > > I may be tempted to accept (not override) the implementation of
> > > Renderer.encodeChildren() which simply iterates thought the children
> > > and renders them as follows:
> > >
> > > public void encodeChildren(FacesContext context, UIComponent 
> > > component)
> > > throws IOException {
> > > if (context == null || component == null) {
> > > throw new NullPointerException();
> > > }
> > > Iterator kids = component.getChildren().iterator();
> > > while (kids.hasNext()) {
> > > UIComponent kid = (UIComponent) kids.next();
> > > kid.encodeBegin(context);
> > > if (kid.getRendersChildren()) {
> > > kid.encodeChildren(context);
> > > }
> > > kid.encodeEnd(context);
> > > }
> > > }
> > >
> > > Now if I switch to MyFaces, none of my children would render because
> > > the MyFaces version of javax.faces.render.Renderer.encodeChildren()
> > > does not render the children.  It looks like this:
> > >
> > > public void encodeChildren(FacesContext context,  UIComponent 
> > > component)
> > > throws IOException
> > > {
> > > if (context == null) throw new NullPointerException("context");
> > > if (component == null) throw new 
> > > NullPointerException("component");
> > > }
> > >
> > > So if I understand things correctly, my component would essentially
> > > break because none of its children would render with MyFaces.  Does
> > > that make sense?
> > >
> >
> > There are a couple bunch of overlapping questions here.
> >
> > * Does the spec require a particular behavior of this method?  If

Re: Why not reuse jsf-api.jar from Sun?

2005-08-23 Thread Ken Weiner
Thanks for the replies.  Do other specs from JCP behave this way?  I
don't remember ever seeing another situation where there are multiple
versions of the same exact (same fully-qualified name) class.

Here is an example of how my component would break if I switched
implementations:

Let's say I am coding a component that has children components.  My
component extends javax.faces.render.Renderer.  If I am using the RI,
I may be tempted to accept (not override) the implementation of
Renderer.encodeChildren() which simply iterates thought the children
and renders them as follows:

public void encodeChildren(FacesContext context, UIComponent component)
throws IOException {
if (context == null || component == null) {
throw new NullPointerException();
}
Iterator kids = component.getChildren().iterator();
while (kids.hasNext()) {
UIComponent kid = (UIComponent) kids.next();
kid.encodeBegin(context);
if (kid.getRendersChildren()) {
kid.encodeChildren(context);
}
kid.encodeEnd(context);
}
}

Now if I switch to MyFaces, none of my children would render because
the MyFaces version of javax.faces.render.Renderer.encodeChildren()
does not render the children.  It looks like this:

public void encodeChildren(FacesContext context,  UIComponent component)
throws IOException
{
if (context == null) throw new NullPointerException("context");
if (component == null) throw new NullPointerException("component");
}

So if I understand things correctly, my component would essentially
break because none of its children would render with MyFaces.  Does
that make sense?

I realize I could override the encodeChildren() method to be safe, but
don't you agree that it would be easy for someone to fall into a trap?
 Maybe, in this case, one of the implementations is not adhering to
the spec.

-Ken

On 8/23/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> > The way it is now, if I were to write my own, let's say
> > MyAbstractRenderer, and I extend javax.faces.render.Renderer, then my
> > components could break if I switch between the RI and MyFaces.  I hope
> > someone can help me understand the nature of the JSF spec, API
> > classes, and various implementations.  Thanks.
> 
> This shouldn't be the case.  The JSF spec carefully defines not only
> the method signatures but the anticipated effects of these methods.
> Both implementations should be interchangeable.
> 
> > -Ken
> 
> sean
>


Why not reuse jsf-api.jar from Sun?

2005-08-23 Thread Ken Weiner
I am confused about the nature of the javax.faces sources that are
included in the MyFaces jar file.  They appear to have been written as
part of the MyFaces project.  Sun includes alternative versions of the
javax.faces classes in its RI distribution, placing those classes in a
seperate jar file: jsf-api.jar.  Why doesn't MyFaces reuse the
jsf-api.jar from Sun?  Shouldn't there only be one version of the API
classes, with Sun RI, MyFaces, and other supplying only the "impl" of
the API?

The way it is now, if I were to write my own, let's say
MyAbstractRenderer, and I extend javax.faces.render.Renderer, then my
components could break if I switch between the RI and MyFaces.  I hope
someone can help me understand the nature of the JSF spec, API
classes, and various implementations.  Thanks.

-Ken