About events and listeners : what's the point?

Hello,
I worked on Swing and Struts by the past so I have a little experience about MVC pattern, web application and event driven developpement.
Despite that, I don't see the point using event listeners in JSF. Indeed, event-listeners code will be processed to the next server call (action generaly) which means event-listeners code could be deported in the action code.
According my researchs, the 2 major differences between action method and event listeners methods are the followiongs :
1) event listener codes can be processed before validation and model updating : in which cases this can be useful? I don't see.
2) event listener codes have access to the component which fired the event : in which cases this can be useful? I don't see.
If theses differences don't give new useful possibilities comparing to method actions so I don't underdstand the utility using events and listeners. I guess there are new possibilities but as i'm a beginner in JSF, i need help to take advantages of event driven developpement.
What I would wish is very short and simple examples about what we can do with actionEvent and changeEvent that we can't do in other way (and in particular in an action code).
Thanks you for reading me.
P.S : forgive my spelling errors :)
Corwin
Edited by: Corwin_31 on May 20, 2009 6:26 AM (spelling errors)

Corwin_31 wrote:
What I would wish is very short and simple examples about what we can do with actionEvent You could set custom component attributes and make use of it in action method.
You can find here an example: [http://balusc.blogspot.com/2006/06/using-datatables.html#SortingDatatable].
and changeEvent that we can't do in other way (and in particular in an action code).You could use it to populate/change other components depending on the changed value.
You can find here an example: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].
I must however admit, that with the Web 2.0 nowadays (Ajaxical powers) those server side events are a bit superfluous as you could easily let Ajaxical stuff take it over. That's also why there exist Ajaxical JSF component libraries which make use of those events more "effectively" (i.e. no hard submit to server required), such as RichFaces and the upcoming JSF 2.0.

Similar Messages

  • What is the point of Precision and Scale in Number Type?

    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
          COL1
    223.993939
    88.228384
          9.34
             0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?

    Omega3 wrote:
    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    COL1
    223.993939
    88.228384
    9.34
    0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?Lots of business requirements for specific precisions and scales.
    A persons Age may required to be stored as whole numbers of no more than 3 digits.
    A sum of money may required to be stored with no more than 2 decimal places of accuracy e.g. GB Pounds and Pence or US Dollars and Cents
    A unit of length may required to be stored in metres with 2 decimal places for centimetres
    A shoe size may be required to be stored with one decimal place for half sizes
    etc.
    etc.
    Yes, you may just create all of them as generic NUMBER datatype, but creating them with precision and scale can provide additional information about the limitations expected for the values stored, especially for things like reporting tools that may use the specified precision and scale to determine how to display the values automatically (by default).
    If you start questioning "what's the point?" then you may as well say what's the point in having a NUMBER datatype when we can store numbers in a VARCHAR2 datatype? or what's the point in having a DATE datatype when we can stored dates as VARCHAR2 datatype? etc.
    No point in asking such a question because there's almost always a point to these things (and if there isn't they get deprecated in later versions).

  • TS1702 what is the point of the Ipod touch(2nd generation)?Every single app Is not compatible with it.Seems like a complete ripoff to me.My phone was alot cheaper and does way more.Very frustrated with this device.

    what is the point of the Ipod Touch(2nd generation)?Every single app is not compatible with it.Am I missing something?My cell phone cost 1/2 as much and does way more.This is why I don't normally purchase any apple products.Overpriced flashlight,that's about all it does.

    There are still some apps compatible, with the 2G. Also, since September, Apple has now allowed download the last version of apps that were compatible with the 2G but have been updated to no longer be compatibles
    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Apple Club - filter apps by iOS version.
    App Store: Downloading Older Versions of Apps on iOS - Apple Club
    App Store: Install the latest compatible version of an app

  • I am extremely upset. I purchased my iPad in SA and I am traveling in Greece. When I want to make use of the free apps, I get a message that the app is not available in the SA store. What is the point of having an iPad if you cannot use it worldwide?

    I am extremely upset. I purchased my iPad in SA and now I am in Greece. I cannot download free apps as I get a message that the apps are not available in the SA store and only in US stores. When I change to the US store the same thing happens. What is the point of having an iPad if I cannot use it worldwide??? I feel that I wasted my money purchasing it as I specifically purchased it to use when I travel. How can I get access to all the available apps and why are they restricted.

    You can use your iPad worldwide. However, each AppleID is tied to
    a specific country's store. To use the AppStore in any country, you
    must be in that country and have a credit/debit card issued by a financial
    institution in that country with a verified billing address in that country.
    It is the developer's choice which AppStores he makes his app available
    from, and some countries prohibit certain apps.
    To make a purchase from the US store (including downloading a free app
    available in the US store), you must be in the US and have card issued
    in the US with verified billing address in the US.
    You can use your purchases from the SA store worldwide, but you
    cannot make purchases in other than the SA store unless you meet
    the aforesaid conditions.

  • My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    Hello Pushtheriver,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning iCloud storage issues:
    Get help using iCloud storage
    This may also help:
    Understanding iOS device capacity
    You can sync and download many different types of content on your device. Some types of content (such as music and videos) typically take more space than others (such as notes and books). The amount of space taken by an app depends on the app's purpose; complex or graphically intense apps usually take more space than simpler apps.
    If your device is near its capacity, you can remove some of the less used content to make room for more.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • HT5287 If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?

    If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?
    Or am I missing the bigger picture?

    As long as you have a Superdrive or an external burner/drive, burning, watching, installing, etc. from CD or DVD will work just fine. And so will sharing.

  • JWSDP and J2EE Integration: Doesn't work. What's the point?

    My problems involve the integration of JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    It looks like a long one, but it�s really not that bad. All comments are appreciated.
    I�ve numbered each line-paragraph-section for easy reference later.
    (1) My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website that uses servlets, JavaServer Pages (JSP), and JDBC.
    (2) I�ve got four Pentium III computers:
    1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
    2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
    3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
    4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
    (3) On MyWebServer I installed the following:
    Java 2 Standard Edition (J2SE)
    Java 2 Enterprise Edition (J2EE)
    Java Web Services Developer Pack (JWSDP)
    The JWSDP tutorial
    Apache HTTP Server
    (4) The files I downloaded and installed are as follows:
    j2sdk-1_4_0-rc-win.exe
    j2sdkee-1_3_1-win.exe
    jwsdp-1_0-ea1-win.exe
    jwsdp-1_0-ea1_01-tutorial.zip
    apache_1.3.23-win32-x86-no_src.exe
    (5) After installing these products, I set the environment variables as follows:
    JAVA_HOME = c:\j2se
    J2EE_HOME = c:\j2ee
    JWSDP_HOME = c:\jwsdp
    Path = c:\j2se\bin;c:\j2ee\bin;c:\jwsdp\bin; [and other previous statements]
    (6) I checked to see that Apache is running as a service. It is.
    On MyWebServer I start Tomcat and J2EE. Both start properly and are operating simultaneously.
    (7) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1
    This displays the page c:\ApacheHTTP\apache\htdocs\index.html.en (The Apache default server installation page.)
    (8) I then enter this address in IE:
    http://10.10.1.1:8080
    This displays the page c:\jwsdp\webapps\root\index.html (The default JWSDP page).
    (9) I then enter this address in IE:
    http://10.10.1.1:8000
    This displays the page c:\j2ee\public_html\index.html (The J2EE 1.3 Default Home Page).
    (10) So far so good. Now I want to test JWSDP as a container for JSP pages.
    (11) I use ant to build the converter app found in the tutorial examples (in folder c:\jwsdp\�\tutorial\examples\gs). I then deploy the converter app to the c:\jwsdp\webapps\gs folder.
    (12) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1:8080/gs
    The converter app works perfectly.
    (13) To eliminate the need to enter the port number, I create a link from the Apache default server installation page to the converter app. From MyClientPC and enter this address into IE:
    http://10.10.1.1
    I then click on the link to the converter app and it works perfectly.
    (14) Question: Is this the best way to display JSP pages without having to enter the port number?
    (15) Now it�s time to integrate JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    (16) After I complete this integration I cannot start both Tomcat and J2EE at the same time. This makes sense because they both share port 8080.
    I start Tomcat.
    (17) From MyClientPC and use Internet Explorer to test the various relevant addresses. Everything works the same as it did before except this one:
    http://10.10.1.1:8000
    The page cannot be displayed. The J2EE default home page is not displayed, which makes sense because the J2EE port is no longer 8000; it has been changed to 8080.
    (18) Now I shutdown Tomcat and start J2EE.
    From MyClientPC and use Internet Explorer to test the various relevant addresses:
    (19) http://10.10.1.1:8080
    Displays the JWSDP default home page.
    (20) http://10.10.1.1:8080/gs
    The page cannot be displayed. The converter app no longer works.
    (21) From MyWebServer and use Internet Explorer to test localhost:
    http://localhost:8080
    This displays the J2EE default home page.
    (22) Question: Why does localhost give me a different page than the IP address?
    (23) Question: What was the point of integrating JWSDP and J2EE?
    (24) I want to get the converter app working, so I create a .war file and attempt to add it to the J2EE deploytool (see the two integration documents listed above at section 15.) I create the .war file following the instructions in the JWSDP tutorial:
    http://java.sun.com/webservices/docs/ea1/tutorial/doc/WebApp3.html#64606
    (25) I change to the c:\jwsdp\�\tutorial\examples\gs\build folder.
    I then type:
    jar cvf converter.war .
    A .war file is created.
    (26) I open the deploytool: File, New, Application, and I name it �converter�.
    I attempt to add the .war file: File, Add to Application, Web WAR.
    (27) When I attempt to add the converter.war file I get this error:
    �converter.war does not appear to be a valid web JAR.�
    I tried a few different attempts, all with the same result. I�m stuck.
    (28) I ask again, What was the point of integrating JWSDP and J2EE?
    (29) If this is the preferred configuration, how do I display my JSP pages like the converter app?
    Please help!!!

    The JWSDP tutorial says to be in the �build� folder of the example when issuing the jar command to create the .war file. The build folder is created when I run the �ant build� command.
    Attempt 1 from the command prompt in folder c:\jwsdp\tutorial\examples\gs\build>
    I typed this command:
    jar cvf c:\jaxmservices\converter.war .
    In this case I directed the .war file to be placed in a different folder as you suggested. Here�s the output:
    added manifest
    adding: index.jsp(in = 921) (out= 525)(deflated 42%)
    adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/Converter.class(in = 582) (out= 358)(deflated 38%)
    Didn�t work. Same error as before.
    Attempt 2 from the same folder:
    I typed this command as you suggested (I tried it with and without the final dot):
    jar tvf converter.war
    Here is the output:
    java.io.FileNotFoundException: converter.war (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.tools.jar.Main.run(Main.java:185)
    at sun.tools.jar.Main.main(Main.java:904)
    I tried a few other variations on these attempts with no luck. I�m stuck.
    I�m attempting to create a .war file out of two files: index.jsp and converter.class.
    Now that I�ve integrated JWSDP and J2EE, is there some other way that I can run the converter app instead of a .war file and the deploytool? In other words, if I go back to using ant to build and deploy converter, where would I deploy it so that it will work with J2EE?
    By the way, it doesn�t have to be converter. I�d be happy if I could get any JSP page to work in J2EE after the integration.
    Forever grateful,
    Logan

  • Backed up ipod to the cloud (12/25 11am) and then updated. Music is gone and the back up is not restoring?! why? What's the point of the cloud if nothing is there?

    Ipod has been playing music in my car the past two years. new computer this year and new email address. Backed up to cloud. change ID on itunes. Music on my ipod disappeared. Shouldn't it be on the cloud somewhere?! What's the point of this cloud? And is it b/c I can't seem to change my icloud ID to the new one on my ipod settings?

    Music is not stored in your personal iCloud account, or in your device backup.  Music purchased from the iTunes store is in available for redownload as explained here: http://support.apple.com/kb/ht2519.  Music from other sources such as your CDs should be in your iTunes library on your computer and can be synced back to your iPod from there.
    To change the iCloud account on your device you have to delete the exsting account, then sign back into the new ID.

  • What's the point of buying 200 gb storage if when I delete a photo from my iphone is cleared on all devices, I want the photos I take remain stored in the cloud and to make room on my iphone

    what's the point of buying 200 gb storage if when I delete a photo from my iphone is cleared on all devices, I want the photos I take remain stored in the cloud and to make room on my iphone

    Yes...I do not get it

  • Two fields about material in AFKO: PLNBEZ and STLBEZ,what's the difference?

    Two fields about material in AFKO: PLNBEZ and STLBEZ,what's the difference?
    correct answers will be rewarded.
    thanks in advance

    Hi,
    First of all AFKO is table for Production Order Master Data. So it covers all data related BOM , Routing etc. So In order to distinguish material field related to BOM & Routing  these two different fields are there in AFKO table.
    PLNBEZ is the field for material assigned to routing operation
    STLBEZ is the field for material which is part of BOM
    Hope this clears your doubt.
    Regards,
    Tejas
    Edited by: Tejas  Pujara on Oct 8, 2008 8:22 AM

  • I want to know about wen the iphone 5 launch in india and also what will the price

    i want to know about wen the iphone 5 launch in india and also what will the price

    Anyone here knows or has access to the same info that you do or can access.
    If Apple has a website and online store in India, check Apple's website in India for an announcement.

  • Please give me advice about....what is the best virus guard in store and is virus worked in iPhone (my English is not good sorry)

    Please give me advice about....what is the best virus guard in store and is virus worked in iPhone (my English is not good sorry)

    If you are gettin spammed via e-mail or text that your IOS has a virus (usually says call some 800 number) then these are a scam - do NOT contact these crooks

  • I see lots of people asking questions about the "white screen" app store update failure. I see no answers from Apple about this...What is the problem, and what is the solution?

    I see lots of people asking questions about the "white screen" app store update failure. I see no answers from Apple about this...What is the problem, and what is the solution?

    It's a problem that Apple is having with their App updating system.  The best solution is to be patient, and wait for Apple to solve their systemic problem.

  • What are the points and levels for on the apple communities

    what are the points and levels for on the apple communities

    You mean these?
    https://discussions.apple.com/community/user_tips_library_documents
    I wouldn't consider 665 tips as being "hardly any", myself.
    Regards.

  • AirPlay: forgive me but what's the point?

    In our place we have a first generation Apple TV, a few Macs, a couple iPhones, and an iPad. We use our iMac to stream and sync content to Apple TV. Anything we put on our iPad/iPhones content-wise almost always comes from our iMac where everything is stored.
    I'm wondering, what's the point of AirPlay in this scenario? I mean, why would I ever want or need to stream to Apple TV from an iPad or iPhone when all my stuff is stored on my iMac anyway? I'm having a hard time understanding the point of AirPlay, unless it's all about streaming content to OTHER people's Apple TVs when you are away from home... but I don't know if this is even possible.

    disconnekt wrote:
    In our place we have a first generation Apple TV, a few Macs, a couple iPhones, and an iPad. We use our iMac to stream and sync content to Apple TV. Anything we put on our iPad/iPhones content-wise almost always comes from our iMac where everything is stored.
    I'm wondering, what's the point of AirPlay in this scenario? I mean, why would I ever want or need to stream to Apple TV from an iPad or iPhone when all my stuff is stored on my iMac anyway? I'm having a hard time understanding the point of AirPlay, unless it's all about streaming content to OTHER people's Apple TVs when you are away from home... but I don't know if this is even possible.
    Well, if absolutely all the photo/video content on your iPhones already exists in iTunes on your imac, then there is no point to Airplay for you.
    Myself, I'll be using it to Airplay photos to my big-screen TV from my iPhone 4. I only synch my phone to iTunes maybe once ever 3-4 weeks, so it will be great to snap a photo of my 7-month old son and instantly stream it straight to my TV, without having to plug my phone into my computer, import the photos into iPhoto, and then navigate to the homeshared photo event on my apple tv. Just one button (airplay) on the photo in your iPhone photos app, and it's on the TV. I already tested this and it's great.
    And yes, if you ever bring your iphone over to someone else's house and want to show some pics that are on your phone, you can easily do that. Any iOS device will stream to any Airplay device (like ATV) as long as the two devices are on the same wi-fi network. It is possible to setup a password on your apple tv (2nd gen) so that someone with an iOS device must enter the password before being permitted to airplay content to the ATV, but if you don't enable that password then it is a one-touch process to stream your photos.
    That said, one feature I thought Airplay would enable, which it apparently doesn't, is the ability to stream the videos in your iPhone's "Photos" app to the ATV. You can airplay the still photos to show a slide show, no problem. But there is simply no airplay button on the videos in your photos app. This is disappointing since I was looking forward to being able to shoot a short video and then instantly stream it to my ATV to show off to my wife or visitors. Apparently, this feature is not enabled.

Maybe you are looking for

  • Sql query performance tuning

    Hi all, I am facing problem to extract data and insert into another table. I need to fetch part number from all_parts_already and then based on the result I need to extract place from all_parts and insert into all_parts_already. Sample data in the ta

  • Install Acrobat/Reader plugin on Mac

    Has anyone installed an own Acrobat/Reader plug_in on Mac?  Is there a standard way to do this? Up to Mac 10.4 there was a "Plug-ins" section in the information dialog of Acrobat/Reader, which was good to install/deinstall plug_ins. I don't find this

  • Subcontracting process in PS

    Dear All In my client requirement they are giving material  to do Subcontracting work for vender Through project how to map in sap by which activity i want do this please help me sir Regards Raj

  • How can i recover my security questions without the link to send the answers to my email?

    how can i recover my security questions without the link to send the answers to my email?

  • Trigger the Dunning at same level

    Hello ,      I have a requirement to trigger the same dunning level again for certain validation .For example I Triggered the Dunning level 8 and inside that level it triggers some activities  .when system trying to go for next level we need some val