RE: Myfaces, Spring and Hibernate
Title: Myfaces, Spring and Hibernate My company is doing the web client version of our flagship product with JSF+Spring+Hibernate and we definitely feel that it was the right choice. I obviously cant send you a copy of the app, but I can offer a testimonial. The Delegating Variable Resolver makes everything work smooth as butter. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Kranthi Parasu [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 12, 2006 1:32 PM To: 'MyFaces Discussion' Subject: RE: Myfaces, Spring and Hibernate Thanks Andy! I will cetainly take a look at this. Kranthi - From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 12, 2006 1:20 PM To: users@myfaces.apache.org Subject: AW: Myfaces, Spring and Hibernate Hi, perhaps this helps you: http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html At the bottom of the page you can download a sample application. It's not with Myfaces but with Suns JSF, but this shouldn't be a problem i think Regards, Andy -Ursprüngliche Nachricht- Von: Kranthi Parasu [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 12. April 2006 19:17 An: 'MyFaces Discussion' Betreff: Myfaces, Spring and Hibernate Hello All, Iam currently in the process of evaluating Myfaces for my new project, all of our previous projects are Struts based. I have liked Myfaces so far but I am interested in an sample application involving Myfaces, spring and hibernate, I have searched in the wiki and google but found none, if anyone has an application to share, please let me know. Thanks in advance, Kranthi __ Diese Nachricht ist fuer die MAGNA STEYR Fahrzeugtechnik AG Co KG rechtsunverbindlich! - This message is not legally binding upon MAGNA STEYR Fahrzeugtechnik AG Co KG! This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
RE: MyFaces JSF Facelets
Sorry :) Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Friday, April 07, 2006 2:51 PM To: MyFaces Discussion Subject: Re: MyFaces JSF Facelets You most definitely can use ADF Faces with Facelets and JSP delegation. You do have to register the Facelets view handler in that specific way, but that doesn't at all cause problems with the JSP delegation code. -- Adam On 4/7/06, Mike Kienenberger [EMAIL PROTECTED] wrote: On 4/7/06, Jeremy Sager [EMAIL PROTECTED] wrote: I think you'd also run into terrible problems if/when you used ADF faces, because you have to declare the View Handler in an ADF specific way, and unless I'm wrong you can't distinguish between extension types when you do that. I can't say for sure, but considering that Adam Winer wrote both the JSP delegation support described previously for Facelets and the ADF integration support for facelets, I think it's pretty likely that this approach will work when all three are being used together.
Bug in ADF showOne components
Hi guys Ive researched this pretty thoroughly and I dont think this is a mistake on my part. Im worried that the general issue Im demonstrating may extend beyond showOne items, but theyre all Ive tested so far. The following bug is demonstrated with showOneChoice, but I know for certain that it is also a problem with showOneTab. I haven't tested it with other showOne components, but am guessing we'll get similar results. Basically, if you have a showOne component inside a form AND inside a facet, it stops working properly. When you select an item from the showOne, it automatically reverts back to the first item in the list no matter what you selected. I am certain this has nothing to do with the outputText component inside the showDetailItem I originally had different components in there, and only substituted in the outputText because its a simple small component that makes testing easy. Here is a sample setup: af:form af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem /af:showOneChoice f:facet /af:panelBorder /af:form If you replace the panelBorder with a panelPage (i.e. another component with a facet), you get the same behavior. af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /f:facet /af:panelPage /af:form Remove the form, and everything works fine: af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem af:showOneChoice /f:facet /af:panelBorder Keep the form, but pull the showOne item OUT of the facet, everything works fine: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:outputText value=Facet requires a tag id=asdsadaddsadsas/ /f:facet af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ af:showDetailItem /af:showOneChoice /af:panelPage /af:form It does not matter if the showOne item is a top level child of the facet or not. This also fails: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:panelBox id=box text=header background=""> af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /af:panelBox /f:facet /af:panelPage /af:form Im going to do more testing to determine if there are other types of components that misfire inside a facet inside a form, and Ill let you guys know. In the meantime, hopefully the ADF guys who know the code can spot the problem. I dont think this is relevant to the issue, but in the interests of full disclosure I am using facelets for my view handler. I am on the nightlies for facelets, MyFaces, and ADF Faces as of Monday 3/27 however I know for certain that this bug was around in earlier versions, because I upgraded in an attempt to fix the bug, and was previously using MyFaces 1.1.1, the original ADF Faces drop, and whatever version of facelets was out there in December 05. Im copying this to the myfaces list because the adffaces list just came up yesterday and people who have something to add may not have signed up yet. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Bug in ADF showOne components
Ok should I take that to the ADF list only then? Not trying to be a smartass, just trying to clarify. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 11:48 AM To: MyFaces Discussion Subject: Re: Bug in ADF showOne components Hi Jeremy, thanks for your interest in ADF Faces, but please don't do cross postings. Thanks, Matthias On 3/29/06, Jeremy Sager [EMAIL PROTECTED] wrote: By the way, I did my testing in firefox. In IE, I noticed that sometimes it seems to sit at loading for great lengths of time instead of just reverting. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 11:45 AM To: 'MyFaces Discussion' Cc: adffaces-user@incubator.apache.org Subject: Bug in ADF showOne components Hi guys - I've researched this pretty thoroughly and I don't think this is a mistake on my part. I'm worried that the general issue I'm demonstrating may extend beyond showOne items, but they're all I've tested so far. The following bug is demonstrated with showOneChoice, but I know for certain that it is also a problem with showOneTab. I haven't tested it with other showOne components, but am guessing we'll get similar results. Basically, if you have a showOne component inside a form AND inside a facet, it stops working properly. When you select an item from the showOne, it automatically reverts back to the first item in the list no matter what you selected. I am certain this has nothing to do with the outputText component inside the showDetailItem. I originally had different components in there, and only substituted in the outputText because it's a simple small component that makes testing easy. Here is a sample setup: af:form af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem /af:showOneChoice f:facet /af:panelBorder /af:form If you replace the panelBorder with a panelPage (i.e. another component with a facet), you get the same behavior. af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /f:facet /af:panelPage /af:form Remove the form, and everything works fine: af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem af:showOneChoice /f:facet /af:panelBorder Keep the form, but pull the showOne item OUT of the facet, everything works fine: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:outputText value=Facet requires a tag id=asdsadaddsadsas/ /f:facet af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ af:showDetailItem /af:showOneChoice /af:panelPage /af:form It does not matter if the showOne item is a top level child of the facet or not. This also fails: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:panelBox id=box text=header background=medium af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /af:panelBox /f:facet /af:panelPage /af:form I'm going to do more testing to determine if there are other types of components that misfire inside a facet inside a form, and I'll let you guys know. In the meantime, hopefully the ADF guys who know the code can spot the problem. I don't think this is relevant to the issue, but in the interests of full disclosure I am using facelets for my view handler. I am on the nightlies for facelets, MyFaces, and ADF Faces as of Monday 3/27. however I know for certain
RE: Bug in ADF showOne components
By the way, I did my testing in firefox. In IE, I noticed that sometimes it seems to sit at loading for great lengths of time instead of just reverting. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 11:45 AM To: 'MyFaces Discussion' Cc: adffaces-user@incubator.apache.org Subject: Bug in ADF showOne components Hi guys - I've researched this pretty thoroughly and I don't think this is a mistake on my part. I'm worried that the general issue I'm demonstrating may extend beyond showOne items, but they're all I've tested so far. The following bug is demonstrated with showOneChoice, but I know for certain that it is also a problem with showOneTab. I haven't tested it with other showOne components, but am guessing we'll get similar results. Basically, if you have a showOne component inside a form AND inside a facet, it stops working properly. When you select an item from the showOne, it automatically reverts back to the first item in the list no matter what you selected. I am certain this has nothing to do with the outputText component inside the showDetailItem. I originally had different components in there, and only substituted in the outputText because it's a simple small component that makes testing easy. Here is a sample setup: af:form af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem /af:showOneChoice f:facet /af:panelBorder /af:form If you replace the panelBorder with a panelPage (i.e. another component with a facet), you get the same behavior. af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /f:facet /af:panelPage /af:form Remove the form, and everything works fine: af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem af:showOneChoice /f:facet /af:panelBorder Keep the form, but pull the showOne item OUT of the facet, everything works fine: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:outputText value=Facet requires a tag id=asdsadaddsadsas/ /f:facet af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ af:showDetailItem /af:showOneChoice /af:panelPage /af:form It does not matter if the showOne item is a top level child of the facet or not. This also fails: af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:panelBox id=box text=header background=medium af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /af:panelBox /f:facet /af:panelPage /af:form I'm going to do more testing to determine if there are other types of components that misfire inside a facet inside a form, and I'll let you guys know. In the meantime, hopefully the ADF guys who know the code can spot the problem. I don't think this is relevant to the issue, but in the interests of full disclosure I am using facelets for my view handler. I am on the nightlies for facelets, MyFaces, and ADF Faces as of Monday 3/27. however I know for certain that this bug was around in earlier versions, because I upgraded in an attempt to fix the bug, and was previously using MyFaces 1.1.1, the original ADF Faces drop, and whatever version of facelets was out there in December '05. I'm copying this to the myfaces list because the adffaces list just came up yesterday and people who have something to add may not have signed up yet. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Bug in ADF showOne components
Ok excellent. This makes perfect sense I wasnt using afh:body I was just using body Didnt think to include that in my sample stuff because I didnt realize that the ADF HTML tags were significant I guess I for some reason assumed that they were there for view technology that didnt pass through HTML. At one point, I was using the af:document tag but pulled it out just for reference, if I did use the document tag, I could skip the html and body tags, right? I just want to make sure Im getting the same functionality. Anyway, I guess the PPR not working properly without the proper tags set up to allow it makes sense. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Jonas Jacobi [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 1:08 PM To: MyFaces Discussion Subject: Re: Bug in ADF showOne components Hi Jeremy, I tried your sample code and it worked fine (with ADF Faces that is shipped with Oracle's JDeveloper, which is a more recent build of ADF Faces). Anyone tried the same use case in the ADF Faces Apache drop? Here is my page source: f:view afh:html afh:body af:form id=someform af:panelPage id=_adasd f:facet name=menu1 af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads/ /af:showDetailItem /af:showOneChoice /f:facet /af:panelPage /af:form /afh:body /afh:html /f:view I'll do some more testing to see if I can duplicate your issue. Thanks, Jonas Jeremy Sager wrote: Ok should I take that to the ADF list only then? Not trying to be asmartass, just trying to clarify.Jeremy SagerData Communications Product ManagerChesapeake System Solutions410.356.6805 x120[EMAIL PROTECTED]-Original Message-From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 29, 2006 11:48 AMTo: MyFaces DiscussionSubject: Re: Bug in ADF showOne componentsHi Jeremy,thanks for your interest in ADF Faces, but please don't do cross postings.Thanks,MatthiasOn 3/29/06, Jeremy Sager [EMAIL PROTECTED] wrote: By the way, I did my testing in firefox. In IE, I noticed that sometimes it seems to sit at loading for great lengths of time instead of justreverting.Jeremy SagerData Communications Product ManagerChesapeake System Solutions410.356.6805 x120[EMAIL PROTECTED]-Original Message-From: Jeremy Sager [mailto:[EMAIL PROTECTED]]Sent: Wednesday, March 29, 2006 11:45 AMTo: 'MyFaces Discussion'Cc: adffaces-user@incubator.apache.orgSubject: Bug in ADF showOne componentsHi guys -I've researched this pretty thoroughly and I don't think this is a mistakeon my part.I'm worried that the general issue I'm demonstrating may extend beyondshowOne items, but they're all I've tested so far. The following bug isdemonstrated with showOneChoice, but I know for certain that it is also aproblem with showOneTab. I haven't tested it with other showOne components, but am guessing we'll get similar results.Basically, if you have a showOne component inside a form AND inside a facet, it stops working properly. When you select an item from the showOne, itautomatically reverts back to the first item in the list no matter what you selected.I am certain this has nothing to do with the outputText component inside the showDetailItem. I originally had different components in there, and onlysubstituted in the outputText because it's a simple small component thatmakes testing easy.Here is a sample setup:af:form af:panelBorder f:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem /af:showOneChoice f:facet /af:panelBorder/af:formIf you replace the panelBorder with a panelPage (i.e. another component with a facet), you get the same behavior.af:form id=someformaf:panelPage id=_adasdf:facet name=menu1af:showOneChoice position=topaf:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One id=sdasda//af:showDetailItemaf:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two id=asdsadads//af:showDetailItem/af:showOneChoice/f:facet/af:panelPage/af:formRemove the form, and everything works fine:af:panelBorderf:facet name=right af:showOneChoice position=top af:showDetailItem text=Item One id=_1234321 af:outputText value=Showing One/ /af:showDetailItem af:showDetailItem text=Item Two id=_12345654321 af:outputText value=Showing Two/ /af:showDetailItem
RE: A dynamic component and the JSF lifecycle
Hi Adam - Thanks for the response. What you are saying actually makes a ton of sense, seeing as how the components show up some of the time. I am indeed setting a unique id on the showDetailItems... I store them on the editorinput objects because I may need to find them later if the user has clicked the close tab button. I am going to upgrade to the latest version of MyFaces and Facelets since I'm back in November versions, but if that doesn't fix my problems, this leaves me at square one. I'll let you know, I appreciate the advice there. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Saturday, March 25, 2006 6:12 PM To: MyFaces Discussion Subject: Re: A dynamic component and the JSF lifecycle Indeed: with Facelets, JSTL tags like c:forEach do generally work. But it does get tricky when you're changing the number of components from one request to the next. What should be happening is that during Render Response, the tags re-execute, and if there's a new component, it gets inserted - especially if you have id set uniquely on that showDetailItem, which it looks like you do, though confirmation of that would be a good idea. -- Adam On 3/24/06, Jeremy Sager [EMAIL PROTECTED] wrote: Correct me if I'm wrong, but facelets is supposed to specifically fix that problem, isn't it? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Alexander Panzhin [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 3:29 PM To: MyFaces Discussion Subject: Re: A dynamic component and the JSF lifecycle Sorry to break it to you, but JSTL Core tags do not work well with JSF. Usually they're late. In the sense that you have to refresh to get a correct view. That's because they're rendered at different times. Thanks in advance for any help guys J I am using an ADF showOneTab component that has a varying number of tabs. I iterate across a list inside the xhtml document with a facelets tag. In theory, a user may be able to click on various command items such as links and buttons that would cause an item to be added to my list and a navigate-back-to-self situation, which means that the new tabs should show up. The problem is, it doesn't work like that, and I think I know why. My list isn't going to get updated until the Invoke Application phase, by which point the component hierarchy is already built. That's the problem. I think. What I actually see is really spotty behavior, where sometimes things appear and other times they don't, and I can't tell why. Regardless of the behavior, if I just hit the refresh button, the page always loads exactly the way it should. Here are my tags: af:showOneTab position=above c:forEach var = editorinput items=#{editorPanelBean.tabs} af:showDetailItem text=#{editorinput.label} id=#{editorinput.id} ui:include src=#{editorinput.page} ui:param name=editorinput value=#{editorinput}/ /ui:include /af:showDetailItem /c:forEach /af:showOneTab Does anyone have any advice on how I should proceed here? I was thinking that the answer may be to write a custom phase listener and figure out how to process my action early, which I'm more than happy to do if it's the correct solution. I just don't want to go barking up the wrong tree, or down a dead end alley, or whatever analogy you prefer if there's a duh solution to this problem out there. And remember I'm running that c:forEach in the facelets world, not the JSP world. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -- Su pagarba, Aleksandr Panzin IT sistemu architektas. With best regards, Alexander Panzhin IT systems architect
A dynamic component and the JSF lifecycle
Title: Message Thanks in advance for any help guys J I am using an ADF showOneTab component that has a varying number of tabs. I iterate across a list inside the xhtml document with a facelets tag. In theory, a user may be able to click on various command items such as links and buttons that would cause an item to be added to my list and a navigate-back-to-self situation, which means that the new tabs should show up. The problem is, it doesnt work like that, and I think I know why My list isnt going to get updated until the Invoke Application phase, by which point the component hierarchy is already built. Thats the problem I think. What I actually see is really spotty behavior, where sometimes things appear and other times they dont, and I cant tell why. Regardless of the behavior, if I just hit the refresh button, the page always loads exactly the way it should. Here are my tags: af:showOneTab position=above c:forEach var = editorinput items=#{editorPanelBean.tabs} af:showDetailItem text=#{editorinput.label} id=#{editorinput.id} ui:include src=#{editorinput.page} ui:param name=editorinput value=#{editorinput}/ /ui:include /af:showDetailItem /c:forEach /af:showOneTab Does anyone have any advice on how I should proceed here? I was thinking that the answer may be to write a custom phase listener and figure out how to process my action early, which Im more than happy to do if its the correct solution. I just dont want to go barking up the wrong tree, or down a dead end alley, or whatever analogy you prefer if theres a duh solution to this problem out there. And remember Im running that c:forEach in the facelets world, not the JSP world. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Ajax jsf component panel
Im working through that book right now Jonas. Its pretty kick butt. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Jonas Jacobi [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 2:23 PM To: MyFaces Discussion Subject: Re: Ajax jsf component panel Hi John, There is a sample component palette in our book (we call it Deck component) that you can look at. The source is available from the Apress website. Pro JSF and Ajax: Building Rich Internet Components (http://apress.com/book/bookDisplay.html?bID=10044) Regards, Jonas John Slave wrote: Hi, i wish to create an ajax component panel that is simply a panel with particular _javascript_ effect to expand and contract. However i found a solution but i don't know if this is the right solution. I will use dwr servlet to communicate by ajax (as explained in blue prints catalog article) but the render inside will be always available but hidden...because i don't know how i can render and put the result via ajax... Someone can tell me if it is a correct solution? Some suggestion? Thank you Yours faithfully John Slave -- Author: Pro JSF and Ajax: Building Rich Internet Components Blog: http://www.orablogs.com/jjacobi
RE: A dynamic component and the JSF lifecycle
Title: Message Correct me if Im wrong, but facelets is supposed to specifically fix that problem, isnt it? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Alexander Panzhin [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 3:29 PM To: MyFaces Discussion Subject: Re: A dynamic component and the JSF lifecycle Sorry to break it to you, but JSTL Core tags do not work well with JSF. Usually they're late. In the sense that you have to refresh to get a correct view. That's because they're rendered at different times. Thanks in advance for any help guys J I am using an ADF showOneTab component that has a varying number of tabs. I iterate across a list inside the xhtml document with a facelets tag. In theory, a user may be able to click on various command items such as links and buttons that would cause an item to be added to my list and a navigate-back-to-self situation, which means that the new tabs should show up. The problem is, it doesnt work like that, and I think I know why My list isnt going to get updated until the Invoke Application phase, by which point the component hierarchy is already built. Thats the problem I think. What I actually see is really spotty behavior, where sometimes things appear and other times they dont, and I cant tell why. Regardless of the behavior, if I just hit the refresh button, the page always loads exactly the way it should. Here are my tags: af:showOneTab position=above c:forEach var = editorinput items=#{editorPanelBean.tabs} af:showDetailItem text=#{editorinput.label} id=#{editorinput.id} ui:include src=#{editorinput.page} ui:param name=editorinput value=#{editorinput}/ /ui:include /af:showDetailItem /c:forEach /af:showOneTab Does anyone have any advice on how I should proceed here? I was thinking that the answer may be to write a custom phase listener and figure out how to process my action early, which Im more than happy to do if its the correct solution. I just dont want to go barking up the wrong tree, or down a dead end alley, or whatever analogy you prefer if theres a duh solution to this problem out there. And remember Im running that c:forEach in the facelets world, not the JSP world. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -- Su pagarba, Aleksandr Panzin IT sistemu architektas. With best regards, Alexander Panzhin IT systems architect
RE: ADF showOneTab and CSS
Hey Jonas Thanks for the answer. Any chance you can point me to where this stuff is defined and used? I might look into it myself if theres not a fix out there by May. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Jonas Jacobi [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 5:46 PM To: MyFaces Discussion Subject: Re: ADF showOneTab and CSS Hi Jeremy, You are right in your assumption - the showOneTab component has not been skinned in the release uploaded for evaluation. As soon as (and I guess if) the ADF Faces donation get into the Apache Incubator Oracle will be providing the most recent build of the ADF Faces source available at Oracle, and then we can get going on fixing issues/features like this (if it has not yet been fixed). Thanks Jonas Jeremy Sager wrote: I'm working on a custom skin for my application and have a question aboutthe ADF showOneTab component.In, for example, menuTabs, it is possible to define an image to the left, tothe right, and for the background of a tab, enabling nifty stuff likerounded corners and gradients on the tabs.I have a showOneTab that I would like to be able to do the same sort of cssfanciness for, but don't seem to see any css selectors that support imagesin showOneTab. Is this true or am I missing something?Also, is there a master list of all available css selectors?If there's not a css selector for showOneTab, I'd be interested in findingout how difficult it is to design them myself and maybe contribute it if Ican do it right.Jeremy SagerData Communications Product ManagerChesapeake System Solutions410.356.6805 x120[EMAIL PROTECTED] -- Jonas Jacobi Author: Pro JSF and Ajax: Building Rich Internet Components Blog: http://www.orablogs.com/jjacobi
ADF showOneTab and CSS
I'm working on a custom skin for my application and have a question about the ADF showOneTab component. In, for example, menuTabs, it is possible to define an image to the left, to the right, and for the background of a tab, enabling nifty stuff like rounded corners and gradients on the tabs. I have a showOneTab that I would like to be able to do the same sort of css fanciness for, but don't seem to see any css selectors that support images in showOneTab. Is this true or am I missing something? Also, is there a master list of all available css selectors? If there's not a css selector for showOneTab, I'd be interested in finding out how difficult it is to design them myself and maybe contribute it if I can do it right. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: MyFAces with FAcelets
A few things to examine: Remember in facelets, you are using xhtml, which requires all tags to have an ending, whereas in html you can get away with not doing that which could be the problem. Not properly ending all tags can cause pages to not render. Are you using the correct jar files for facelets? Do you have this in your faces-config.xml? faces-config application view-handler com.sun.facelets.FaceletViewHandler /view-handler /application /faces-config Also, are you using ADF stuff? This can cause additional complications and facelets needs to be configured differently than in the wiki article. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] From: Adam Brod [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 12:40 PM To: MyFaces Discussion Subject: Re: MyFAces with FAcelets That's really a question for the Facelets user group. However, yes, you can have components in your templates, but you have to be a bit careful to define the view component to include all the components. Adam Brod Product Development Team Marco Mistroni [EMAIL PROTECTED] 02/21/2006 12:15 PM Please respond to MyFaces Discussion users@myfaces.apache.org To MyFaces Discussion users@myfaces.apache.org cc Subject Re: MyFAces with FAcelets Hello guys, ok i figured out what's the problem... it's my template layout page that has somethign wrong in it.. when i replaced it iwth the template that comes with facelets demo application everything works fine... i guess i'll get back here when i will find out what's wrong with my original template. one quick question: can a template include JSF elements? will i have problems? thanks and regards marco On 2/21/06, Marco Mistroni [EMAIL PROTECTED] wrote: hello richard, thanx for your reply unfortunately, when i enter pagename.jsf i get following error type Status report message /TestJSFApp/main.jsf description The requested resource (/TestJSFApp/main.jsf) is not available. pls note that this was working when i was usingn tiles... i can't imagine what could be thep roblem am i specifying the wrong handler in jsf-config ? faces-config application locale-config default-localeen/default-locale /locale-config message-bundleresources.MessageResources/message-bundle view-handler com.sun.facelets.FaceletViewHandler /view-handler /application ... /faces-config ? thanx and regards marco On 2/21/06, Richard Frazer [EMAIL PROTECTED] wrote: What's the url you are trying to hit? Based on the web.xml below, you are mapping the faces servlet to *.jsf. The url you enter should be pagename.jsf, not pagename.xhtml. From: Marco Mistroni [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Tue, 21 Feb 2006 16:45:12 + To: MyFaces Discussion users@myfaces.apache.org Subject: Re: MyFAces with FAcelets Hello Adam, when i access main.xhtml, INternet explorer does not 'recongnize' it and ask me if i want to open the page. so, yes, something is not configured properly, but i can' tfigure out what... it looks like it does not recongize facelets tags at all.. since the text that is not supposed to be shown instead it is shown.. here's my main.xhtml !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns= http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml xmlns:ui=http://java.sun.com/jsf/facelets body ui:composition template=/layout/verticalClassicLayout.xhtml This text will not be displayed.Wrong! iw till be.. ui:define name=title BudgetApp version 1.3 - Budget Queries /ui:define This text will also not be displayed. ui:define name=body Simple Test for entry /ui:define /ui:composition /body /html here' s again my wbe.xml ?xml version= 1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd http://java.sun.com/dtd/web-app_2_3.dtd web-app context-param param-namecontextConfigLocation/param-name param-value /WEB-INF/core-context.xml /WEB-INF/web-context.xml /WEB-INF/aop-context.xml /WEB-INF/applicationContext-acegi-security.xml /WEB-INF/applicationContext-common-authorization.xml /WEB-INF/applicationContext-common-business.xml /WEB-INF/faces-context.xml /WEB-INF/dataSourcePopulator.xml /param-value /context-param context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext /param-name param-valueresources.MessageResources/param-value
RE: ADF Blowing Up
Adam - I wrote a response yesterday, not sure why it never went through. You were right. I had it registered in both places, as soon as I took it out of faces-config everything started working fine (except my damned resource servlet, which isn't skinning my pages). Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 1:54 PM To: [EMAIL PROTECTED] Cc: 'MyFaces Discussion' Subject: Re: ADF Blowing Up Hrm, the ADF ViewHandler isn't on the stack - how are you registering FaceletViewHandler? For ADF Faces, it needs to be registered via WEB-INF/web.xml instead of faces-config.xml. -- Adam Jeremy Sager wrote: Hey guys - I'm trying to integrate ADF Faces into a MyFaces/Facelets project. I followed the instructions, both for getting ADF to work in general, and taking the necessary steps to integrate it with facelets. My app runs fine, until I get to a page with an ADF component on it, and then I get a null pointer exception. I traced it to the exact line: _adfRenderingContext.getProperties().put(key, value); And _adfRenderingContext is null. Stack Trace: Jan 31, 2006 11:34:15 AM com.sun.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View java.lang.NullPointerException at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingPrope rty(FacesRenderingContext.java:157) at oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setProperty(Re nderedNodeRenderingContext.java:162) at oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRenderingCont ext.java:81) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesRende ringContext.java:106) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderingCo ntext(FacesRenderingContext.java:79) at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingContext( UINodeRendererBase.java:89) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingConte xt(FacesRenderingContext.java:66) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingConte xt(FacesRenderingContext.java:52) at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRenderin gContext(UINodeRenderer.java:79) at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeBegin (UINodeRenderer.java:38) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:44 1) at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java :427) at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupR endererBase.java:62) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:45 0) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGr idRendererBase.java:203) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRen dererBase.java:85) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:45 0) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGr idRendererBase.java:203) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRen dererBase.java:85) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 554) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfF acesFilterImpl.java:279) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFac esFilterImpl.java:248) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFil terImpl.java:172) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:80
ADF Blowing Up
) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC onnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo rkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Thread.java:595) Any thoughts? I'm sure there's something not set up properly. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: ADF Blowing Up
By the way, is this list now the de facto mailing list for ADF Faces or is there another list I should be subscribed to? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 11:45 AM To: 'MyFaces Discussion'; [EMAIL PROTECTED] Subject: ADF Blowing Up Hey guys - I'm trying to integrate ADF Faces into a MyFaces/Facelets project. I followed the instructions, both for getting ADF to work in general, and taking the necessary steps to integrate it with facelets. My app runs fine, until I get to a page with an ADF component on it, and then I get a null pointer exception. I traced it to the exact line: _adfRenderingContext.getProperties().put(key, value); And _adfRenderingContext is null. Stack Trace: Jan 31, 2006 11:34:15 AM com.sun.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View java.lang.NullPointerException at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingPrope rty(FacesRenderingContext.java:157) at oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setProperty(Re nderedNodeRenderingContext.java:162) at oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRenderingCont ext.java:81) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesRende ringContext.java:106) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderingCo ntext(FacesRenderingContext.java:79) at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingContext( UINodeRendererBase.java:89) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingConte xt(FacesRenderingContext.java:66) at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingConte xt(FacesRenderingContext.java:52) at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRenderin gContext(UINodeRenderer.java:79) at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeBegin (UINodeRenderer.java:38) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:44 1) at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java :427) at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupR endererBase.java:62) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:45 0) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGr idRendererBase.java:203) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRen dererBase.java:85) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:45 0) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGr idRendererBase.java:203) at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRen dererBase.java:85) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 554) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfF acesFilterImpl.java:279) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFac esFilterImpl.java:248) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFil terImpl.java:172) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:80) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF ilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:202
RE: using jsf backing bean in non jsf jsp
Why not just get the bean right from the session attribute map? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 2:20 PM To: 'MyFaces Discussion' Subject: using jsf backing bean in non jsf jsp I have a jsf page the brings up a non jsf jsp in both an iframe and as a popup. I want to use the jsf backing bean (consoleHandler below) in the jsp. I used: % LifecycleFactory lFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = lFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); FacesContextFactory fcFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FA CTORY); FacesContext facesContext = fcFactory.getFacesContext(getServletContext(), request, response, lifecycle); ConsoleHandler consoleHandler = (ConsoleHandler)facesContext.getApplication().getVariableResolver().resolveV ariable(facesContext, consoleHandler); % This worked fine on my development machine, the same bean is used by the jsp page, but when I uploaded it to the production server, the jsp creates a new instance of the backing bean every time it is called (I put a println in the bean constructor). The code base is exactly the same. Any ideas why this would happen? Thanks, Lance
RE: using jsf backing bean in non jsf jsp
Well, the way I would do it would be like this: FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get( yourbeanname); Now, I'm working in Facelets, so I'm not using JSPs at all, but if you don't have access to a FacesContext, then I'd try something along these lines: Assuming you have an HttpServletRequest request... request.getSession().getAttribute(yourbeanname); I think that would work, but you'd have to test it out to be sure, and if it doesn't work, there's some simple way to get access to the Session, because the session exists independently of JSF, JSP, etc. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 4:26 PM To: 'MyFaces Discussion' Subject: RE: using jsf backing bean in non jsf jsp How do I do that? -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 1:09 PM To: 'MyFaces Discussion'; [EMAIL PROTECTED] Subject: RE: using jsf backing bean in non jsf jsp Why not just get the bean right from the session attribute map? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 2:20 PM To: 'MyFaces Discussion' Subject: using jsf backing bean in non jsf jsp I have a jsf page the brings up a non jsf jsp in both an iframe and as a popup. I want to use the jsf backing bean (consoleHandler below) in the jsp. I used: % LifecycleFactory lFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = lFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); FacesContextFactory fcFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FA CTORY); FacesContext facesContext = fcFactory.getFacesContext(getServletContext(), request, response, lifecycle); ConsoleHandler consoleHandler = (ConsoleHandler)facesContext.getApplication().getVariableResolver().resolveV ariable(facesContext, consoleHandler); % This worked fine on my development machine, the same bean is used by the jsp page, but when I uploaded it to the production server, the jsp creates a new instance of the backing bean every time it is called (I put a println in the bean constructor). The code base is exactly the same. Any ideas why this would happen? Thanks, Lance
RE: htmlib, myfaces and facelets
I'm not sure if this is what you're asking for, but if you're looking for a tomahawk tag library for use with facelets, try here: http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Rogerio Pereira [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 1:02 PM To: MyFaces Discussion Subject: htmlib, myfaces and facelets Hi, Someone is using this combination? If yes where i can find htmlib.taglib.xml -- Yours truly (Atenciosamente), Rogério
RE: JSCookMenu throws a null pointer exception for value
Is there anyone out there successfully using the JSCookMenu with facelets? I saw an exchange about adding the necessary stuff to the tag library, but don't think it was confirmed that it was working. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 6:14 PM To: 'MyFaces Discussion' Subject: JSCookMenu throws a null pointer exception for value Hi guys - I'm using MyFaces with Facelets. I've gotten the component and renderer set up in the taglib, and it appears to be working fine, except that I get a null pointer exception when it tries to new up a SelectItem. t:navigationMenuItem id=fileMenu itemLabel=File Here's the relevant part of the stack trace: at javax.faces.model.SelectItem.init(SelectItem.java:69) at org.apache.myfaces.custom.navmenu.NavigationMenuItem.init(NavigationMenuIt em.java:50) at org.apache.myfaces.custom.navmenu.NavigationMenuItem.init(NavigationMenuIt em.java:65) at org.apache.myfaces.custom.navmenu.NavigationMenuUtils.getNavigationMenuItemL ist(NavigationMenuUtils.java:63) at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.encodeCh ildren(HtmlJSCookMenuRenderer.java:120) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:31 9) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 546) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) Do I need to add a value binding for a NavigationMenuItem in order for it to work? That's what the facelets debugger seems to think, but if I make some sort of method that returns a NavigationMenuItem I'm really back on street 1 because I have to pass in a value binding to the NavigationMenuItem I'd create manually or I'd wind up with the same result... Is this a bug or am I missing the obvious? The latter most likely :) Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
JSCookMenu throws a null pointer exception for value
Hi guys - I'm using MyFaces with Facelets. I've gotten the component and renderer set up in the taglib, and it appears to be working fine, except that I get a null pointer exception when it tries to new up a SelectItem. t:navigationMenuItem id=fileMenu itemLabel=File Here's the relevant part of the stack trace: at javax.faces.model.SelectItem.init(SelectItem.java:69) at org.apache.myfaces.custom.navmenu.NavigationMenuItem.init(NavigationMenuIt em.java:50) at org.apache.myfaces.custom.navmenu.NavigationMenuItem.init(NavigationMenuIt em.java:65) at org.apache.myfaces.custom.navmenu.NavigationMenuUtils.getNavigationMenuItemL ist(NavigationMenuUtils.java:63) at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.encodeCh ildren(HtmlJSCookMenuRenderer.java:120) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:31 9) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 546) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java: 551) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) Do I need to add a value binding for a NavigationMenuItem in order for it to work? That's what the facelets debugger seems to think, but if I make some sort of method that returns a NavigationMenuItem I'm really back on street 1 because I have to pass in a value binding to the NavigationMenuItem I'd create manually or I'd wind up with the same result... Is this a bug or am I missing the obvious? The latter most likely :) Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Why tabs look like buttons?
Hi guys - I know I'm resurrecting a dead thread here, but I have run into the same problem under different circumstances. I'm trying out facelets based on the recommendations of people on this list, and everything is going great so far, I'll probably never go back to JSPs. However, when I create a panelTabbedPane, all of my panel tabs look like buttons instead of panel tabs. I don't have any save logic, and I've tried the css workaround, but all that it does is make the BODY area of my panel tabs the color specified, and it leaves the tabs as buttons with no border around them. I've got to present facelets to my boss in a few hours, so if anyone knows what's up with this, I'd appreciate the help ASAP :) FYI I'm using MyFaces 1.1.0 Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Don Tam [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 11:17 AM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? Hi Bobby, Thanks for your response. I have that exact declaration in my css and it's still white. I put the declaration just underneath another style class that I know is working. Do you know what the problem is? Here is the head that is generated on the page: head meta HTTP-EQUIV=Content-Type CONTENT=text/html;charset=UTF-8 titlestuff/title link rel=stylesheet type=text/css href=/dir/css/basic.css script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRe nderer/11302665/JSCookMenu.js type=text/javascript!-- //--/script script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRe nderer/11302665/MyFacesHack.js type=text/javascript!-- //--/script script type=text/javascript!-- myThemeOfficeBase='/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.Ht mlJSCookMenuRenderer/11302665/ThemeOffice/'; //--/script script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRe nderer/11302665/ThemeOffice/theme.js type=text/javascript!-- //--/script link rel=stylesheet href=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuR enderer/11302665/ThemeOffice/theme.css type=text/css / link rel=stylesheet href=/dir/faces/myFacesExtensionResource/tabbedpane.HtmlTabbedPaneRenderer/ 11302665/defaultStyles.css type=text/css / script src=/dir/faces/myFacesExtensionResource/tabbedpane.HtmlTabbedPaneRenderer/1 1302665/dynamicTabs.js type=text/javascript!-- //--/script style rel=stylesheet type=text/css!-- #_id2__id3 .myFaces_panelTabbedPane_activeHeaderCell input, #_id2__id3 .myFaces_panelTabbedPane_pane, #_id2__id3 .myFaces_panelTabbedPane_subHeaderCell{ background-color:white; } --/style/head Here is my basic.css: .* { font-family : verdana, Geneva, Arial, Helvetica, sans-serif; } ... .myFaces_panelTabbedPane_pane { background-color: blue; } Thanks, Bobby Rosenberger wrote: Hey Don, I did some experimenting and found that changing the selector you mention does have an effect on my tabpanes. For instance, I did the following: .myFaces_panelTabbedPane_pane { background-color: blue; } and found the background color of my tabbedpanes had indeed changed to blue. Bobby On 11/16/05, *Don Tam* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I was just wondering, on a semi-related note, how would I set it up so that I can use a stylesheet class to set the background color of the panelTabbedPane instead of using the bgcolor attribute in the tag? I've tried declaring .myFaces_panelTabbedPane_pane in my stylesheet but it doesn't have any effect. Thanks, Bobby Rosenberger wrote: Hey Rodney, I noticed that the tabs looked like buttons as well... but I found that it was due to my changing my XP theme to use the XP Windows Theme. And, in my case, the tabs only looked like buttons when using IE. I'd be surprised if adding the 'save logic' were responsible for the style change. Are you saying you can remove the logic and the tabs revert back to their normal non-button look? I'd be interested to hear the results of that experiment. In any case, there is currently no 'attribute' that allows you to control the 'style' of the input tag on the tabs. You CAN, however, override the style selector as follows: .myFaces_panelTabbedPane_activeHeaderCell input { background-color: transparent !important; etc... } Note the use of !important. Hope that helps. Bobby Rosenberger On 11/16/05, *Burke, Rodney* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, I had a working tab panel that looked normal. However
RE: Why tabs look like buttons?
Thanks Dennis. Where can I find the full list of those attributes? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:20 AM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? They are buttons in JSP as well. You can fix this by making use of the many CSS related attributes of the panel tab component. -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Friday, January 6, 2006 11:20 AM To: ''MyFaces Discussion'' Subject: RE: Why tabs look like buttons? Hi guys - I know I'm resurrecting a dead thread here, but I have run into the same problem under different circumstances. I'm trying out facelets based on the recommendations of people on this list, and everything is going great so far, I'll probably never go back to JSPs. However, when I create a panelTabbedPane, all of my panel tabs look like buttons instead of panel tabs. I don't have any save logic, and I've tried the css workaround, but all that it does is make the BODY area of my panel tabs the color specified, and it leaves the tabs as buttons with no border around them. I've got to present facelets to my boss in a few hours, so if anyone knows what's up with this, I'd appreciate the help ASAP :) FYI I'm using MyFaces 1.1.0 Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Don Tam [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 11:17 AM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? Hi Bobby, Thanks for your response. I have that exact declaration in my css and it's still white. I put the declaration just underneath another style class that I know is working. Do you know what the problem is? Here is the head that is generated on the page: head meta HTTP-EQUIV=Content-Type CONTENT=text/html;charset=UTF-8 titlestuff/title link rel=stylesheet type=text/css href=/dir/css/basic.css script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuR e nderer/11302665/JSCookMenu.js type=text/javascript!-- //--/script script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuR e nderer/11302665/MyFacesHack.js type=text/javascript!-- //--/script script type=text/javascript!-- myThemeOfficeBase='/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.H t mlJSCookMenuRenderer/11302665/ThemeOffice/'; //--/script script src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuR e nderer/11302665/ThemeOffice/theme.js type=text/javascript!-- //--/script link rel=stylesheet href=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenu R enderer/11302665/ThemeOffice/theme.css type=text/css / link rel=stylesheet href=/dir/faces/myFacesExtensionResource/tabbedpane.HtmlTabbedPaneRenderer / 11302665/defaultStyles.css type=text/css / script src=/dir/faces/myFacesExtensionResource/tabbedpane.HtmlTabbedPaneRenderer/ 1 1302665/dynamicTabs.js type=text/javascript!-- //--/script style rel=stylesheet type=text/css!-- #_id2__id3 .myFaces_panelTabbedPane_activeHeaderCell input, #_id2__id3 .myFaces_panelTabbedPane_pane, #_id2__id3 .myFaces_panelTabbedPane_subHeaderCell{ background-color:white; } --/style/head Here is my basic.css: .* { font-family : verdana, Geneva, Arial, Helvetica, sans-serif; } ... .myFaces_panelTabbedPane_pane { background-color: blue; } Thanks, Bobby Rosenberger wrote: Hey Don, I did some experimenting and found that changing the selector you mention does have an effect on my tabpanes. For instance, I did the following: .myFaces_panelTabbedPane_pane { background-color: blue; } and found the background color of my tabbedpanes had indeed changed to blue. Bobby On 11/16/05, *Don Tam* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I was just wondering, on a semi-related note, how would I set it up so that I can use a stylesheet class to set the background color of the panelTabbedPane instead of using the bgcolor attribute in the tag? I've tried declaring .myFaces_panelTabbedPane_pane in my stylesheet but it doesn't have any effect. Thanks, Bobby Rosenberger wrote: Hey Rodney, I noticed that the tabs looked like buttons as well... but I found that it was due to my changing my XP theme to use the XP Windows Theme. And, in my case, the tabs only looked like buttons when using IE. I'd be surprised if adding the 'save logic' were responsible for the style change. Are you saying you can remove the logic and the tabs revert back to their normal non-button look? I'd be interested to hear the results of that experiment. In any case, there is currently
RE: Why tabs look like buttons?
I have a question about specifically how to make the tabs not look like buttons. The colors and borders are showing up nicely, but it still looks like a button. Is there some specific attribute I should be setting in editorPane_activeTab to make it not look like a button? I know I'm a neophyte at this and I apologize for the barrage of questions... Here's my component: t:panelTabbedPanebinding=#{editorPanelBean.pane} id=#{editorPanelBean.uniqueID} activeTabStyleClass=editorPane_activeTab inactiveTabStyleClass=editorPane_inactiveTab tabContentStyleClass=editorPane_tabContent This is my css entry: .editorPane_activeTab { background-color: #316AC5 !important; font-family: verdana; font-size: 10px; font-color: #FF !important; } .editorPane_inactiveTab { background-color: #AA !important; border-style: solid !important; border-width: 1px !important; border-color: #44 !important; font-family: verdana !important; font-size: 10px !important; } .editorPane_tabContent { background-color: #FF !important; border-style: solid !important; border-width: 1px !important; border-color: #00 !important; font-family: verdana !important; font-size: 10px !important; } .myFaces_panelTabbedPane{ background-color: #316AC5 !important; border-style: solid !important; border-width: 1px !important; border-color: #00 !important; } Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 4:47 PM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? You are using free software. -Original Message- From: Dave [mailto:[EMAIL PROTECTED] Sent: Friday, January 6, 2006 04:38 PM To: 'MyFaces Discussion' Subject: RE: Why tabs look like buttons? It would be great if the tab looks professional Jeremy Sager [EMAIL PROTECTED] wrote: Thanks Dennis. Where can I find the full list of those attributes? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:20 AM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? They are buttons in JSP as well. You can fix this by making use of the many CSS related attributes of the panel tab component. -Original Message- From: Jeremy Sager [mailto:[EMAIL PROTECTED] Sent: Friday, January 6, 2006 11:20 AM To: ''MyFaces Discussion'' Subject: RE: Why tabs look like buttons? Hi guys - I know I'm resurrecting a dead thread here, but I have run into the same problem under different circumstances. I'm trying out facelets based on the recommendations of people on this list, and everything is going great so far, I'll probably never go back to JSPs. However, when I create a panelTabbedPane, all of my panel tabs look like buttons instead of panel tabs. I don't have any save logic, and I've tried the css workaround, but all that it does is make the BODY area of my panel tabs the color specified, and it leaves the tabs as buttons with no border around them. I've got to present facelets to my boss in a few hours, so if anyone knows what's up with this, I'd appreciate the help ASAP :) FYI I'm using MyFaces 1.1.0 Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Don Tam [mailto:[EMAIL PROTECTED] Sent: Thursday, November 17, 2005 11:17 AM To: MyFaces Discussion Subject: Re: Why tabs look like buttons? Hi Bobby, Thanks for your response. I have that exact declaration in my css and it's still white. I put the declaration just underneath another style class that I know is working. Do you know what the problem is? Here is the head that is generated on the page: src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMen uR e nderer/11302665/JSCookMenu.js type=text/javascript //-- src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMen uR e nderer/11302665/MyFacesHack.js type=text/javascript //-- myThemeOfficeBase='/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.H t mlJSCookMenuRenderer/11302665/ThemeOffice/'; //-- src=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMen uR e nderer/11302665/ThemeOffice/theme.js type=text/javascript //-- href=/dir/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMen u R enderer/11302665/ThemeOffice/theme.css type=text/css / href=/dir/faces/myFacesExtensionResource/tabbedpane.HtmlTabbedPaneRendere r / 11302665/defaultStyles.css type=text/css / src=/dir/faces/myFacesExtensionResource
Importing a JSP inside the setter method of a bound component...
Thanks in advance for any help on this one, I think its a bit tricky. So, I have a HtmlPanelTabPane that I need to render the children of dynamically, and Ive gotten the binding down pat thanks in large part to help from Martin M. So now Im working inside of a java object instead of a jsp Ive created the HtmlPanelTab children just fine, and now I am hoping that I can import a jsp so I dont have to keep rendering child components with java code instead of using the taglib like I want to. Now, since I know any import has to be done within an f:subview, I went and figured out that a subview is a UINamingContainer, so I made one of them Now what? It doesnt seem like importing a page is built into any part of faces for reasons I cant really figure out, so Im stuck as to what I need to do next. Do I have to get the external servlet context, find the jsp writer, and figure out how to use import tag objects? Or, as Im hoping, Im not the first person to run into this challenge and someone can tell me that its easily solvable, or, even better, someone can call me a dummy and show me that importing a page programmatically in faces and I just missed the boat. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Component binding is not refreshed?
Well, I've gotten the setter method working just fine, but have run into another problem immediately. It's really the same problem, but instead of being inside a JSP I'm inside a regular Java method: public void setPane(HtmlPanelTabbedPane component){ FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); if (pane == null){ pane = (HtmlPanelTabbedPane)app.createComponent(TABBEDPANE); } if (tab == null){ tab = (HtmlPanelTab)app.createComponent(PANELTAB); } numtimes ++; System.out.println(Numtimes = + numtimes); tab.setLabel(Integer.toString(numtimes)); System.out.println(tab.getLabel()); } Now, what I get on the console if I've refreshed 3 times is: Numtimes = 3 3 But what displays on the tab header is 1. Now, I realize this is happening because the tab itself is using the saved version that has been restored. To get around this, it seems to me like I will need to create a value binding for the tab itself, but it's not immediately clear how to do this. Now, I see the method in UIComponentBase: setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding) but... I need to pass in a ValueBinding object, and looking at the javadoc for the ValueBinding object, it's not at all clear what I need to do with it. I guess an alternative way to do this would be to completely recreate the tabbed pane every time and add the children back in, but then I'm going to lose the state of my child tabs, meaning if work has been done in more than one tab and I have to refresh, all that work will be lost, so that's not a realistic solution for me. What I really need to be able to do is query my child tab in a setter method and figure out whether I need to restore state or recreate it, which I can handle on my own no problem... I just need to figure out how to programmatically bind the tab so that I can get into its setter method. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Monday, December 19, 2005 4:09 PM To: MyFaces Discussion Subject: Re: Component binding is not refreshed? Hi Jeremy, your conclusion is absolutely right. The getter of the method-binding will only be called once - then the component is recreated from the saved state, and will not be created by calling your getter. You'll understand this if you think about the state saving feature of JSF - if you would be able to provide a new component at every request, how would the state saving ever work? If you want to change your component, you'll need to provide a _setter_ for the component, and do the modifications there or in an action-method (which runs after the setter for the component has been called, so you can access the actual JSF component there). The setter will be called on every request! regards, Martin On 12/19/05, Jeremy Sager [EMAIL PROTECTED] wrote: Hey guys - Thanks in advance for your help. I have a panelTabbedPane that I am binding directly to a bean so that I can create the pane programmatically. Here is the tag definition: t:panelTabbedPane binding=#{editorPanelBean.pane}/ Now, in my bean, I have the getPane() method. I have included the entire class file here (don't worry, it's not big) except for the package and import declarations. The IEditorPanelTabBean list can be safely ignored, it's not being used. /** * @jsf.bean name=editorPanelBean scope=session */ public class EditorPanelBean { private ArrayListIEditorPanelTabBean tabs = new ArrayListIEditorPanelTabBean(); private String TABBEDPANE = org.apache.myfaces.HtmlPanelTabbedPane; private String PANELTAB = org.apache.myfaces.HtmlPanelTab; //private String TABBEDPANE = HtmlPanelTabbedPane.class.getName(); //private String PANELTAB = HtmlPanelTab.class.getName(); private UIComponent pane = null; private HtmlPanelTab tab = null; private int numtimes = 0; public UIComponent getPane (){ FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); if (pane == null){ pane = app.createComponent(TABBEDPANE); } if (tab == null){ tab = (HtmlPanelTab)app.createComponent(PANELTAB); } numtimes
JSTL + JSF question
Hi guys - Thanks in advance for any answers :) I need to iterate over something in one of my JSPs that is a list maintained in a session scoped JSF bean. I am trying to use this JSTL tag: c:forEach var=children items=$editorPanelBean.list Is this legal? Or do I need to do something complicated like using a JSP scriptlet to get my request parameters and go digging for the map? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
Component binding is not refreshed?
Hey guys Thanks in advance for your help. I have a panelTabbedPane that I am binding directly to a bean so that I can create the pane programmatically. Here is the tag definition: t:panelTabbedPane binding=#{editorPanelBean.pane}/ Now, in my bean, I have the getPane() method I have included the entire class file here (dont worry, its not big) except for the package and import declarations. The IEditorPanelTabBean list can be safely ignored, its not being used. /** * @jsf.bean name=editorPanelBean scope=session */ public class EditorPanelBean { private ArrayListIEditorPanelTabBean tabs = new ArrayListIEditorPanelTabBean(); private String TABBEDPANE = org.apache.myfaces.HtmlPanelTabbedPane; private String PANELTAB = org.apache.myfaces.HtmlPanelTab; //private String TABBEDPANE = HtmlPanelTabbedPane.class.getName(); //private String PANELTAB = HtmlPanelTab.class.getName(); private UIComponent pane = null; private HtmlPanelTab tab = null; private int numtimes = 0; public UIComponent getPane (){ FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); if (pane == null){ pane = app.createComponent(TABBEDPANE); } if (tab == null){ tab = (HtmlPanelTab)app.createComponent(PANELTAB); } numtimes ++; System.out.println(Numtimes = + numtimes); tab.setLabel(Integer.toString(numtimes)); pane.getChildren().add(tab); return pane; } } Now, as you can see, it should be printing out to the console the value of numtimes. When the page first loads, everything goes as expected. However, if I hit the refresh button in my browser, nothing prints out to the console, and it never hits the method in Eclipses debug mode (which it does on initial load). I have another tag, for a table, whose data is backed by a bean on the same page (not the same jsp, but they are both imported by another container page). h:dataTable value=#{todoHandler.todoListModel} var=list first=#{todoHandler.firstRowIndex} rows=#{todoHandler.noOfRows} styleClass=view rowClasses=tableRow Now, the method ToDoHandler.getNoOfRows also has a sysout, which DOES print to the console every time I refresh the page, so I know its not that Im just getting some cached version or that my browser is bugging out. They are both session level beans as you can see: managed-bean managed-bean-nametodoHandler/managed-bean-name managed-bean-class(name omitted).ToDoListHandler/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean managed-bean managed-bean-nameeditorPanelBean/managed-bean-name managed-bean-class(name omitted).EditorPanelBean/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean So what gives? Does the component binding not refresh when the page is reloaded, but the value binding does? I know this is a lot of information, but Id rather give too much than too little, and I appreciate any help I can get as this has turned into a total blocker issue for me. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Component binding is not refreshed?
Hi again Martin - Thanks for the quick response! I now have a stupid question... what's the syntax for my setter method? I created a setPane() and a setPane(UIComponent component) method in my bean, but neither got called. I assume I'm supposed to be creating it on the bean, but I'm not sure what the syntax should be. As for the action method you mentioned, would that be during the Process Events phase after the Invoke Application phase in the JSF lifecycle? I'm not sure when it would be fired or exactly where I would put it. Thanks again. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Monday, December 19, 2005 4:09 PM To: MyFaces Discussion Subject: Re: Component binding is not refreshed? Hi Jeremy, your conclusion is absolutely right. The getter of the method-binding will only be called once - then the component is recreated from the saved state, and will not be created by calling your getter. You'll understand this if you think about the state saving feature of JSF - if you would be able to provide a new component at every request, how would the state saving ever work? If you want to change your component, you'll need to provide a _setter_ for the component, and do the modifications there or in an action-method (which runs after the setter for the component has been called, so you can access the actual JSF component there). The setter will be called on every request! regards, Martin On 12/19/05, Jeremy Sager [EMAIL PROTECTED] wrote: Hey guys - Thanks in advance for your help. I have a panelTabbedPane that I am binding directly to a bean so that I can create the pane programmatically. Here is the tag definition: t:panelTabbedPane binding=#{editorPanelBean.pane}/ Now, in my bean, I have the getPane() method. I have included the entire class file here (don't worry, it's not big) except for the package and import declarations. The IEditorPanelTabBean list can be safely ignored, it's not being used. /** * @jsf.bean name=editorPanelBean scope=session */ public class EditorPanelBean { private ArrayListIEditorPanelTabBean tabs = new ArrayListIEditorPanelTabBean(); private String TABBEDPANE = org.apache.myfaces.HtmlPanelTabbedPane; private String PANELTAB = org.apache.myfaces.HtmlPanelTab; //private String TABBEDPANE = HtmlPanelTabbedPane.class.getName(); //private String PANELTAB = HtmlPanelTab.class.getName(); private UIComponent pane = null; private HtmlPanelTab tab = null; private int numtimes = 0; public UIComponent getPane (){ FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); if (pane == null){ pane = app.createComponent(TABBEDPANE); } if (tab == null){ tab = (HtmlPanelTab)app.createComponent(PANELTAB); } numtimes ++; System.out.println(Numtimes = + numtimes); tab.setLabel(Integer.toString(numtimes)); pane.getChildren().add(tab); return pane; } } Now, as you can see, it should be printing out to the console the value of numtimes. When the page first loads, everything goes as expected. However, if I hit the refresh button in my browser, nothing prints out to the console, and it never hits the method in Eclipse's debug mode (which it does on initial load). I have another tag, for a table, whose data is backed by a bean on the same page (not the same jsp, but they are both imported by another container page). h:dataTable value=#{todoHandler.todoListModel} var=list first=#{todoHandler.firstRowIndex} rows=#{todoHandler.noOfRows} styleClass=view rowClasses=tableRow Now, the method ToDoHandler.getNoOfRows also has a sysout, which DOES print to the console every time I refresh the page, so I know it's not that I'm just getting some cached version or that my browser is bugging out. They are both session level beans as you can see: managed-bean managed-bean-nametodoHandler/managed-bean-name managed-bean-class(name omitted).ToDoListHandler/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean managed-bean managed-bean-nameeditorPanelBean/managed-bean-name managed-bean-class(name omitted).EditorPanelBean/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean So. what gives? Does the component binding not refresh when the page is reloaded, but the value binding does? I know this is a lot of information, but I'd rather give too
Partial page refresh in JSF?
Hi guys Thanks in advance for your answer to this question My company is trying to put together a web client application using JSF that has the look and feel of the Eclipse Rich Client Platform. While weve had a good bit of success so far, Ive run into an issue that Im hoping you guys can give me some advice on. Basically, I need to do partial page refreshes. I have a page with three subpages on it that I am controlling the layout of with tiles, although I am not tied to tiles at this point if it isnt the right answer. I need to be able to click on a hyperlink on one of the subpages and initiate a refresh action on another one of the subpages without refreshing the parent page, because two of my subpages require significant database action and hence take some time to load, and a user might typically want to click on a decent number of links in quick succession. (For those of you familiar with RCP, clicking a link in the view opens up a new editor in the editor pane). I was hoping that you guys could throw some advice my way on how to refresh the pages in a subview or tile without refreshing the whole darn thing. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: Partial page refresh in JSF?
Thanks Richard. This appears to be exactly what we are looking for. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Richard Wallace [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 07, 2005 4:34 PM To: MyFaces Discussion Subject: Re: Partial page refresh in JSF? Have you looked at AjaxAnywhere (http://ajaxanywhere.sourceforge.net/) yet? It works exactly this way, giving you zones on the page that get reloaded when certain actions occur. Jeremy Sager wrote: Hi guys - Thanks in advance for your answer to this question. My company is trying to put together a web client application using JSF that has the look and feel of the Eclipse Rich Client Platform. While we've had a good bit of success so far, I've run into an issue that I'm hoping you guys can give me some advice on. Basically, I need to do partial page refreshes. I have a page with three subpages on it that I am controlling the layout of with tiles, although I am not tied to tiles at this point if it isn't the right answer. I need to be able to click on a hyperlink on one of the subpages and initiate a refresh action on another one of the subpages without refreshing the parent page, because two of my subpages require significant database action and hence take some time to load, and a user might typically want to click on a decent number of links in quick succession. (For those of you familiar with RCP, clicking a link in the view opens up a new editor in the editor pane). I was hoping that you guys could throw some advice my way on how to refresh the pages in a subview or tile without refreshing the whole darn thing. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Adding a page back into a component
For reasons too long to go into, I have a tabbed pane that I am creating programmatically using a value binding expression in my JSF tag like so: t:panelTabbedPane binding=#{editorPanelBean.pane}/ Now, in the getPane method of my bean, I use the Application class to create my pane and a child tab: UIComponent pane = app.createComponent(TABBEDPANE); UIComponent childtab = app.createComponent(PANELTAB); HtmlPanelTab tab = (HtmlPanelTab) childtab; Now, I want to start adding contents to my child tab... am I locked into doing it programmatically or is it possible to somehow refer back to a page with tags to generate the contents of the tab? Thanks in advance, Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
RE: open source icons
Try this site: http://www.iconarchive.com/ Go look in the decorative caps section. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Dennis Byrne [mailto:[EMAIL PROTECTED] Sent: Sunday, November 20, 2005 1:06 PM To: MyFaces Discussion Subject: Re: open source icons Both Hendrik and Mike's links had interesting stuff, but what I really just need is the Latin alphabet. Original message Date: Sun, 20 Nov 2005 11:30:14 -0600 From: Wayne Fay [EMAIL PROTECTED] Subject: Re: open source icons To: MyFaces Discussion users@myfaces.apache.org Netbeans, Eclipse, etc all come with a ton of icons. Depending on the licensing of the app, perhaps you could find what you need there and use them? Wayne On 11/20/05, Hendrik Neumann [EMAIL PROTECTED] wrote: I don't know what exactly you mean, but maybe http://www.openclipart.org/ helps you out ;-) 2005/11/18, Dennis Byrne [EMAIL PROTECTED]: I use the icons in myfaces.jar . Currently I'd like a small icon for each letter of the latin alphabet, something not distributed w/ myFaces. Does anyone where I can get this? I am hoping for a response like oh, yeah - I remember something like that when I used insert OS project name . Dennis Byrne -- Mit freundlichen Grüßen / Greetings, Hendrik Neumann; Ruhr-University of Bochum Dennis Byrne
RE: Overriding JSCookMenu CSS?
Tomahawk 5.5 Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED] -Original Message- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 5:13 PM To: MyFaces Discussion Subject: Re: Overriding JSCookMenu CSS? Jeremy Sager wrote: Does anyone know of a way to override the CSS sheets being used to create the JSCookMenu themes so I can create my own? There must be some specific place the menu looks for a CSS sheet. What version of Tomahawk are you using?
MyFaces book?
I was wondering if there is a MyFaces book out there, or one that is coming out soon? Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
Overriding JSCookMenu CSS?
Does anyone know of a way to override the CSS sheets being used to create the JSCookMenu themes so I can create my own? There must be some specific place the menu looks for a CSS sheet. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]
Making JSCookMenu transparent?
Hi all Im looking to put a jscookmenu with an image and no text on top of a menu bar that has a light blue color. I need to make it transparent, so that all you can see is the image. The problem is that I cant seem to find any sort of styleClass attribute that I can use to access a style sheet. Jeremy Sager Data Communications Product Manager Chesapeake System Solutions 410.356.6805 x120 [EMAIL PROTECTED]