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
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...
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
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
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
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
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} /
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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] =
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
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
À
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
#{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
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,
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
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
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
33 matches
Mail list logo