Re: [Orchestra] Explicit conversation starting and nested conversations

2008-04-01 Thread Bernhard Huemer

Hello,

although Orchestra is not about pages, it's most likely that the user 
moves through two different page flows if he has started two different 
conversations (I'm not talking about two different instances of the same 
conversation but rather about two different definitions for a 
conversation!). However, there are certain cases where one page flow 
overlaps another one but Orchestra doesn't support reusing these pages 
as they would use a different conversation.


The problem is that while it's true that you can use different instances 
of the same class in different conversations, it's not that easy as each 
instance has to have a different name (as you want it to be in a 
different conversation). Changing the name, however, forces you to 
copy the pages using this bean in order to adjust the ValueExpressions.


Maybe I've got something wrong though ..

Regards,
Bernhard

On 04/01/2008 +0200,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

a clem schrieb:

Thank's a lot for your response. What I would like to do is to be able
to share a page (ant its backing bean) between 2 conversations types,
like an activity définition can be shared between 2 process definition
in BPM. For exemple, the select customer page can be shared between
the 'send mail' and 'send invoice' use cases. I think I'm going to
hack the source to see how I can achieve this.

Regards,

On Mon, Mar 31, 2008 at 11:18 PM, simon [EMAIL PROTECTED] wrote:
  

Hi,


 On Mon, 2008-03-31 at 22:36 +0200, a clem wrote:
  Hi,
 
  I'm currently playing with this great framework Orchestra, trying to
  build some small examples and a few questions came to my mind:
  Is it possible to start a new conversation explicitly
  (programitically). I've looked to the API but there doesn't seem to be
  something like a begin or start method in it?

 Well, there are two answers to this :-)

 (1)

 If you configure a bean A in Spring to inject some other bean B that is
 configured in a conversation scope, then what is actually injected is a
 proxy. The bean B isn't actually created, and the conversation is not
 created to hold it (though the conversation might already exist if there
 are multiple beans in the same conversation).

 Then if A invokes any method on B, that triggers the creation of an
 actual instance of B plus the conversation to hold it (if the
 conversation does not yet exist).

 So I guess you could call that programmatic creation of a
 conversation; whether B is in the conversation or not is controlled by
 what A does.

 (2)
 But if you mean actually creating a Conversation object then placing
 objects in it, then no I don't think that is currently possible (or at
 least not easy).

 In theory there is no reason why Orchestra couldn't support that, I just
 think we didn't consider it useful. If there is a good use case then I'm
 sure that could be added.

 The principle is simple: create a Conversation object then get a
 reference to the current ConversationContext and add it. But the problem
 is that there are a bunch of settings that a conversation can have which
 are defined by a ConversationFactory (which is a mandatory parameter to
 the Conversation constructor at the moment). This factory is really
 expected to be a Spring scope manager object or similar; I don't know if
 it is possible to look this up nicely, or whether it is actually needed
 for manually-created conversations. But the settings would need to be
 defined somewhere.

 Method ConversationManager.getConversation(name) will return
 conversations by name, but returns null if the conversation does not
 exist; I don't think there is a way of forcing it to exist.

 Note that a bean which is *already* in a conversation can add extra
 objects to its own conversation via Conversation.setAttribute.


  Can the same backing bean belong to more that one conversation type?
  In other world can I share a view between multiples conversations? It
  seem's that backing beans can only have one conversation name.

 No, a bean is expected to be in only one conversation. I think things
 would get quite confusing otherwise. For a start, if persistence is
 being used with conversations, then a bean could have two persistence
 contexts associated with it simultaneously which would be tricky :-)

 A bean in one conversation can quite happily call a bean in another
 conversation of course (orchestra conversations are not like WebFlow or
 Seam conversations).

 What would the use case be for this?


   And
  finally, is it possible to have nested conversation contexts? Thank's
  for all your coming responses! :)

 No, but that feature is definitely on the to-do list.

 Orchestra does support multiple concurrent named conversations, as I'm
 sure you're aware. That solves many of the use-cases for nested
 conversations but not all of them.

 Good questions - I should put these on the Orchestra wiki FAQ page.
 Unless perhaps you would be willing to do that?

 Regards,
 Simon


You can have two 

Re: [Orchestra] Explicit conversation starting and nested conversations

2008-04-01 Thread Bernhard Huemer

Hello,

In fact, I think that this problem occurs not only when you'd like to 
reuse certain pages but also when you'd like to reuse certain beans. If 
you're injecting conversation-scoped beans you're actually injecting a 
bean being tied to a specific conversation (i.e. you'd also have to copy 
bean definitions just referencing conversation-scoped beans, not only 
pages!). In my opinion that's a major impact in the architecture of 
Orchestra applications!


Regards,
Bernhard

On 04/01/2008 +0200,
Mario Ivankovits [EMAIL PROTECTED] wrote:

Hi!

Just to be clear, what you're saying is that you can't use the same view in
more than one conversation at a time?
  

At the moment: yes!
As I wrote, this is something we will allow in the near future, but it
would require to have a page-flow configuration.
Hmmm  probably the new refactored conversationContext will allow it
programmatically too, not sure yet.

Anyway, I wonder why this is such an important feature ... As I wrote, I
think most cases can work with nested-conversation-emulation (tm ;-) )
and that will be much better in terms of memory usage - and also lowers
the chance to work with stale objects if these conversations are bound
to a persistence context.

Can you please outline some use-cases so we can put them in
consideration about how to solve that?

Ciao,
Mario






Re: Portlet Environment and Orchestra

2008-02-06 Thread Bernhard Huemer

Hello,

Many portals - at least those I know - dispatch calls to portlets by 
retrieving a RequestDispatcher and then they just call include(). 
However, I've already heard quite a few times that Servlet Filters don't 
work in Liferay regardless of the dispatcher methods being configured 
(i.e. Liferay implements calls to portlets somehow else).


Nevertheless you could use a DispatcherPortlet as it enables you to 
specify Handler Interceptors (i.e something similiar to Portlet Filters).


regards,
Bernhard

On 02/04/2008 +0100,
markus.g [EMAIL PROTECTED] wrote:

Hi all,

currently we're prototyping a portlet application (liferay 4.33)  with
orchestra , JPA (Hibernate) and myFaces 1.1.5. In a pure servlet container
(tomcat 5.5)  everything works fine. In the portlet environment, the
conversation manager throws a NullPointerException. 


Caused by: java.lang.NullPointerException
at
org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(ConversationManager.java:90)
at
org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(ConversationManager.java:76)
at
org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope.getBean(AbstractSpringOrchestraScope.java:125)
at
org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope.get(AbstractSpringOrchestraScope.java:117)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:285)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:661)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:611)
at
de.seat.mitarbeiterinfo.view.mitarbeiterlist$$EnhancerByCGLIB$$4f90561b.getMitarbeiterListModel(generated)
... 125 more

Has anybody a solution for this problem?

Is it actually possible to run orchestra in a portlet environment?

thanks,
Markus






Re: Myfaces-1.2.1-snapshot: Spring injected bean not available in @PostContruct method

2008-01-18 Thread Bernhard Huemer

Hello,

most probably he's injecting the Spring bean using managed-properties, 
i.e. I think his managed bean definition looks like the following:


managed-bean
  managed-bean-name.../managed-bean-name
  ...

  managed-property
property-namedataService/property-name
value#{dataService}/value
  /managed-property
/managed-bean

However, there's a bug in MyFaces as it calls methods being annotated 
with @PostConstruct before all properties have been injected. I have 
already created a JIRA Issue, but I haven't got the time to fix this bug 
so far. Therefore I'd recommend you to define alle your beans in Spring 
directly, just as Gerhard has already mentioned.


regards,
Bernhard

On 01/18/2008 +0100,
Gerald Müllan [EMAIL PROTECTED] wrote:

Hi,

Do you have the managed bean in faces-config.xml defined oder via
spring configuration file?
MyFaces should not be responsible for injecting a spring bean. This is
done when using Spring beans only.

I would suggest to define it directly in Spring an use Spring`s
init-method approach.

cheers,

Gerald

On Jan 17, 2008 10:11 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:



In my managed bean, I have a service bean configured and injected by spring
as in the following,

private DataService dataService;

@PostConstruct
public void retrieveData() {
dataService.retrieveData();
}

Public void setDataService(DataService dataService) {
this.dataService = dataService;
}

Using RI, dataService is already injected before retrieveData method is
called. However, this is not the case with myfaces. It seems that spring
injection happens much later resulting in NPE thrown in the method. Is this
expected with myfaces inplementation or a bug?





Re: access to error messages attributes with unitfied EL

2008-01-02 Thread Bernhard Huemer

Hello,

actually there are two different implicit objects dealing with the 
current request: request and requestScope.


request - externalContext.getRequest();
requestScope - externalContext.getRequestMap();

Accordingly, it should work using the following expression: 
#{requestScope['javax..servlet.error.message']}


regards,
Bernhard Huemer

On 12/27/2007 +0100,
Wolf Benz [EMAIL PROTECTED] wrote:

Hi all,

I know that, within a JSP page, you have access to information about the 
exception that occurred under several request attribute keys:


javax.servlet.error.exception -- the actual exception itself
javax.servlet.error.status_code -- the HTTP status code (as a 
java.lang.Integer)
javax.servlet.error.exception_type -- the Class of the exception 
that was thrown
javax.servlet.error.message -- the message string from the exception 
that was thrown
javax.servlet.error.request_uri -- the request URI of the incoming 
request
javax.servlet.error.servlet_name -- the name of the servlet 
processing the request


But if you use JSF  facelets, other than using code in a bean doing 
stuff like:

requestMap.get(javax.servlet.error.message);
, is there a way to access them in the pag itself using the unified EL?

What I've already tried, is:

- I tried in y JSF page: #{request.javax.servlet.error.message}, but got 
this error:
/resources/pages/fileNotFound.xhtml: Property 'javax' not found on type 
org.apache.catalina.core.ApplicationHttpRequest


- I cut out the javax... to no avail.

- I've then tried: #{request['javax.servlet.error.message']}

All failed.
Ideas?

--Wolf










Re: build Tomahawk error using mvn

2007-11-10 Thread Bernhard Huemer

Hello,

I guess you've only checked out the core. Use the following directry 
instead: http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/


regards,
Bernhard

On 11/10/2007 +0100,
Dave [EMAIL PROTECTED] wrote:
I checked out the latest Tomahawk source code, and tried to build it. 
But I got the following error using maven. Thanks for help.
 
C:\tomahawkmvn install


[INFO] Scanning for projects...
[INFO] 


[ERROR] FATAL ERROR
[INFO] 


[INFO] Error building POM (may not be this project's POM).

Project ID: org.apache.myfaces.tomahawk:tomahawk:jar:null
Reason: Cannot find parent: org.apache.myfaces.tomahawk:tomahawk-project 
for project: org.apache.myfaces.tomahawk:tomaha

wk:jar:null for project org.apache.myfaces.tomahawk:tomahawk:jar:null

[INFO] 


[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: 
org.apache.myfaces.tomahawk:tomahawk-project for p
roject: org.apache.myfaces.tomahawk:tomahawk:jar:null for project 
org.apache.myfaces.tomahawk:tomahawk:jar:null

at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot 
find parent: org.apache.myfaces.tomahawk:tomahawk-project for project: 
org.apache.myfaces.tomahawk:tomahawk:jar:null for project 
org.apache.myfaces.tomahawk:tomahawk:jar:null


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





Re: JBoss 4.2.2 and MyFaces

2007-11-10 Thread Bernhard Huemer

Hello,

sounds like a classloader issue as you're still using the JSF RI, at 
least according to the error message (FacesContext not found - MyFaces 
vs. Cannot find FacesContext - JSF RI; and of course the line numbers 
don't match).


regards,
Bernhard

On 11/10/2007 +0100,
Dave [EMAIL PROTECTED] wrote:
I upgraded to JBoss 4.2.2 GA from 4.0.5. and followed the following 
instruction to use MyFaces core instead of the built-in JSF ri.

http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5AndMyFaces
 
But I got the RuntimeException: can not find FacesContext
 
java.lang.RuntimeException: Cannot find FacesContext
at 
javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1796)
at 
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1613)
at 
org.apache.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:152)

at org.apache.jsp.index_jsp._jspService(index_jsp.java:120)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
 
 
Thanks for help.


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





Re: myfaces 1.2.0 postConstruct

2007-11-07 Thread Bernhard Huemer
I didn't even notice that you've said you're using Tomcat 5 but that 
doesn't matter anyway as I've used Tomcat 6 to reproduce the bug.


regards,
Bernhard

On 11/07/2007 +0100,
kace [EMAIL PROTECTED] wrote:

Sorry I meant to write tomcat 6.  I tried in jetty 6.1.5 and i get the error
stated in previous post and in tomcat 6 the page loads up but without
loading the data from ?id=2

..kace



Bernhard Huemer-2 wrote:

Hello,

this behaviour is definitely wrong. Hopefully you don't mind that I've 
created an according JIRA issue for you ;-)


https://issues.apache.org/jira/browse/MYFACES-1761

regards,
Bernhard

On 11/06/2007 +0100,
kace [EMAIL PROTECTED] wrote:
Hi, 


I am using myfaces 1.2.0 with facelets and tomahawk 1.1.6 on tomcat 5.  I
have added this dependency 
dependency

groupIdjavax.annotation/groupId
artifactIdjsr250-api/artifactId
version1.0/version
/dependency

faces-config has this:

managed-bean
managed-bean-nameretailForm/managed-bean-name
   
managed-bean-classcom.mobileanarchy.vantage.webapp.action.RetailForm/managed-bean-class

managed-bean-scoperequest/managed-bean-scope
managed-property
property-nameid/property-name
value#{param.id}/value
/managed-property
managed-property
property-nameretailManager/property-name
value#{retailManager}/value
/managed-property
/managed-bean

and in my bean I setRetailManager

public void setRetailManager(RetailManager retailManager) {
this.retailManager = retailManager;
}

@PostConstruct
public void findRetail() {
   this.retail = retailManager.getRetailShop(id);
}
}

but when I try to access the page via /retailDetail.xhtml?id=2

it gives me the following error (see below).  it gives me a
nullpointerException at retailManager.  How do I make sure this is
instantiated before findRetail gets callled?  


Any help would be appreciated..

..kace




javax.faces.FacesException: java.lang.reflect.InvocationTargetException
at
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:140)
at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:196)
at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:162)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(FacesCompositeELResolver.java:46)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(FacesCompositeELResolver.java:108)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(FacesCompositeELResolver.java:148)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:104)
at
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:61)
at
org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:108)
at
org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:93)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(FacesCompositeELResolver.java:46)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(FacesCompositeELResolver.java:108)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(FacesCompositeELResolver.java:148)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:104)
at
com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
at com.sun.el.parser.AstNot.getValue(AstNot.java:59)
at
com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at
javax.faces.component._ComponentUtils.getExpressionValue(_ComponentUtils.java:233)
at
javax.faces.component.UIComponentBase.getExpressionValue(UIComponentBase.java:1069)
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1089)
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:232)
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:247)
at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:247)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
at
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101

Re: myfaces 1.2.0 postConstruct

2007-11-06 Thread Bernhard Huemer

Hello,

this behaviour is definitely wrong. Hopefully you don't mind that I've 
created an according JIRA issue for you ;-)


https://issues.apache.org/jira/browse/MYFACES-1761

regards,
Bernhard

On 11/06/2007 +0100,
kace [EMAIL PROTECTED] wrote:
Hi, 


I am using myfaces 1.2.0 with facelets and tomahawk 1.1.6 on tomcat 5.  I
have added this dependency 
dependency

groupIdjavax.annotation/groupId
artifactIdjsr250-api/artifactId
version1.0/version
/dependency

faces-config has this:

managed-bean
managed-bean-nameretailForm/managed-bean-name
   
managed-bean-classcom.mobileanarchy.vantage.webapp.action.RetailForm/managed-bean-class

managed-bean-scoperequest/managed-bean-scope
managed-property
property-nameid/property-name
value#{param.id}/value
/managed-property
managed-property
property-nameretailManager/property-name
value#{retailManager}/value
/managed-property
/managed-bean

and in my bean I setRetailManager

public void setRetailManager(RetailManager retailManager) {
this.retailManager = retailManager;
}

@PostConstruct
public void findRetail() {
   this.retail = retailManager.getRetailShop(id);
}
}

but when I try to access the page via /retailDetail.xhtml?id=2

it gives me the following error (see below).  it gives me a
nullpointerException at retailManager.  How do I make sure this is
instantiated before findRetail gets callled?  


Any help would be appreciated..

..kace




javax.faces.FacesException: java.lang.reflect.InvocationTargetException
at
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:140)
at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:196)
at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:162)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(FacesCompositeELResolver.java:46)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(FacesCompositeELResolver.java:108)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(FacesCompositeELResolver.java:148)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:104)
at
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:61)
at
org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:108)
at
org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:93)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.access$301(FacesCompositeELResolver.java:46)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver$4.invoke(FacesCompositeELResolver.java:108)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.invoke(FacesCompositeELResolver.java:148)
at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:104)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
at com.sun.el.parser.AstNot.getValue(AstNot.java:59)
at
com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at
javax.faces.component._ComponentUtils.getExpressionValue(_ComponentUtils.java:233)
at
javax.faces.component.UIComponentBase.getExpressionValue(UIComponentBase.java:1069)
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1089)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:232)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:247)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:247)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
at
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at

Re: Myfaces/Tomahawk on IBM WebSphere Portal Server 6

2007-10-23 Thread Bernhard Huemer

Hello,

I can't access the project at the moment, but the configuration is 
rather simple anyway. Due to the exception you've reported on this 
mailing list, I assume you're not using a Portlet Bridge? However, I've 
been using the Pluto Portal Bridge 
(http://portals.apache.org/bridges/multiproject/portals-bridges-jsf/index.html).

There's also a sample JSF portlet available!

You could also use the JSR-301 Portlet Bridge.

regards,
Bernhard

On 10/23/2007 +0200,
[EMAIL PROTECTED] wrote:


Hello Bernhard

Few weeks back , you mentioned that  you got Myfaces successfully 
running on WebspherePortal 6 .  Can you please send me a relavent 
snippet of your portlet.xml  web.xml , where you configure MyFaces 
related parameters.


I am getting distorted pages  null pointers when I switch between 
portlets .  Earlier I thought it was because of duplicate clientId in 
tomhawk datascroller .So, I got rid of it  . Duplicate clientid issue is 
gone , but the Null pointers are still there which I am guessing causing 
distorted pages.


With the portlet  web.xml , I just want to verify , if i have 
configured things correctly .


Thanks
Shipra



*Bernhard Huemer [EMAIL PROTECTED]*

10/04/2007 01:58 PM
Please respond to
MyFaces Discussion users@myfaces.apache.org



To
MyFaces Discussion users@myfaces.apache.org
cc

Subject
Re: Myfaces/Tomahawk on IBM WebSphere Portal Server 6








Hello,

which version of MyFaces and which portlet bridge are you using? I'm
just asking as I didn't face those exceptions. Perhaps, if I've got time
left on the weekend, I'll create an example project (sort of archetype
project).

regards,
Bernhard

On 10/04/2007 +0200,
[EMAIL PROTECTED] wrote:
 
  We had tough time . Then finally we had to hack My Faces ( with help of
  IBM consultant ) to make it somewhat work .  Of particular note IBM
  support is useless . You have to pay them to get a consultant.
 
  Still getting duplicate clientId exceptions , due to which page renders
  incorrectly when visited again in same session .
 
  What stage are you at ? What is the error you are getting?
 
  If someone have any solution to this , please let us know.
 
  Shipra Jain
 
 
 
  *[EMAIL PROTECTED]*
 
  10/04/2007 09:36 AM
  Please respond to
  MyFaces Discussion users@myfaces.apache.org
 
 
   
  To

   users@myfaces.apache.org
  cc
   
  Subject

   Myfaces/Tomahawk on IBM WebSphere Portal Server 6
 
 
   
 

 
 
 
 
  Hi, is there any one have used successfully Myfaces/Tomahawk on IBM
  WebSphere Portal Server 6?
   
  Regards

  Mario Buonopane
   
 

  This message is for the designated recipient only and may contain
  privileged, proprietary, or otherwise private information. If you have
  received it in error, please notify the sender immediately and delete
  the original. Any other use of the email by you is prohibited.
 






Re: Myfaces/Tomahawk on IBM WebSphere Portal Server 6

2007-10-04 Thread Bernhard Huemer

Hello,

which version of MyFaces and which portlet bridge are you using? I'm 
just asking as I didn't face those exceptions. Perhaps, if I've got time 
left on the weekend, I'll create an example project (sort of archetype 
project).


regards,
Bernhard

On 10/04/2007 +0200,
[EMAIL PROTECTED] wrote:


We had tough time . Then finally we had to hack My Faces ( with help of 
IBM consultant ) to make it somewhat work .  Of particular note IBM 
support is useless . You have to pay them to get a consultant.


Still getting duplicate clientId exceptions , due to which page renders 
incorrectly when visited again in same session .


What stage are you at ? What is the error you are getting?

If someone have any solution to this , please let us know.

Shipra Jain



*[EMAIL PROTECTED]*

10/04/2007 09:36 AM
Please respond to
MyFaces Discussion users@myfaces.apache.org



To
users@myfaces.apache.org
cc

Subject
Myfaces/Tomahawk on IBM WebSphere Portal Server 6








Hi, is there any one have used successfully Myfaces/Tomahawk on IBM 
WebSphere Portal Server 6?
 
Regards

Mario Buonopane
 

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you have 
received it in error, please notify the sender immediately and delete 
the original. Any other use of the email by you is prohibited.






Re: Myfaces/Tomahawk on IBM WebSphere Portal Server 6

2007-10-04 Thread Bernhard Huemer

Hello,

I don't know the fixpack being used in the production system, but I've 
developed the application using WebSphere Portal Server Express 6.0 
without any additional fixpacks.


Moreover I didn't use Tomahawk, but I'll try to include it in the 
example anyway.


regards,
Bernhard

On 10/04/2007 +0200,
[EMAIL PROTECTED] wrote:


We are using following

MyFaces version  1.1.5

Tomhawk version 1.1.5

Portlet class  -  org.apache.myfaces.portlet.MyFacesGenericPortlet

So are you saying you have a MyFaces/Tomhawk application that is running 
without any issues on Websphere Portal 6 ?


What exact portal 6 fixpack are you using ? We initially were not even 
able to install the app on Websphere . Then the consultant came in  
upgraded our fixpack . That resolved half the problem , then we found 
out the tomhawk java script is not working . For that he made a hack in 
StreamingAddResource class to get the javascript working . Now , our 
next problem is this duplicate client id  issue .


It would be very nice of you if you can send in a example application 
for Websphere Portal 6 using Myfaces/Tomahawk . Please include a tag 
using javascript , example t:inputCalendar   or t:popup


Thanks
Shipra Jain



*Bernhard Huemer [EMAIL PROTECTED]*

10/04/2007 01:58 PM
Please respond to
MyFaces Discussion users@myfaces.apache.org



To
MyFaces Discussion users@myfaces.apache.org
cc

Subject
Re: Myfaces/Tomahawk on IBM WebSphere Portal Server 6








Hello,

which version of MyFaces and which portlet bridge are you using? I'm
just asking as I didn't face those exceptions. Perhaps, if I've got time
left on the weekend, I'll create an example project (sort of archetype
project).

regards,
Bernhard

On 10/04/2007 +0200,
[EMAIL PROTECTED] wrote:
 
  We had tough time . Then finally we had to hack My Faces ( with help of
  IBM consultant ) to make it somewhat work .  Of particular note IBM
  support is useless . You have to pay them to get a consultant.
 
  Still getting duplicate clientId exceptions , due to which page renders
  incorrectly when visited again in same session .
 
  What stage are you at ? What is the error you are getting?
 
  If someone have any solution to this , please let us know.
 
  Shipra Jain
 
 
 
  *[EMAIL PROTECTED]*
 
  10/04/2007 09:36 AM
  Please respond to
  MyFaces Discussion users@myfaces.apache.org
 
 
   
  To

   users@myfaces.apache.org
  cc
   
  Subject

   Myfaces/Tomahawk on IBM WebSphere Portal Server 6
 
 
   
 

 
 
 
 
  Hi, is there any one have used successfully Myfaces/Tomahawk on IBM
  WebSphere Portal Server 6?
   
  Regards

  Mario Buonopane
   
 

  This message is for the designated recipient only and may contain
  privileged, proprietary, or otherwise private information. If you have
  received it in error, please notify the sender immediately and delete
  the original. Any other use of the email by you is prohibited.
 






Re: Events are fired twice for unknown reasons

2007-09-03 Thread Bernhard Huemer

Hello,

You could use Facelets as it doesn't use the JSP TagHandler classes of 
MyFaces, though I haven't tried yet. At least I can't remember facing 
this issue when using Facelets. By the way, here is the bug report: 
http://issues.apache.org/jira/browse/MYFACES-1712


regards,
Bernhard

Fan Shao wrote:

Thanks Bernhard,

from a user's view, what's the impact to JSF applications of this issue? And
in what cases this problem can be reproduced? Is there anyway that I can
mitigate it if brings about any problem before this issue is fixed? 




Fan



Bernhard Huemer-2 wrote:
  

Hello,

I've encountered the same problem recently and I've also figured out the 
reason. It's because the method setProperties() is called twice. Usually 
you wouldn't notice this behaviour as most properties just will be 
overridden but that's not the case for a ValueChangeListener (or an 
ActionListener). For a better understanding of this issue, I'll describe 
the call hierachy (somewhat simplified):


///
// 
myfaces/core/branches/1_2_1/api/javax/faces/webapp/UIComponentClassicTagBase.java


protected UIComponent findComponent(FacesContext context)
{
// ...
// around line 1097

_componentInstance = findComponent(parent,id);
if (_componentInstance == null)
{
_componentInstance = createComponent(context, id);
_created = true;
setProperties(_componentInstance); //  here is the 
first call

// 

\\\

///
//
myfaces/core/branches/1_2_1/api/javax/faces/webapp/UIComponentELTag.java

protected UIComponent createComponent(FacesContext context, String newId)
{
// ...
// around line 98

component.setId(newId);
setProperties(component); //  her is the second call (it's 
actually the first, but it's the one I would omit)


return component;
}

\\\

I'll create a JIRA issue (including the appropriate patch) in a few 
hours, or maybe anyone else might be taking a look in the meantime.


regards,
Bernhard

Fan Shao wrote:

Hi, 


When trying to trace down the problem I posted a few days ago
(http://www.nabble.com/Button-must-be-clicked-once-before-it-could-actually-do-something-tf4297733.html#a12234990)
I found some of the events are fired twice, where they are supposed to be
fired only once.

The screen contains a datatable, and a dropdown box. When the user
selects a
value of the dropdown box, the form is submitted using
this.form.submit(),
and the datatable is reloaded according to user's selection. Everytime
the
datatable is reloaded its associated handler is called twice.

Anyone has any idea about this?

Many thanks!

Fan
  




Re: Events are fired twice for unknown reasons

2007-08-30 Thread Bernhard Huemer

Hello,

I've encountered the same problem recently and I've also figured out the 
reason. It's because the method setProperties() is called twice. Usually 
you wouldn't notice this behaviour as most properties just will be 
overridden but that's not the case for a ValueChangeListener (or an 
ActionListener). For a better understanding of this issue, I'll describe 
the call hierachy (somewhat simplified):


///
// 
myfaces/core/branches/1_2_1/api/javax/faces/webapp/UIComponentClassicTagBase.java


protected UIComponent findComponent(FacesContext context)
{
   // ...
   // around line 1097

   _componentInstance = findComponent(parent,id);
   if (_componentInstance == null)
   {
   _componentInstance = createComponent(context, id);
   _created = true;
   setProperties(_componentInstance); //  here is the 
first call

   // 

\\\

///
// myfaces/core/branches/1_2_1/api/javax/faces/webapp/UIComponentELTag.java

protected UIComponent createComponent(FacesContext context, String newId)
{
   // ...
   // around line 98

   component.setId(newId);
   setProperties(component); //  her is the second call (it's 
actually the first, but it's the one I would omit)


   return component;
}

\\\

I'll create a JIRA issue (including the appropriate patch) in a few 
hours, or maybe anyone else might be taking a look in the meantime.


regards,
Bernhard

Fan Shao wrote:
Hi, 


When trying to trace down the problem I posted a few days ago
(http://www.nabble.com/Button-must-be-clicked-once-before-it-could-actually-do-something-tf4297733.html#a12234990)
I found some of the events are fired twice, where they are supposed to be
fired only once.

The screen contains a datatable, and a dropdown box. When the user selects a
value of the dropdown box, the form is submitted using this.form.submit(),
and the datatable is reloaded according to user's selection. Everytime the
datatable is reloaded its associated handler is called twice.

Anyone has any idea about this?

Many thanks!

Fan
  




Re: Log each call to an JSF action method

2007-08-30 Thread Bernhard Huemer

Hello,

you could also use a custom ActionListener implementation if the method 
expression being processed is sufficient (for example, Processing the 
action '#{actionBean.processAction}'.), as Andrew has already mentioned.


///
import javax.faces.component.ActionSource;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class LoggingActionListener implements ActionListener {

   private static final Log log = 
LogFactory.getLog(LoggingActionListener.class);
  
   private ActionListener delegate;
  
   public LoggingActionListener(ActionListener delegate) {

   this.delegate = delegate;
   }
  
   public void processAction(ActionEvent actionEvent)

   throws AbortProcessingException {
   if (log.isDebugEnabled()) {
   ActionSource actionSource = (ActionSource) 
actionEvent.getComponent();
   log.debug(Processing the action ' + 
actionSource.getAction().getExpressionString() + '.);

   }

   delegate.processAction(actionEvent);
   }

}
\\\

///
// faces-config.xml
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE faces-config PUBLIC
   -//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN
   http://java.sun.com/dtd/web-facesconfig_1_1.dtd;
faces-config
  
   application

   action-listenerdemo.LoggingActionListener/action-listener
   /application
  
/faces-config

\\\

regards,
Bernhard

Svilen Ivanov wrote:

Andrew,

I think it is fine to wait for the action to end. However, if
NavigationHandlerImpl does it for me - all I have to do is to enable
the log. Thank you for your reply - I'll give it a shot.

Regards,
Svilen

2007/8/29, Andrew Robinson [EMAIL PROTECTED]:
  

If you can wait until after the action has been called, you can use
the ActionListener of the JSF Application or the NavigationHandler as
both have access to the action EL expression. BTW - the myfaces
NavigationHandlerImpl already logs each call at debug level.

-Andrew

On 8/29/07, Svilen Ivanov [EMAIL PROTECTED] wrote:


For audit and debugging purposes I want to log the name of action
method that is being called. Is it possible to hook somewhere in JSF
lifecycle? Or should I use Aspect oriented approach?

Any ideas are appreciated?

--
Svilen Ivanov
http://svilen-online.blogspot.com

There is no dark side of the moon really.
Matter of fact it's all dark.

  



  




Re: EL problem

2007-08-30 Thread Bernhard Huemer

Hello,

Most probably you're referring to this issue: 
https://issues.apache.org/jira/browse/MYFACES-1670, aren't you?  I've 
tested Raphael's JSP locally and it's really the same problem. mvn 
-Dmyfaces.version=1.2.0 jetty:run reproduces the error whereas mvn 
-Dmyfaces.version=1.2.1-SNAPSHOT jetty:run doesn't. If Raphael doesn't 
want to switch to MyFaces 1.2.1-SNAPSHOT, why not patching MyFaces locally?


regards,
Bernhard

P.S: I would have attached my sample application, but the spam 
protection doesn't like it ..


Bruno Aranda wrote:

Hi, does it work if you use #{...} instead of ${...}? I seem to recall
a bug in myfaces 1.2.0 that has been fixed recently and it should be
fixed in the current snaphots (try myfaces-1.2.1-SNAPSHOT)...

Cheers,

Bruno

On 29/08/2007, Raphael Parree [EMAIL PROTECTED] wrote:
  

Hi,

This problem might have been addressed already within the mailing list. I
went trough the archives but was unable to find anything (now is the search
string EL problem not the best search string)

I'm in the process of upgrading to Tomcat 6 (6.0.14) and MyFaces 1.2.0. I
have a major problem with the EL. My JSF pages are using EL but know they
all resolve to empty strings (all EL on JSF pages, on JSPs they work).

For example the following fails:

%@ taglib uri=http://java.sun.com/jsf/core  prefix=f %
%@ taglib uri=http://java.sun.com/jsf/html  prefix=h %
html
 head
  link rel=stylesheet href=../../stylesheets/main.css
type=text/css/
/head
 html
...
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 f:view
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 ...
/html


On both locations the result of the EL is empty.

Is this a known bug, does it have to do with libraries that i have available
in the lib?

Any help is welcome,

Kind regards,

Raphael






  




Re: EL problem

2007-08-30 Thread Bernhard Huemer

Hello,

Actually I've ment that Bruno is referring to that issue ([...] I seem 
to recall a bug in myfaces 1.2.0 that has been fixed recently [...]) 
but never mind! ;-) I've attached the POM I've been using.


regards,
Bernhard

Raphael Parree wrote:

Bernhard,

Thanks for your reply...it seems that indeed I am referring to that issue. I
would like to test the same as you did. Which pom do you use to execute the
mvn commands below (IOW what do I check out of SVN)

Again Bernhard tx,

Raphael


-Original Message-
From: Bernhard Huemer [mailto:[EMAIL PROTECTED] 
Sent: 30 August 2007 16:50

To: MyFaces Discussion
Subject: Re: EL problem

Hello,

Most probably you're referring to this issue: 
https://issues.apache.org/jira/browse/MYFACES-1670, aren't you?  I've 
tested Raphael's JSP locally and it's really the same problem. mvn 
-Dmyfaces.version=1.2.0 jetty:run reproduces the error whereas mvn 
-Dmyfaces.version=1.2.1-SNAPSHOT jetty:run doesn't. If Raphael doesn't 
want to switch to MyFaces 1.2.1-SNAPSHOT, why not patching MyFaces locally?


regards,
Bernhard

P.S: I would have attached my sample application, but the spam 
protection doesn't like it ..


Bruno Aranda wrote:
  

Hi, does it work if you use #{...} instead of ${...}? I seem to recall
a bug in myfaces 1.2.0 that has been fixed recently and it should be
fixed in the current snaphots (try myfaces-1.2.1-SNAPSHOT)...

Cheers,

Bruno

On 29/08/2007, Raphael Parree [EMAIL PROTECTED] wrote:
  


Hi,

This problem might have been addressed already within the mailing list. I
went trough the archives but was unable to find anything (now is the
  

search
  

string EL problem not the best search string)

I'm in the process of upgrading to Tomcat 6 (6.0.14) and MyFaces 1.2.0. I
have a major problem with the EL. My JSF pages are using EL but know they
all resolve to empty strings (all EL on JSF pages, on JSPs they work).

For example the following fails:

%@ taglib uri=http://java.sun.com/jsf/core  prefix=f %
%@ taglib uri=http://java.sun.com/jsf/html  prefix=h %
html
 head
  link rel=stylesheet href=../../stylesheets/main.css
type=text/css/
/head
 html
...
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 f:view
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 ...
/html


On both locations the result of the EL is empty.

Is this a known bug, does it have to do with libraries that i have
  

available
  

in the lib?

Any help is welcome,

Kind regards,

Raphael




  
  




  


?xml version=1.0?
project xmlns=http://maven.apache.org/POM/4.0.0; 
	xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
	xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
		http://maven.apache.org/maven-v4_0_0.xsd;
		
	modelVersion4.0.0/modelVersion
	
	groupIdorg.apache.myfaces.debug/groupId
	artifactIdel-debug/artifactId
	version1.0.0/version
	
	build
		plugins
			plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId

dependencies

	!-- MyFaces Core API  Impl--
	dependency
		groupIdorg.apache.myfaces.core/groupId
		artifactIdmyfaces-api/artifactId
		version${myfaces.version}/version
	/dependency
	dependency
		groupIdorg.apache.myfaces.core/groupId
		artifactIdmyfaces-impl/artifactId
		version${myfaces.version}/version
	/dependency
	
/dependencies
			/plugin
		/plugins
	/build
	
	dependencies

		!-- MyFaces Core API --
		dependency
			groupIdorg.apache.myfaces.core/groupId
			artifactIdmyfaces-api/artifactId
			version${myfaces.version}/version
			scopeprovided/scope
		/dependency
		
	/dependencies

	repositories
		!-- Apache Snapshot repository --
		repository
			idapache.org/id
			nameMaven Snapshots/name
			url
http://people.apache.org/repo/m2-snapshot-repository
			/url

			releases
enabledfalse/enabled
			/releases
			snapshots
enabledtrue/enabled
			/snapshots
		/repository
	/repositories
	
	properties
		!-- If you don't specify the version, 
			1.2.0 will be used (i.e. it's the default) --
		myfaces.version1.2.0/myfaces.version
	/properties

/project

Re: EL problem

2007-08-30 Thread Bernhard Huemer

Hello,

well as you've said previously that you don't want to move to 
1.2.1-SNAPSHOT yet, you'd better use the 1.2.0 branch. That would be 
http://svn.apache.org/repos/asf/myfaces/core/branches/1_2_0/. Apply the 
patch, rebuild myfaces .. there you go! ;-)


regards,
Bernhard

Raphael Parree wrote:

Bernhard,

Gotcha...it has been a long day ;)

What do I need to check out of SVN...the trunk produces a 1.1.6
snapshotdo I need to checkout
http://svn.apache.org/repos/asf/myfaces/core/branches/1_2_1?

Tx.,

Raphael


-Original Message-
From: Bernhard Huemer [mailto:[EMAIL PROTECTED] 
Sent: 30 August 2007 17:33

To: MyFaces Discussion
Subject: Re: EL problem

Hello,

Actually I've ment that Bruno is referring to that issue ([...] I seem 
to recall a bug in myfaces 1.2.0 that has been fixed recently [...]) 
but never mind! ;-) I've attached the POM I've been using.


regards,
Bernhard

Raphael Parree wrote:
  

Bernhard,

Thanks for your reply...it seems that indeed I am referring to that issue.


I
  

would like to test the same as you did. Which pom do you use to execute


the
  

mvn commands below (IOW what do I check out of SVN)

Again Bernhard tx,

Raphael


-Original Message-
From: Bernhard Huemer [mailto:[EMAIL PROTECTED] 
Sent: 30 August 2007 16:50

To: MyFaces Discussion
Subject: Re: EL problem

Hello,

Most probably you're referring to this issue: 
https://issues.apache.org/jira/browse/MYFACES-1670, aren't you?  I've 
tested Raphael's JSP locally and it's really the same problem. mvn 
-Dmyfaces.version=1.2.0 jetty:run reproduces the error whereas mvn 
-Dmyfaces.version=1.2.1-SNAPSHOT jetty:run doesn't. If Raphael doesn't 
want to switch to MyFaces 1.2.1-SNAPSHOT, why not patching MyFaces


locally?
  

regards,
Bernhard

P.S: I would have attached my sample application, but the spam 
protection doesn't like it ..


Bruno Aranda wrote:
  


Hi, does it work if you use #{...} instead of ${...}? I seem to recall
a bug in myfaces 1.2.0 that has been fixed recently and it should be
fixed in the current snaphots (try myfaces-1.2.1-SNAPSHOT)...

Cheers,

Bruno

On 29/08/2007, Raphael Parree [EMAIL PROTECTED] wrote:
  

  

Hi,

This problem might have been addressed already within the mailing list.


I
  

went trough the archives but was unable to find anything (now is the
  


search
  


string EL problem not the best search string)

I'm in the process of upgrading to Tomcat 6 (6.0.14) and MyFaces 1.2.0.


I
  

have a major problem with the EL. My JSF pages are using EL but know


they
  

all resolve to empty strings (all EL on JSF pages, on JSPs they work).

For example the following fails:

%@ taglib uri=http://java.sun.com/jsf/core  prefix=f %
%@ taglib uri=http://java.sun.com/jsf/html  prefix=h %
html
 head
  link rel=stylesheet href=../../stylesheets/main.css
type=text/css/
/head
 html
...
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 f:view
   pTest:${pageContext.request.contextPath}, ${param.foo}  /p
 ...
/html


On both locations the result of the EL is empty.

Is this a known bug, does it have to do with libraries that i have
  


available
  


in the lib?

Any help is welcome,

Kind regards,

Raphael




  

  

  
  





  




Re: Changing the NAMING_SEPARATOR to avoid CSS problems.

2007-08-07 Thread Bernhard Huemer
Hello,

you could also turn off generation of component client IDs included in a
form and hardcode them. Change the value of the prependId attribute on
the UIForm component from the default of true to false to indicate that
the form ID should not be a prefix of the component ID. Note that this
is a feature that has been included in the JSF 1.2 release [1].

///

h:form prependId=false
  h:inputText id=x_name ... /
/h:form

...

input#x_name { /* style configuration */}

\\\

regards,
Bernhard

[1]:
http://java.sun.com/developer/technicalArticles/J2EE/jsf_12/#clientID

On 8/7/07, Bryan Basham [EMAIL PROTECTED] wrote:
 Thanks for the responses, Andrew and Simon.
 
 Yes, we are aware that *some* browsers are able to handle
 colon-escaped IDs, but the reality is that our product must support
 IE (6 and 7) which does not allow this.  And, yes, we are also
 aware of the suggestion that you can use class-based styles rather
 than ID-based styles, but this is not an elegant solution.
 
 So, back to my original question: If we were to override the
 Renderer.convertClientId() method to replace colons with (say)
 an underscore character, would that break anything else in JSF?
 And is underscore a reasonable replacement for colon or would
 you suggest a different character?
 
 Thanks,
 Bryan
 
 Andrew Robinson wrote:
  Actually colon's are legal in CSS, just not supported by Microsoft (go
  figure), they just need to be escaped for the real browsers.
 
  I would suggest using style classes instead of IDs and just give
  components unique style classes. I know it isn't the same, but it is
  much less risky than changing the naming separator.
 
  Also, if you change your layout (id of a naming container), you would
  have to change a large amount of CSS code if you were using client
  IDs.
 
  Almost all components support styleClass, so that shouldn't be an issue at 
  all
 
  -Andrew
 
  On 8/7/07, Bryan Basham [EMAIL PROTECTED] wrote:

  Hello,
 
  There is a well-known problem with JSF's choice of using a colon
  as the NAMING_SEPARATOR character: The CSS standard does
  not work well with HTML IDs that include a colon in the name.
  So for example, if you try to style a specific input element...
  h:form id='x'
h:inputText id='name' ... /
  /h:form
 
  ...with a CSS file entry...
  input#x:name { /* style configuration */}
 
  This is illegal in CSS.  As I said, this is well known.  Here are a few
  links that a co-worker discovered in his investigation:
 
  https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=161
  http://www.nabble.com/Colons-in-component-ids-tf1476983.html#a4015739
  http://wiki.apache.org/myfaces/css_component_ids
 
  My team is investigating a work-around for this.  I read through
  the UIComponentBase.getClientId() code and it is clear that we
  cannot alter the NAMING_SEPARATOR character.  However,
  I did notice the component's renderer is given the opportunity to
  convert the name before it is stored (and returned from the getClientId
  method).  The base Renderer.convertClientId method simply returns
  the passed in string; no conversion.
 
  Has anyone tried to override this convertClientId method to change the
  colon to some other, CSS-compatible character?  If so, which character
  did you use to replace the colon?  And did this conversion cause other
  problems within the JSF framework itself?
 
  The PROs are clear: enables component-specific styling.  The CONs are
  not so obvious, but the biggest gotcha I have found is that if you use
  standard JSF components, you must override their renderers to support
  the conversion.  Can anyone think of other gotchas?
 
  Regards,
  Bryan