voyent
Same effect on several components  XML
Forum Index -> General Help
Author Message
andreiij

Joined: 15/Feb/2009 00:00:00
Messages: 35
Offline


Hi, in my application i have an add button which adds a new PanelGroup to my application's main content container. This is done in pure Java, eg.
What i want is that this new penelGroup gets an Highlight effect when created/added to give the user an notification of its presence

//actionHandler

mainContainer.getChildren().add(new ItemPanel);
getAddBean.executeAddEffect();


Im able to set the effect with this code, in my constructor of ItemPanel


// constructor of ItemPanel

ValueExpression effectBinding = BeanUtil.createValueExpression("#{AddBean.addEffect}", Effect.class);
newItemPanel.setValueExpression("effect", effectBinding);


However the effect only works for the first new item, not when i add more new items.
I've read on the forum that problem can arise when using same effect on several components.
I've tried several small hacks, like remove the effectbinding on non-new components, but with no luck.
I think i need a new approach to get what i want. Any suggestions or other idead?

Thanks!

mgroeneweg

Joined: 26/Dec/2008 00:00:00
Messages: 238
Offline


Maybe use a panelSeries? Please refer to the component showcase for an example.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team