icefaces


EffectQueue and chaining effects in IceFaces 1.8


I'm currently working with IceFaces 1.8, and have been trying to find an simple way to chain effects on UI Components. For example, I have a "Show Help" link at the top right of the page. When clicked, help text will appear below certain controls for users. I'd like this text to appear by sliding down, then highlighting.
I have a basic isRenderHelp() method on my bean that returns true or false, and use that to render effects using the fire attribute on the <ice:effect> tag, so it looks something like this:
<ice:effect effectType="slidedown" fire="#{myBean.renderHelp}">
<ice:effect effectType="slideup" fire="#{!myBean.renderHelp}">
This works causing the help section to slide in and out as the help link toggles the renderHelp flag in the bean. There is the small exception that renderHelp returns null before the link is clicked for the first time to prevent the slideup animation from firing on the first page render.
Now, I noticed looking through the showcase code for 1.8 that there is an EffectQueue class that extends Effect. This allows me to add mutliple Effects to the queue in my bean, and return the queue from a getEffect method that I can then assign to a panelGroup effect attribute. However, it does not execute the events in the queue, despite having their priorities set. I'm sure I'm not using it properly, and I'm wondering how it should be used.
Normally I'd use jQuery for this type of thing, but the UI uses many partial submits. Our page is displayed via a Liferay portlet, so on any partialSubmit the view is rerendered, undoing any modifications to the DOM by jQuery.
So is there any simple way to chain effects in IceFaces 1.8? Suggestions?
here is how I implemented the effectQueue to appear and fade the text.
private EffectQueue effectQueue;
public Effect getSaveSettingsEffect() {
return effectQueue;
}
public void fireEffect(ActionListener e) {
if(effectQueue == null) {
effectQueue = new EffectQueue("apperAndFade");
Appear appear = new Appear();
appear.setDuration(2);
effectQueue.add(appear);
Fade fade = new Fade();
fade.setDuration(3);
effectQueue.add(fade);
effectQueue.setTransitory(true);
}
effectQueue.setFired(false);
}
facelet:
<ice:commandButton value="fireEffect" action="#{bean.fireEffect}"/>
<ice:outputText value="text" style="display: none;" effect="#{bean.effectQueue}"/>

Related Links

EffectQueue and chaining effects in IceFaces 1.8
Ace Datatable row selector with paginator
How to customize internal server error popup?
How to use more than one ace:fileEntry tag in the same page?
Enabling ICEfaces compat leads to not recognizing h:head and h:body
Passing parameter to <ice:rowSelector>'s clickListener attribute
ICEfaces configured for view, but h:head and h:body components are required
ace:tabSet style is corrupted when using ICEFaces 3
How to configure rime style in ICEfaces 3
scrolling changes the size of the ice datatable headers
How to get values in dropdown list from database in icefaces?
Data pager in icefaces not paging
use sbt for generate a webapp with icefaces
Cancel button Icefaces with immediate=true
how to redirect to j_security_check in the managed bean?
How do I disable a column using icefaces?

Categories

HOME
spring
visual-studio-2015
mql4
scipy
azureservicebus
i2c
gatsby
datagrip
redux-observable
eclipselink
boolean-expression
pycrypto
distance
multiple-columns
tarantool
spring-test
shopping-cart
hanami
onesignal
lync-2013
devforce
hawtio
geopy
division
qtablewidget
hashcat
npm-publish
es-shell
android-download-manager
code-composer
nashorn
html-agility-pack
filepath
encapsulation
dojox.grid.datagrid
jtds
data-integration
appstore-approval
rollback
butterknife
quintus
vici
ebtables
spring-ioc
mongoskin
aerogear
portfolio
insertion-sort
datainputstream
mysqldumpslow
kendo-menu
qbfc
visual-studio-code
wif
stream-framework
httpie
hana-xs
orientation-changes
django-1.6
jstat
dache
adaptive-compression
surrogate-key
planetary.js
picat
opensocial
resource-files
flash-cc
openkinect
android-json-rpc
winrt-httpclient
roxygen
arangodb-php
confusion-matrix
osx-snow-leopard
driver-signing
html-form-post
qt4.6
fluidsynth
xml-libxml
cgpath
mvccontrib
autostart
xgettext
sunspot-rails
tfs-power-tools
scrollto
xmlslurper
hibernate3
userid
maven-ant-tasks
flexicious
gtk2hs
rijndael
soft-keyboard

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App