RE: Customizing Basic DialogContextManager
Hi Rahul, What I need is to extend the "create" method of org.apache.shale.dialog.basic.BasicDialogManager for example doing: public ... create(javax.faces.context.FacesContext context, String name) { Super.create(context,name); System.out.println("Hello Rahul"); } Thanks Mario -Original Message- From: Rahul Akolkar [mailto:[EMAIL PROTECTED] Sent: 19 luglio 2007 22.37 To: user@shale.apache.org Subject: Re: Customizing Basic DialogContextManager On 7/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > No response? Every body to the beach? :) > For me to say anything else here, I'd need a bit more about what you are trying to do (rather than the how, which you've detailed below) and what the basic implementation is hindering you from doing. -Rahul > Ciao > Mario > > -Original Message- > From: Rahul Akolkar [mailto:[EMAIL PROTECTED] > Sent: 11 luglio 2007 18.20 > To: user@shale.apache.org > Subject: Re: Customizing Basic DialogContextManager > > On 7/10/07, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > I feel boycotted :) > > May be the problem is my email address? > > > > > No. Sometimes (or, often, it depends on many factors) it can take a > couple of days to get a response. Please be patient. > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > Sent: 9 luglio 2007 11.25 > > To: user@shale.apache.org > > Subject: RE: Customizing Basic DialogContextManager > > > > Another way I have tested is to extends directly > > AbstractDialogContextManager overriding all public methods using the > > wrapped > > org.apache.shale.dialog.basic.BasicDialogManager. > > > > Is this solution better then the first? > > > > > Generally, I'd discourage folks from customizing any of the dialog > impls provided for a couple of reasons (though I'd encourage them to > write brand new impls): > > * Any custom impl means that you are no longer using the basic impl > as we all know it (some bets are off, its harder for anyone on this > list to help without reasonable background each time etc.). > > * It should be possible to get a lot of things done leveraging some > of the features of the dialog framework (such as the various > listeners) before getting into customization. Also, if there are > things missing or value-adds to the dialog framework, then IMO its > better to push for those bits to be included in the API or impls > itself (as the case may be). Perhaps you have done this design > exercise already. > > I won't claim to have completely understood what the end goal is for > this particular customization. Is this in any way related to: > > http://issues.apache.org/struts/browse/SHALE-454 > > that you filed recently? > > -Rahul > > > > > Regards > > Mario > > > > P.S. could be easier if > org.apache.shale.dialog.basic.BasicDialogManager > > is not final! > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > Sent: 9 luglio 2007 10.56 > > To: user@shale.apache.org > > Subject: Customizing Basic DialogContextManager > > > > Hi, I need to customize the Basic DialogContextManager to just add > some > > futures in create method. What I need is create a dialog changing the > > name passed when the user has some profile. What I'm doing is a > > decorator (wrapper) of > org.apache.shale.dialog.basic.BasicDialogManager. > > My DialogContextManager (MyDialogContextManager.java ) does not > extends > > AbstractDialogContextManager but implements > > org.apache.shale.dialog.DialogContextManager and uses a wrapped object > > of org.apache.shale.dialog.basic.BasicDialogManager : > > > > > > > > public class MyDialogContextManager implements DialogContextManager, > > > > Serializable { > > > > > > > > private static final Log log = > > LogFactory.getLog(MyDialogContextManager.class); > > > > > > > > DialogContextManager wrapped; > > > > > > > > public MyDialogContextManager() { > > > > super(); > > > > wrapped = new BasicDialogManager(); > > > > > > > FacesContext.getCurrentInstance().getExternalContext().getSessionMap().p > > ut("mypipolo",wrapped); > > > > } > > > > > > > > public DialogContext create(FacesContext context, String > > name) { > > > > //this is what I need: > > > > If (blablaba) name="mydialogname"; > > > > > > > > return wrapped.create(context,name); > > > > } > > > > > > > > public DialogContext create(FacesContext context, String > > name, DialogContext parent) { > > > > return wrapped.create(context,name,parent); > > > > } > > > > > > > > public DialogContext get(String id) { > > > > return wrapped.get(id); > > > > } > > > > > > > > public DialogContext getActiveDialo
Re: Integrating Shale with Facelets
Ignore the last two comments. I just noticed my build also has commons-el. The dependencies you have appear to be right. I'm running on weblogic so I can really tell you if its a tomcat issue or not. On 7/20/07, Lionel Port <[EMAIL PROTECTED]> wrote: I assume you have removed commons-el-1.0 from your pom of course. On 7/20/07, Lionel Port <[EMAIL PROTECTED] > wrote: > > did you do a clean before the package. > > i.e. mvn clean package > > That will get rid of the dependencies that are already copied to the > target directory but not in your pom. > > On 7/20/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > > > I got the EL RI depedencies from the repository and now I'm having > > this error : > > > > java.lang.LinkageError: loader constraints violated when linking > > javax/el/ExpressionFactory I searched trought the web and got the info that > > there is a problem using EL RI with Tomcat 6 > > > > I'm not sure if my project structure is going to work > > > > Can anyone help about this ? I starting to belive that I have > > to change my project structure > > > > At this moment I'm using Shale, MyFaces, Facelets, Spring, Hibernate > > and Maven > > > > When I compile my project with maven through command line I see that > > in my war file deps I have el-api.jar , el-impl.jar and > > commons-el-1.0.jar > > > > Would that be one of the possible reasons for the problem ? > > ... > > > > - Original Message > > From: Lionel Port <[EMAIL PROTECTED]> > > To: user@shale.apache.org > > Sent: Tuesday, July 17, 2007 11:12:27 PM > > Subject: Re: Integrating Shale with Facelets > > > > I've an test app working with shale and facelets. I don't think there > > is > > anything specific that needs to be done for shale. The dependencies I > > have > > are. > > > > > > com.sun.facelets > > jsf-facelets > > 1.1.11 > > > > > > > > javax.el > > el-api > > 1.0 > > > > > > > > el-impl > > el-impl > > 1.0 > > > > > > > > > > > > On 7/18/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > > > > > Hi > > > > > > I'm trying to create a > > > project using Maven, Shale, Facelets and MyFaces > > > > > > I added the folowing dependency im my POM : > > > > > > > > > com.sun.facelets > > > jsf-facelets > > > 1.1.11 > > > > > > > > > > > > commons-el > > > > > > commons-el > > > 1.0 > > > > > > > > > In my POM the Shale version is 1.0.4 and MyFaces is 1.1.5 > > > > > > I configured aplplication FacesConfig with : > > > > > > ... > > > > > > com.sun.facelets.FaceletViewHandler > > > > > > > > > > > > In my deployment descriptor I have : > > > > > > index.jsp > > > > > > > > > And the code in index.jsp : > > > > > > > > > I have my first xhtml file named > > > home.xhtml > > > > > > When I compile and deploy my app through maven everything runs fine > > > > > > Then when I access my context through http://localhost:8080/myAppthis > > > should redirect to home.xhtml but I receive the following error : > > > > > > com.sun.facelets.FaceletException: Could not instantiate feature[ > > > compiler.ExpressionFactory ]: com.sun.el.ExpressionFactoryImpl > > > > > > and in the component tree message shows : > > > > > > > rendered="true" > > > transient="false" viewId="/home.xhtml"/> > > > > > > I don't know if I have to change my dependecies from commons to RI > > and I > > > have searched throught the web for de EL dependency from sun but > > until now I > > > got nothing... > > > > > > I'm not sure what is the cause of the problem yet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's > > updated > > > for today's economy) at Yahoo! Games. > > > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow > > > > > > > > > > > > > > > > > > > > > > Yahoo! oneSearch: Finally, mobile search > > that gives answers, not web links. > > http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC > > >
Re: Integrating Shale with Facelets
I assume you have removed commons-el-1.0 from your pom of course. On 7/20/07, Lionel Port <[EMAIL PROTECTED]> wrote: did you do a clean before the package. i.e. mvn clean package That will get rid of the dependencies that are already copied to the target directory but not in your pom. On 7/20/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > I got the EL RI depedencies from the repository and now I'm having this > error : > > java.lang.LinkageError: loader constraints violated when linking > javax/el/ExpressionFactory I searched trought the web and got the info that > there is a problem using EL RI with Tomcat 6 > > I'm not sure if my project structure is going to work > > Can anyone help about this ? I starting to belive that I have > to change my project structure > > At this moment I'm using Shale, MyFaces, Facelets, Spring, Hibernate and > Maven > > When I compile my project with maven through command line I see that in > my war file deps I have el-api.jar , el-impl.jar and > commons-el-1.0.jar > > Would that be one of the possible reasons for the problem ? > ... > > - Original Message > From: Lionel Port <[EMAIL PROTECTED]> > To: user@shale.apache.org > Sent: Tuesday, July 17, 2007 11:12:27 PM > Subject: Re: Integrating Shale with Facelets > > I've an test app working with shale and facelets. I don't think there is > anything specific that needs to be done for shale. The dependencies I > have > are. > > > com.sun.facelets > jsf-facelets > 1.1.11 > > > > javax.el > el-api > 1.0 > > > > el-impl > el-impl > 1.0 > > > > > > On 7/18/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > I'm trying to create a > > project using Maven, Shale, Facelets and MyFaces > > > > I added the folowing dependency im my POM : > > > > > > com.sun.facelets > > jsf-facelets > > 1.1.11 > > > > > > > > commons-el > > > > commons-el > > 1.0 > > > > > > In my POM the Shale version is 1.0.4 and MyFaces is 1.1.5 > > > > I configured aplplication FacesConfig with : > > > > ... > > > > com.sun.facelets.FaceletViewHandler > > > > > > > > In my deployment descriptor I have : > > > > index.jsp > > > > > > And the code in index.jsp : > > > > > > I have my first xhtml file named > > home.xhtml > > > > When I compile and deploy my app through maven everything runs fine > > > > Then when I access my context through http://localhost:8080/myApp this > > should redirect to home.xhtml but I receive the following error : > > > > com.sun.facelets.FaceletException: Could not instantiate feature[ > > compiler.ExpressionFactory ]: com.sun.el.ExpressionFactoryImpl > > > > and in the component tree message shows : > > > > > transient="false" viewId="/home.xhtml"/> > > > > I don't know if I have to change my dependecies from commons to RI and > I > > have searched throught the web for de EL dependency from sun but until > now I > > got nothing... > > > > I'm not sure what is the cause of the problem yet > > > > > > > > > > > > > > > > > > > > > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's > updated > > for today's economy) at Yahoo! Games. > > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow > > > > > > > > > > > Yahoo! oneSearch: Finally, mobile search > that gives answers, not web links. > http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
Re: Integrating Shale with Facelets
did you do a clean before the package. i.e. mvn clean package That will get rid of the dependencies that are already copied to the target directory but not in your pom. On 7/20/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: I got the EL RI depedencies from the repository and now I'm having this error : java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory I searched trought the web and got the info that there is a problem using EL RI with Tomcat 6 I'm not sure if my project structure is going to work Can anyone help about this ? I starting to belive that I have to change my project structure At this moment I'm using Shale, MyFaces, Facelets, Spring, Hibernate and Maven When I compile my project with maven through command line I see that in my war file deps I have el-api.jar , el-impl.jar and commons-el-1.0.jar Would that be one of the possible reasons for the problem ? ... - Original Message From: Lionel Port <[EMAIL PROTECTED]> To: user@shale.apache.org Sent: Tuesday, July 17, 2007 11:12:27 PM Subject: Re: Integrating Shale with Facelets I've an test app working with shale and facelets. I don't think there is anything specific that needs to be done for shale. The dependencies I have are. com.sun.facelets jsf-facelets 1.1.11 javax.el el-api 1.0 el-impl el-impl 1.0 On 7/18/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > Hi > > I'm trying to create a > project using Maven, Shale, Facelets and MyFaces > > I added the folowing dependency im my POM : > > > com.sun.facelets > jsf-facelets > 1.1.11 > > > > commons-el > > commons-el > 1.0 > > > In my POM the Shale version is 1.0.4 and MyFaces is 1.1.5 > > I configured aplplication FacesConfig with : > > ... > > com.sun.facelets.FaceletViewHandler > > > > In my deployment descriptor I have : > > index.jsp > > > And the code in index.jsp : > > > I have my first xhtml file named > home.xhtml > > When I compile and deploy my app through maven everything runs fine > > Then when I access my context through http://localhost:8080/myApp this > should redirect to home.xhtml but I receive the following error : > > com.sun.facelets.FaceletException: Could not instantiate feature[ > compiler.ExpressionFactory]: com.sun.el.ExpressionFactoryImpl > > and in the component tree message shows : > > transient="false" viewId="/home.xhtml"/> > > I don't know if I have to change my dependecies from commons to RI and I > have searched throught the web for de EL dependency from sun but until now I > got nothing... > > I'm not sure what is the cause of the problem yet > > > > > > > > > > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated > for today's economy) at Yahoo! Games. > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
shale-tiger and jsf 1.2
Hi, shale-tiger doesn't seem to work with myfaces 1.2 which has recenlty been released. I have a bean annotated with @Bean and it doesn't seem to be picked up. The bean doesn't exists when I try to get/set some properties on it using EL. Everything is fine with the bean when it's declared in faces-config.xml. Additionally no messages are logged by tiger even on debug level apart from the one that states that 'original variableResolver was wrapped...' Does shale-tiger work with jsf 1.2? (I've quickly skimmed through the sources and it seems that only DTDs for jsf 1_0 and 1_1 are allowed (FacesConfigParser#REGISTRATIONS) if that's what it's used for. I've configured my webapp according to the jee5 tutorial where they use schema for 1.2. May this be the reason why shale-tiger doesn't register the annotated beans?) Regards, Tom Pasierb
Re: Customizing Basic DialogContextManager
On 7/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: No response? Every body to the beach? :) For me to say anything else here, I'd need a bit more about what you are trying to do (rather than the how, which you've detailed below) and what the basic implementation is hindering you from doing. -Rahul Ciao Mario -Original Message- From: Rahul Akolkar [mailto:[EMAIL PROTECTED] Sent: 11 luglio 2007 18.20 To: user@shale.apache.org Subject: Re: Customizing Basic DialogContextManager On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I feel boycotted :) > May be the problem is my email address? > No. Sometimes (or, often, it depends on many factors) it can take a couple of days to get a response. Please be patient. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 9 luglio 2007 11.25 > To: user@shale.apache.org > Subject: RE: Customizing Basic DialogContextManager > > Another way I have tested is to extends directly > AbstractDialogContextManager overriding all public methods using the > wrapped > org.apache.shale.dialog.basic.BasicDialogManager. > > Is this solution better then the first? > Generally, I'd discourage folks from customizing any of the dialog impls provided for a couple of reasons (though I'd encourage them to write brand new impls): * Any custom impl means that you are no longer using the basic impl as we all know it (some bets are off, its harder for anyone on this list to help without reasonable background each time etc.). * It should be possible to get a lot of things done leveraging some of the features of the dialog framework (such as the various listeners) before getting into customization. Also, if there are things missing or value-adds to the dialog framework, then IMO its better to push for those bits to be included in the API or impls itself (as the case may be). Perhaps you have done this design exercise already. I won't claim to have completely understood what the end goal is for this particular customization. Is this in any way related to: http://issues.apache.org/struts/browse/SHALE-454 that you filed recently? -Rahul > Regards > Mario > > P.S. could be easier if org.apache.shale.dialog.basic.BasicDialogManager > is not final! > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 9 luglio 2007 10.56 > To: user@shale.apache.org > Subject: Customizing Basic DialogContextManager > > Hi, I need to customize the Basic DialogContextManager to just add some > futures in create method. What I need is create a dialog changing the > name passed when the user has some profile. What I'm doing is a > decorator (wrapper) of org.apache.shale.dialog.basic.BasicDialogManager. > My DialogContextManager (MyDialogContextManager.java ) does not extends > AbstractDialogContextManager but implements > org.apache.shale.dialog.DialogContextManager and uses a wrapped object > of org.apache.shale.dialog.basic.BasicDialogManager : > > > > public class MyDialogContextManager implements DialogContextManager, > > Serializable { > > > > private static final Log log = > LogFactory.getLog(MyDialogContextManager.class); > > > > DialogContextManager wrapped; > > > > public MyDialogContextManager() { > > super(); > > wrapped = new BasicDialogManager(); > > > FacesContext.getCurrentInstance().getExternalContext().getSessionMap().p > ut("mypipolo",wrapped); > > } > > > > public DialogContext create(FacesContext context, String > name) { > > //this is what I need: > > If (blablaba) name="mydialogname"; > > > > return wrapped.create(context,name); > > } > > > > public DialogContext create(FacesContext context, String > name, DialogContext parent) { > > return wrapped.create(context,name,parent); > > } > > > > public DialogContext get(String id) { > > return wrapped.get(id); > > } > > > > public DialogContext getActiveDialogContext(FacesContext > context) { > > return wrapped.getActiveDialogContext(context); > > } > > > > public void remove(DialogContext instance) { > > wrapped.remove(instance); > > } > > > > public void > addDialogContextManagerListener(DialogContextManagerListener listener) { > > > wrapped.addDialogContextManagerListener(listener); > > } > > > > public DialogContextManagerListener[] > getDialogContextManagerListeners() { > > return > wrapped.getDialogContextManagerListeners(); > > } > > > > public void > removeDialogContextManagerListener(DialogContextManagerListener > listener) { > > > wrapped.removeDialogContextM
Re: Integrating Shale with Facelets
I got the EL RI depedencies from the repository and now I'm having this error : java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory I searched trought the web and got the info that there is a problem using EL RI with Tomcat 6 I'm not sure if my project structure is going to work Can anyone help about this ? I starting to belive that I have to change my project structure At this moment I'm using Shale, MyFaces, Facelets, Spring, Hibernate and Maven When I compile my project with maven through command line I see that in my war file deps I have el-api.jar , el-impl.jar and commons-el-1.0.jar Would that be one of the possible reasons for the problem ? ... - Original Message From: Lionel Port <[EMAIL PROTECTED]> To: user@shale.apache.org Sent: Tuesday, July 17, 2007 11:12:27 PM Subject: Re: Integrating Shale with Facelets I've an test app working with shale and facelets. I don't think there is anything specific that needs to be done for shale. The dependencies I have are. com.sun.facelets jsf-facelets 1.1.11 javax.el el-api 1.0 el-impl el-impl 1.0 On 7/18/07, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > Hi > > I'm trying to create a > project using Maven, Shale, Facelets and MyFaces > > I added the folowing dependency im my POM : > > > com.sun.facelets > jsf-facelets > 1.1.11 > > > > commons-el > > commons-el > 1.0 > > > In my POM the Shale version is 1.0.4 and MyFaces is 1.1.5 > > I configured aplplication FacesConfig with : > > ... > > com.sun.facelets.FaceletViewHandler > > > > In my deployment descriptor I have : > > index.jsp > > > And the code in index.jsp : > > > I have my first xhtml file named > home.xhtml > > When I compile and deploy my app through maven everything runs fine > > Then when I access my context through http://localhost:8080/myApp this > should redirect to home.xhtml but I receive the following error : > > com.sun.facelets.FaceletException: Could not instantiate feature[ > compiler.ExpressionFactory]: com.sun.el.ExpressionFactoryImpl > > and in the component tree message shows : > > transient="false" viewId="/home.xhtml"/> > > I don't know if I have to change my dependecies from commons to RI and I > have searched throught the web for de EL dependency from sun but until now I > got nothing... > > I'm not sure what is the cause of the problem yet > > > > > > > > > > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated > for today's economy) at Yahoo! Games. > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC