How to use the feature of ajax in visual web jsf

Hello,everyone!
I want to use the feature of ajax in visual web jsf,but the program encountered a error. I want refresh the dropdownlist once the javascript captured the refresh message,they both behaved asynchronously. However, the textField1 rendered with a blank box,while the dropDown1 had no change. The code as follows:
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page binding="#{Page1.page1}" id="page1">
<webuijsf:html binding="#{Page1.html1}" id="html1">
<webuijsf:head binding="#{Page1.head1}" id="head1">
<webuijsf:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
<webuijsf:script>
var processEvents = {                                                
update: function(props) {
var combo=document.getElementById("form1:dropDown1");
combo.refresh();
// Subscribe to refresh event.
function refreshme(){
var dom=document.getElementById("form1:textField1");
dom.refresh();
dojo.subscribe(webui.suntheme.widget.textField.event.refresh.endTopic, processEvents, "update");
</webuijsf:script>
</webuijsf:head>
<webuijsf:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<webuijsf:form binding="#{Page1.form1}" id="form1">
<webuijsf:textField binding="#{Page1.textField1}" id="textField1" onBlur="refreshme();"
style="position: absolute; left: 168px; top: 144px" valueChangeListenerExpression="#{Page1.textField1_processValueChange}"/>
<webuijsf:textField binding="#{Page1.textField2}" id="textField2" style="left: 168px; top: 96px; position: absolute"/>
<webuijsf:dropDown binding="#{Page1.dropDown1}" id="dropDown1" items="#{Page1.dropDown1DefaultOptions.options}" style="position: absolute; left: 192px; top: 216px"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>
/**********************************java******************************************/
the function textField1_processValueChange didn't been invoked
public void textField1_processValueChange(ValueChangeEvent event) {
DropDown dd=getDropDown1();
Option op1=new Option();
String addText=(String)getTextField1().getText();
op1.setLabel(addText);
op1.setTooltip("tooptip");
op1.setValue(addText);
ArrayList <Option> l=null;
Iterator <Option> i = dd.getListItems();
while(i.hasNext()){
l.add(i.next());
l.add(op1);
dd.setItems(l);
thanks In advance all of your replies.

Hi there,
Take a look at this, will help you
http://developers.sun.com/jscreator/learning/tutorials/2/textcompletion.html
Thanks
K

Similar Messages

  • Can someone tell me please how to use the features...

    Hi all,
    Can someone tell me please how to use the features on the HS-47 headset?
    That is, what functions does the button control and how many presses of the button for each function, etc?
    The headset was as supplied with my 6200.
    I've tried looking for a user guide but I don't think there is one.
    Many thanks,
    Steve.

    I think it's pretty basic.
    If you are listening to music on your phone, it should automatically mute it when a call comes in. A basic press of the call answer / end button should then do just that.
    Have a go! You could try experimenting with a quick double press, that may recall the last number you dialled, but otherwise that's probably it.

  • I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed. Why?   I've seen demonstrations on how to use the feature but mine doesn't wo

    I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed.
    Why?   I've seen demonstrations on how to use the feature but mine doesn't work.  I checked the updates and I have the current version.
    Thanks.      LM

    I am running CC 2014.2.1 and I've updated to Yosemite. Not seeing tree or frame as an option in the menu. Coworker still on Mavericks has it.

  • How to make and start a session on Visual web JSF

    Hi;
    I am trying to make a Session on Visual Web JSF but cant get it, just get code to jsp, plz could u help me :)
    Thanks on advace
    Miguel Villalobos.

    Pondini wrote:
    Just why do you want to prevent TM from deleting old backups? If it's because you've been deleting things from your internal HD, trusting TM to keep it's copies indefinitely, that's not a good idea.
    The reason is, TM's copies are no longer backups: now they're your originals. When (not if) your TM drive fails, you may lose all of them.
    Thank you for your input. As I wrote earlier, I have reformatted the internal HD and reinstalled a "blank" system. So yes, most files, documents etc. are now found only in the TM backup. One reason for not simply doing a full restore from the TM backup was to allow time to make sure the internal HD was not in fact failing, and being able to reintroduce things step by step in case the problem should materialize again.
    The whole point of wanting to keep the existing TM backup as-is is to make it be there "indefinitely". That doesn't mean I trust the external HD to keep it safe for all eternity, but as long as I am trusting it to back up my stuff, why not let it keep my old stuff as well? Although, admittedly, it is space consuming and the important stuff will be present in both the old and the new backup, once I get it running. Old backup > iMac > New backup. You should see how many papers I have in my shelves from years back

  • Can you please help me figure out my i phone and how to use the features

    i need some help on figuring out my phone can you please help me figure out how to use my i phone and the blue tooth features to listen to music or how can a friend or a relative send me songs for me to listen to.....                   

    To listen to music with a headset or earbuds via bluetooth requires a bluetooth stereo headset.
    File transfer via bluetooth is not supported. A friend or relative can purchase music for you via the iTunes music store with an iTunes store gift card or by sending you the music gift via email from iTunes.

  • How to use the onchoose in ajax text completion

    Hi,
    I have tried many many ways but still not able to get it right.. basically i just want to use the onchoose event to call my javascript function and then my function will use the selected value for some further processing. I have tried something like...
    function() {
    alert("hello");
    OR
    alert("hello"); (this one does not work at all)..
    But seems like the event is gone after calling the alert and the selected value never appears in the ajax text field. Anyone out there has tried this? Hope have some suggestions. Thanks.
    regards,
    thamch

    Hi,
    Shortly after that i manage to find a solution :).. its something like..
    function(val) {
    var elem = document.getElementById("form1:ajaxTextField2");
    elem.value = val;
    processAjaxText2(val);
    regards,
    thamch

  • I do not fully understand how to use the "Feature Sets" of "General 1" through 5

    I recently upgraded and aparently the printer driver was included in this. When printing through Photoshop Elements 10 a new drop down menu appears for printing with my Epson Stylus Photo 1400. I now have "Printer Features" and when that is selected from a drop down menu "Feature Sets" appears with "General 1" through 5 as drop down menu items. I can not find a user manual for operating all the options I now have. No matter what combo I set up however, my prints have a band in them. The printer now prints an inch of the image, runs the printer heads over the paper 4 times and scoots the paper forward an inch to repeat. Its this part of the print that gets the band. Its as if I am printing on regular paper when in fact it happens with both the matt and glossy. I select the right paper options (you have to select it in 3 different places) and yet the banding continues. PLEASE HELP ME.

    I recently upgraded and aparently the printer driver was included in this. When printing through Photoshop Elements 10 a new drop down menu appears for printing with my Epson Stylus Photo 1400. I now have "Printer Features" and when that is selected from a drop down menu "Feature Sets" appears with "General 1" through 5 as drop down menu items. I can not find a user manual for operating all the options I now have. No matter what combo I set up however, my prints have a band in them. The printer now prints an inch of the image, runs the printer heads over the paper 4 times and scoots the paper forward an inch to repeat. Its this part of the print that gets the band. Its as if I am printing on regular paper when in fact it happens with both the matt and glossy. I select the right paper options (you have to select it in 3 different places) and yet the banding continues. PLEASE HELP ME.

  • How to use the PDK  2.0 within Visual Studio 2005

    Hi there,
    can you help me? How do I include the needed templates and context menus to the 2005 environment?
    Hmm, I wonder if it is possible at all, to program in VS2005
    Thanks

    Hi,
    The current version (2.0) of the PDK does not support 2005.
    I know that there are plans to support the PDK for .NET for VS 2005.
    I am sure that when there will be a clear road-map, SAP will publish it.
    Best Regards,
    Tsachi

  • Could not get Using JPA Within a Visual Web JSF App Netbeans Tut.to work

    [http://testwww.netbeans.org/kb/60/web/web-jpa.html|http://testwww.netbeans.org/kb/60/web/web-jpa.html]
    Hi All,
    I am having difficulty displaying the content of Users table (Derby sample database) despite having followed all the steps provided in Using Java Persistence API Within a Visual Web JSF Application Netbeans Tutorial (http://testwww.netbeans.org/kb/60/web/web-jpa.html).
    It is uncleard from the instruction in step 3, section Creating a Java Persistence Entity Class Representing the Users Database Table - "The Entity Classes dialog dispalys. The IDE displays the database table name Users, and suggests a class name of Users. (Double click this class name to change it.)", but did not provide detail on what class name should it be changed to.
    I have tried building both TestModelApp (SE) and TestWebApp (Visual Web JSF) on JDK 1.6.13, Netbeans 6.5, Glassfish v2r2 and v3 (Prelude) on Windows XP platform without success.
    Any assistance would be greatly appreciated.
    Thanks,
    Jack

    Well, in real world the average professional Java EE / JSF developer doesn't use Netbeans nor Woodstock. Those are really for low-entry developers with zero technical knowledge who on its turn are often incapable of answering problems of your kind. Your question is also too non-technical and visualized and targeted on the wizards of Netbeans. After all your question is simply Netbeans specific, not JSF specific. If you try to ask it the more technical way (thus, at real source code level), you may have more chance on help.
    With regard to JPA specific issues, it unfortunately doesn't have a dedicated subforum yet here at forums.sun.com. You could try the [EJB forum|http://forums.sun.com/forum.jspa?forumID=13] or the [Java EE SDK|http://forums.sun.com/forum.jspa?forumID=136] forum.

  • How to use the "identify" feature in new 6.3.1 airport utility?

    how to use the "identify" feature in new 6.3.1 airport utility?
    so you can find the basestations in larger networks?

    There is a workaround, which is to use Airport Utility 5.6.
    I can confirm that 5.6 will run on 10.8.4 Mountain Lion, it will recognize the new 2013 Airport Extreme Base Station (A1521) running firmware 7.7.1, and it will give you access to view the device's Log & Statistics, DHCP Clients, and Profiles.
    Four caveats:
    1) The easiest way to install it is to download the app itself, not an installer or through the App Store. There is a page here where you can download the app: http://coreyjmahler.com/2013/03/08/airport-utility-5-6-on-os-x-v10-8-mountain-li on/ This way, you still have both versions, Airport Utility 6.x.x and 5.6.
    2) When you launch 5.6, you'll get a message saying a newer version is available and asking if you want to update. Click Cancel to proceed into the utility.
    3) When you click the Manual Setup button in 5.6, you'll get a warning dialog that "This version of AirPort Utility doesn't support this AirPort wireless device and might improperly configure the device if you continue to use it. Check www.apple.com/support/airport for the latest version of AirPort Utility." You can click Continue to get into the utility without issue.
    4) You should probably only use 5.6 to view the additional status details. I have not tried to modify and save any AEBS settings using 5.6. There are other discussions here in the forums indicating that attempting to save settings via 5.6 that are no longer available in 6.3.1 will not actually save the settings to the AEBS even if both utilities indicate that the settings are changed. See https://discussions.apple.com/message/22677993#22677993
    So, even though you can't use it to modify settings no longer available in Airport Utility 6.3.1, using Airport Utility 5.6 to view DHCP clients, Logs and Statistics is very useful for troubleshooting network issues.
    PS - There are two ways to get to the DHCP Clients list, neither of which is obvious The first is to go to the Airport pane -> Summary tab and click on the "Wireless Clients:" label in the Summary display. All of the labels from "Wireless Mode:" down on the Summary display operate as links to view/edit the corresponding info/settings, which is also not obvious at first glance. Also not obvious, clicking on "Wireless Clients:" actually brings up a new pane with three tabs: Logs, Wireless Clients, and DHCP Clients. You can also get to the same pane by going to the Advanced pane and clicking on the Logs and Statistics button.
    I hope this is helpful information. Took me a while to find out how to do this.

  • HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S, HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S

    HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S?

    There is no current panorama feature.  When iOS 6 is released (Sept. 19) we will find out.

  • How to use the keystroke feature of applescript?

    I am trying to use the keystroke feature of Applescript.
    On page 200 of "Mac OSX Panther edition The Missing Manual" shows the following example (to select all of a document):
    keystroke "a" using (command down)
    I tried to use this with keystroke "o" and got the message that "using" can't be used this way. Where can I find a few examples of how to use this feature in Applescript? I particularly want to use keystrokes to copy rulers in Appleworks. The keystrokes to do this are "shift-command-v".
    Thanks for comments.

    While I agree with Hiroto as to how to implement 'AppleWorks 6's 'Format, Rules, Copy Ruler' ('Command <shift> C) sub-menu item selection, below is an example of performing the same action using 'keystroke'.
    tell application "AppleWorks 6" to activate
    tell application "System Events" to keystroke "c" using command down & shift down
    Below is an example of performing 'AppleWorks 6's 'Format, Rules, Apply Ruler' ('Command <shift> V) sub-menu item selection using 'keystroke'.
    tell application "AppleWorks 6" to activate
    tell application "System Events" to keystroke "v" using command down & shift down
      Mac OS X (10.4.4)  

  • HT1689 can anyone simply tell me how to use the "find my ipod" feature through my itunes account that has the ipod registered?

    Can anyone tell me how to use the "find my ipod" app that I have for my ipod?  I have the ipod registered on my itunes account but I can get the serial # to send it in for apple support?  How does this feature work?  Thanks

    Turn on your computer.
    Open your Browser.
    Go to icloud.com
    Select find my iphone/ipod

  • Report using the feature of opening Excel in SAP.

    We are building a custom report using the feature of opening Excel in SAP.
    We need to do things like:
    Protect the worksheet, but leave some rows unprotected
    Freeze the windows
    Have any one ever used this feature before? Can any know how to do this?
    Thank you,
    PV

    No, no extra somewhere.  What it actually is, is that you are calling the methods of the application(sort of).  Here is an example application which does to the freeze panes.
    report zrich_0001.
    include ole2incl.
    data: e_sheet type ole2_object.
    data: e_appl  type ole2_object.
    data: e_work  type ole2_object.
    data: e_col1  type ole2_object.
    data: e_col2  type ole2_object.
    data: e_cols  type ole2_object.
    data: e_cell  type ole2_object.
    data: e_wind  type ole2_object.
    data: field_value(30) type c.
    parameters: p_file type localfile default 'C:RichTest.xls'.
    start-of-selection.
    * Start the application
      create object e_appl 'EXCEL.APPLICATION'.
      set property of e_appl 'VISIBLE' = 1.
    * Open the file
      call method of e_appl 'WORKBOOKS' = e_work.
      call method of e_work 'OPEN'
              exporting
                   #1 = p_file.
    * Write data to the excel file
      do 20 times.
    * Create the value
        field_value  = sy-index.
        shift field_value left deleting leading space.
        concatenate 'Cell' field_value into field_value separated by space.
    * Position to specific cell  in  Column 1
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 1.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 2
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 2.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 3
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 3.
    * Set the value
        set property of e_cell 'Value' = field_value .
      enddo.
      call method of e_appl 'Columns' = e_col1
             exporting
                  #1 = 1.
      call method of e_appl 'Columns' = e_col2
              exporting
                  #1 = 2.
      call method of e_appl 'Range' = e_cols
              exporting
                #1 = e_col1
                #2 = e_col2.
      call method of e_cols 'Select' .
      get property of e_appl 'ActiveWindow' = e_wind.
      set property of  e_wind 'FreezePanes' = 1.
    ** Close the file
    *  call method of e_work 'close'.
    ** Quit the file
    *  call method of  e_appl  'QUIT'.
    *  free object e_appl.
    Regards,
    Rich Heilman

  • How to use the same services-config for the local and remote servers.

    My flex project works fine using the below but when I upload my flash file to the server I doesn't work, all the relative paths and files are the same execpt the remote one is a linux server.
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
        <services>
            <service id="amfphp-flashremoting-service"
                class="flex.messaging.services.RemotingService"
                messageTypes="flex.messaging.messages.RemotingMessage">
                <destination id="amfphp">
                    <channels>
                        <channel ref="my-amfphp"/>
                    </channels>
                    <properties>
                        <source>*</source>
                    </properties>
                </destination>
            </service>
        </services>
        <channels>
        <channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>
        </channels>
    </services-config>
    I think the problem  is the line
            <endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
    but I'm not sure how to use the same services-config for the local and remote servers.

    paul.williams wrote:
    You are confusing "served from a web-server" with "compiled on a web-server". Served from a web-server means you are downloading a file from the web-server, it does not necessarily mean that the files has been generated / compiled on the server.
    The server.name and server.port tokens are replaced at runtime (ie. on the client when the swf has been downloaded and is running) not compile time (ie. while mxmlc / ant / wet-tier compiler is running). You do not need to compile on the server to take advantage of this.
    Hi Paul,
    In Flex, there is feature that lets developer to put all service-config.xml file configuration information into swf file. with
    -services=path/to/services-config.xml
    IF
    services-config.xml
    have tokens in it and user have not specified additional
    -context-root
    and this swf file is not served from web-app-server (like tomcat for example) than it will not work,
    Flash player have no possible way to replace token values of service-config.xml file durring runtime if that service-config.xml file have been baked into swf file during compilation,
    for example during development you can launch your swf file from your browser with file// protocol and still be able to access blazeDS services if
    -services=path/to/services-config.xml
    have been specified durring compilation.
    I dont know any better way to exmplain this, but in summary there is two places that you can tell swf  about service confogiration,
    1) pass -services=path/to/services-config.xml  parameter to compiler this way you tell swf file up front about all that good stuff,
    or 2) you put that file on the webserver( in this case, yes you should have replacement tokens in that file) and they will be repaced at runtime .

Maybe you are looking for

  • How do I make events stay in iCal for a year?

    Events disappear after six months. I have iCal on my MacBook, synced with iPhone 4 via iCloud.

  • Part of image shifts when inserting footer

    Okay, when I go to insert a footer into a document, a portion - not all - of that document shifts.  The document is an exported pdf from ArcMap which contains several thousand elements.  All elements appear to remain in their original position with a

  • Calling a java program from a perl CGI

    The perl program takes form data, does stuff with it, writes it to a file, and then calls a java program to encrypt it, and email it. When I telnet to the server, I can run the java program using: java CryptoMail.class [email protected] data.txt The

  • What is "g" data type? Is it STRING?

    Hi Experts, Simple and basic doubt,..... What is "g" data type? Is it STRING? Like these, when I get in future for others, Where Can I see them, I tried in SE11, and F4, but did not figure it out!! thanq

  • Displaying "Required Label with Help" icon dynamically

    Hi, I have an item say 'Dept Name', P1_DEPT_NAME This field is mandatory in case of CREATE and optional in case of UPDATE. - so in case of CREATE, I need to put the ICON (Required Label with Help) along with the Label 'Dept Name' - in case of UPDATE,