RE: How do you access public static final values in your JSF app?

2009-11-25 Thread Matt.Rossner-prest
I had this exact problem. My solution was to create a managed bean in the application scope that implements the Map interface. You need to override the get method and in there I use reflection to find the constant field value. Then I store that in an actual HashMap (which is declared as final

RE: AW: Possible to force bean to load into session at session start up?

2009-11-25 Thread Matt.Rossner-prest
I agree with the others that it's better to redesign the application, however it's possible to access a managed bean as long as you can have the faces context available. You need to do something like this, I don't remember the exact syntax...

RE: Component id doesn't support EL?

2009-09-02 Thread Matt.Rossner-prest
Not really, I believe it's in the JSF specification that the ID is not allowed to be dynamic. I actually wrote about this on my blog (which is not very popular since I don't really promote it much), but you can check it out http://rossner.wordpress.com , I think it's actually the most recent one

Question about t:saveState and performance

2009-05-19 Thread Matt.Rossner-prest
Hi, I have a JSP page (let's call it page1.jsp) that's used from two different parts of the application. The two different parts use two different beans (bean1, bean2) on my page (page1.jsp) I have a saveState for both bean1 and bean2. Now at any given usage of page1, only bean1 or bean2 will

RE: Can I use h:commandButton on a Tomahawk t:aliasBean aliased bean

2009-04-24 Thread Matt.Rossner-prest
Maybe you forgot to put it in an h:form ? It should work, I've done some similar things. That's the only thing I can think of for now. I know sometimes when I'm testing I forgot something obvious like that and none of the commands work. -Original Message- From: Baljeet Nijjhar

RE: Change the default icons of a tree2 component

2009-04-16 Thread Matt.Rossner-prest
Have you checked out the documentation for tree2? There's an attribute showNav which you can set to false. Then you can put in your own images. -Original Message- From: mitroiasi [mailto:mitroi...@yahoo.com] Sent: jeudi 16 avril 2009 13:01 To: users@myfaces.apache.org Subject: Change the

Message bundle problem

2009-03-06 Thread Matt.Rossner-prest
Hi, I need to access a message bundle property like so: t:outputText value=#{msg['linked.' + bean.type]} / Although that syntax doesn't quite work. I've tried a few things. The closest I got was using a t:aliasBean like t:aliasBean alias=#{key} value=linked.#{bean.type} /

RE: Message bundle problem

2009-03-06 Thread Matt.Rossner-prest
This looks interesting. I've been to implement a similar approach using a dummy Map that builds the key. Although I think your solution looks even nicer than what I came up with. I'll have to give it try. Thanks From: Michael Heinen

RE: JSF - display a collection in one line?

2009-02-24 Thread Matt.Rossner-prest
Sure, the tomahawk dataList component does just that. Check out the docs here. http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_dataList.html use layout=simple to display them on one line. -Original Message- From: kareda [mailto:k...@digiplace.ch] Sent: mardi 24 février

RE: execute multiple buttons in jsf one after the other

2009-01-28 Thread Matt.Rossner-prest
Ok, here's a possible solution for you. I've done something similar (in terms of executing other actions without actually clicking the command link or button). You have 3 buttons, make them a4j:commandButton components. Give them ids like button1, button2, button3 I'll assume you have 3 action

RE: Quite advanced JSF problem

2008-12-23 Thread Matt.Rossner-prest
Have you considered using Ajax4JSF? It kind of already does what you're trying to do. It may save you a lot of time. I'm currently using it with MyFaces and it works pretty well. -Original Message- From: Andrew Robinson [mailto:andrew.rw.robin...@gmail.com] Sent: mardi 23 décembre

RE: t:inputFileUpload Default URL

2008-12-17 Thread Matt.Rossner-prest
Hi, Also if I recall correctly the accept attribute doesn't necessarily work in all browsers. Although it may just be IE6, which I've been stuck developing an intranet application for... But I'll have to agree with Simon that there is no way to specify a starting directory and it is a limit of

RE: Attach the current JSF View as an attachment

2008-12-03 Thread Matt.Rossner-prest
Hi Madhav, This is an interesting requirement. Off the top of my head I'd say you could probably make a custom component to wrap the section you want to capture. Then in that components renderer, in the encodeBegin method you switch the responseWriter to a StringWriter or some other writer.

RE: [TOBAGO] How to escape from a validation error with an escape button

2008-11-28 Thread Matt.Rossner-prest
Try setting immediate=true on the cancel button. -Original Message- From: Groovie [mailto:[EMAIL PROTECTED] Sent: vendredi 28 novembre 2008 09:31 To: users@myfaces.apache.org Subject: [TOBAGO] How to escape from a validation error with an escape button Salut M'cs, i build a dialog

Generating unique ids for t:checkbox

2008-11-26 Thread Matt.Rossner-prest
Hello, Today we noticed that the t:checkbox component used inside a t:selectManyCheckbox generates checkboxes all with the same ID. This is a probably since we use h:outputLabel with the for attribute, mainly for accessibility purposes, but the ids don't match. We have something like this in

RE: managed bean with request scope

2008-10-02 Thread Matt.Rossner-prest
It just means you have some EL reference in the page like t:outputText value=#{myBean.someVariable} / In this case myBean is being referenced. -Original Message- From: Alex Diaz [mailto:[EMAIL PROTECTED] Sent: jeudi 2 octobre 2008 18:28 To: MyFaces Discussion Subject: Re: managed bean

RE: Breadcrumbs Component

2008-09-29 Thread Matt.Rossner-prest
Your original suggestion of using a Stack should work just fine. Then on the JSP side you can use t:dataList. I have something very similar on the project I'm working on. It's kind of complicated to explain but we have a session bean managing a tree and whenever the page is changed a method is

RE: SaveState Session or Not ?

2008-09-17 Thread Matt.Rossner-prest
There's some info in the wiki page http://wiki.apache.org/myfaces/SaveState I think generally though you would use the saveState instead of the session. You can put a managed bean in a saveState tag and it will be saved in the page, probably in the viewState... I used it a while ago on a request

Problem with checkbox

2008-09-03 Thread Matt.Rossner-prest
Hi, I'm having a strange problem with the t:selectBooleanCheckbox component. I'm using the Ajax4JSF framework as well. So I have a div containing some form fields, one of them being the checkbox. It has a save button and a cancel button. To the left of that is a tree with different items. The

RE: [Tomahawk] - Both MyFaces and the RI are on your classpath

2008-05-20 Thread Matt.Rossner-prest
Hi Mario, I think it is just lucky. We're running myfaces on WebSphere 6.1 and at first we didn't bother configuring the classpath. Some pages loaded fine but others give inexplicable errors that we'd never seen in dev (Tomcat). After reading the wiki page and making some adjustments it works

RE: MyFaces Tree2 Component

2008-04-22 Thread Matt.Rossner-prest
Hi Jack, I can tell you this about Tree2, it doesn't handle dynamic data changes very well. I'm using it on a project now for a similar type of project and I've had to do a lot of extra work to get it to do what I want. Specifically with the tree state, I've also more or less rewritten the

RE: Using t:dataList with Ajax4JSF

2008-04-21 Thread Matt.Rossner-prest
Hi Martin, I see your point, I will make the changes. I've been on holiday all week hence the delay in my response, but thanks for your input on this. Matt -Message d'origine- De : Martin Marinschek [mailto:[EMAIL PROTECTED] Envoyé : vendredi 11 avril 2008 10:28 À : MyFaces Discussion

Using t:dataList with Ajax4JSF

2008-04-10 Thread Matt.Rossner-prest
Hi, I have a small problem with t:dataList and Ajax4JSF. I'm going to step through this in the debugger soon but maybe someone's already encountered this. I have a t:dataList like so: t:dataList id=dataList var=element value=#{mbDataList.folderList} layout=unorderedList

RE: Using t:dataList with Ajax4JSF

2008-04-10 Thread Matt.Rossner-prest
Ok I found the problem already, this would appear to be a bug with Tomahawk (as I have the source attached here). Looks like itemStyleClass was omitted from the saveState method. When I was debugging this I noticed the value for it was null. Listing from HtmlDataList.java public Object

RE: Using t:dataList with Ajax4JSF

2008-04-10 Thread Matt.Rossner-prest
Fix if anyone's interested : public class HtmlDataList extends org.apache.myfaces.custom.datalist.HtmlDataList { public Object saveState(FacesContext context) { Object [] values = new Object[2]; values[0] = super.saveState(context); values[1] =

Is it possible to have a renderer do its rendering at the end of the document?

2008-03-28 Thread Matt.Rossner-prest
Hi, The subject is vague so here's a more detailed description. I have a context menu component that I've written. The way it works is by rendering a div with the context menu items, anything that's in the javax.output.Command family is an item. The div is initially set to hidden. In the

RE: Is it possible to use AddResource with my own components?

2008-01-16 Thread Matt.Rossner-prest
Thanks, this helps a lot. You're right it's not difficult or fancy but it was also not documented until now. So I thank you for taking the time to update the wiki page. Matt -Message d'origine- De : Martin Marinschek [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 janvier 2008 09:37 À 

RE: Action behind plus/minus icon tree2 tomahawk

2008-01-15 Thread Matt.Rossner-prest
I followed that same example. Basically you need to disable the +/- generated by tomahawk and use your own. Which is what Bill does in his example. In your command link, or ajax link use t.toggleExpanded for the action and then have an actionListener call toggle(ActionEvent e) to load the

RE: Action behind plus/minus icon tree2 tomahawk

2008-01-15 Thread Matt.Rossner-prest
#{node.leaf} will return a boolean. If it returns true the component in question will be rendered, else... not. Even if you're using your own TreeNode (as I'm sure most of us are), isLeaf is in the TreeNode interface so your TreeNode must have this method. If the node is meant to be

Is it possible to use AddResource with my own components?

2008-01-11 Thread Matt.Rossner-prest
Hi, I've written a custom component that requires some Javascript. I have the js in an external file but I was hoping to have it included in the tag, kind of like the myfaces tags do. I tried using the AddResource class, basically looked at the myfaces source and tried to do the same thing,

RE: How to reset tree state?

2008-01-10 Thread Matt.Rossner-prest
I'll try it out, thanks. -Message d'origine- De : David Delbecq [mailto:[EMAIL PROTECTED] Envoyé : mercredi 9 janvier 2008 18:57 À : MyFaces Discussion Objet : Re: How to reset tree state? [EMAIL PROTECTED] wrote: What I don't understand is why the tree state is cached yet the model

How to reset tree state?

2008-01-09 Thread Matt.Rossner-prest
Hi, I'm relatively new to JSF. The project I'm working on required use of the tree2 component. I've had to do some customizations to this and I've also incorporated AJAX into it using Ajax4JSF. I followed this, http://www.jroller.com/plainoldweblog/entry/use_tomahawk_tree2_and_ajax4 jsf, not

How to reset tree state

2008-01-09 Thread Matt.Rossner-prest
Hi, I'm relatively new to JSF. The project I'm working on required use of the tree2 component. I've had to do some customizations to this and I've also incorporated AJAX into it using Ajax4JSF. I followed this, http://www.jroller.com/plainoldweblog/entry/use_tomahawk_tree2_and_ajax4 jsf, not