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

Dynamic styling with IceFaces: how can I change the color of the outputText at the time of rendering?
icefaces outputConnectionStatus in javascript
How can I add a title to a disabled icefaces commandbutton?
Hide menuBar on click icefaces
ice:paneConfirmation - is it really so bad?
SessionRenderer not rendering throws ViewExpiredException
icefaces 1.8.2 Datapaginator unexpected PaneltabSet content swap
How can i download ICEfaces-1.7.0 Netbeans plugin?
Icefaces ace:autoCompleteEntry not working
ICEFaces: values for the “icon” attribute
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

Categories

HOME
project-management
vb6
xamarin.android
winapi
textwatcher
paramiko
vs-team-services
puppet
iis-7.5
camera-calibration
uiscrollview
image-recognition
symfony2-easyadmin
event-log
uisplitviewcontroller
aspell
alfresco-share
jogl
jni
logarithm
jenkins-job-dsl
xilinx-ise
vertex-buffer
configure
websauna
sharp
piecewise
entity-system
read-write
stocks
rhomobile
mapguide
phpspreadsheet
broadleaf-commerce
npm-publish
coreclr
intellij-idea-2016
mediawiki-extensions
productivity
median
rich-text-editor
vcf
rhel6
ruby-on-rails-2
photon-controller
polar-coordinates
emgu
nsfetchedresultscontrolle
system.web.ui.webcontrols
spring-ioc
update-site
aescryptoserviceprovider
bacnet
windows-nt
spatial-query
multilingual-app-toolkit
mongo-c-driver
bluesnap
handlebars.java
drf-nested-routers
playscape
type-mismatch
cpu-cores
searchkick
sysfs
lexicographic
ember-components
mov
codeigniter-a3m
zipalign
broadcasting
initialization-vector
crystal-reports-10
uipickerviewcontroller
bsod
logentries
cdata
facebook-sdk-3.1
ftp4j
threadx
shortcuts
fortran77
fluidsynth
osi
cadisplaylink
ninject-extensions
maven-ant-tasks
entity-framework-ctp5
django-nose
port-scanning
audiostreamer
loadui
clients

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