browsing event valueChangeListener < af:selectOneChoice >

Hello
I want to provide options for the user to navigate to different pages (screen) using < af:selectOneChoice > (drop-down). On valueChangeListener I call a method that returns a string value based on the value selected in the drop down. I have the mapping in faces-config .xml to the values returned by the method (called changeValueListener).


I tried with < af:selectOneChoice > component but it do not navigate the user to a different page, but it remains on the same page. When I used the command instead of < af:selectOneChoice > button and returned the value of the method (mapped in faces - config.xml for navigation) then he navigates the user to another page.

My question is: when valueChangeListener < af:selectOneChoice > event calls the method and then he will always remain on the same page or can I navigate the user to another page according to the method returns the value (return value would be mapped with a few jsp in faces-config. XML)

Thank you. !

ContextPath = string
FacesContext.getCurrentInstance () .getExternalContext () .getRequestContextPath ();

FacesContext.getCurrentInstance () .getExternalContext () .redirect (contextPath + "abc.jspx");

Tags: Oracle

Similar Questions

  • Stop master browser EVENT ID 8021 and 8032

    I have a Windows Home Server connected to a workgroup to three other computers.  All running XP Pro with the latest updates and service packs.

    WHS is the master browser from what I can tell.  He is busy all night doing backups, and one of the machines (ALF) stops on the network, System EVENT ID 8021 and 8032 error reports.  The content of these errors is below:

    Event type: WARNING

    Event source: BROWSER

    Event category: no

    Event ID: 8021

    Date: 01/06/2010

    Time: 06:00:28

    User:                       N/A

    Computer: ALF

    Description:

    The browser could not retrieve a list of servers from the master browser of \\ALFSERVER on the \Device\NetBT_Tcpip_{AD1643BB-436A-4715-AFCF-9E5D1532A461 network}. The data is the error code.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Data:

    0000: 000005aa

    =============

    Event type: error

    Event source: BROWSER

    Event category: no

    Event ID: 8032

    Date: 01/06/2010

    Time: 06:02:28

    User:                       N/A

    Computer: ALF

    Description:

    {The browser service failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{AD1643BB-436A-4715-AFCF-9E5D1532A461}. The secondary Explorer stops.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Data:

    0000: 000005aa

    Please indicate how I can remedy this problem.  Any help would be most appreciated.

    TIA,

    Leef

    Try this link:

    "Common causes and solutions to browser event ID 8021 and 8032 on the field event ID master browsers"
       http://support.Microsoft.com/kb/135404 >

    From my experience, it is usually caused by one machine on your network with a firewall.

    "Internet firewall can prevent browsing and file sharing.
       http://support.Microsoft.com/kb/298804 >

    HTH,
    JW

  • In the browser event listener internal

    Need your help,

    Can I do this in Blackberry?

    I want to open an internal browser in my BB OS7 through "Webworks' (e.g. 'www.blackberry.com'),

    and listen to each click which I supported in the internal browser and get the link of the href attribute.

    Thank you

    I found a way, using BrowserField

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-get-URL-from-BrowserField2/TD-p/13730...

  • GlobalEventListener on the events of browser does not (does nothing)

    Hello

    I have read all the post I could find on the global event listeners, but still did not solve my problem.  I need to listen to a global event displayed by the default browser (specifically the one displayed when navigation is complete).  This works very well in the Simulator (using 5.0.0.50 9 on a 8520), but no luck on the real device (running the same specification).  My application runs as a background process.  I tried to also create a UiApplication to listen to and to inform me of world events - this also works in the Simulator, but not the camera.  Other parts of the code works fine.  I checked the permissions (my application both the browser has done everything to ALLOW).

    I use Blackberry JRE 5 with the Eclipse plugin.

    I noticed that if I put the safety on the Simulator, global browser events are no longer perceived.

    I would really appreciate help with this.

    @abhigupta: the only way I know to interact with the default browser as it uses the class HttpFilterRegistry.

    "The HTTP API (net.rim.device.api.io.http) filter allows an application save with the.
    browser as a supplier for a specific URL. When users type in the URL, the battery connection is
    rerouted to the specified application.

    I'm not aware of any other way to interact with navigation applications in a browser.

    @darthdassie

    Apologies, slipped off my mind...

  • Select all radio buttons in a table based on the value of selectOneChoice

    Hi all

    I have a selectOneChoice with two values

    positive i.

    II. negative

    1.png

    created vo and am

    I have an adfTable with selectOneRadio added as a transitional attribute.

    The table is created on the vo.

    2.png

    what I have to do is, when the user select positive of selectOneChoice all the positive radiobutton in the adfTable must be selected and the same for negative also.

    3.png

    I can get the value of the selectOneChoice in the bean using valueChangeEvent.

    But I need assistance in the selection of all positive values in adfTable using the selectOneChoice value.

    Reference would be useful.

    Thank you very much

    Kind regards

    Jean-Felix

    Hi all

    Let me post the answer, hope this helps someone.

    selectOneChoice

    Positive P

    N negative

    on selectOneChoice event ValueChangeListener

    to loop through the rows of the adfTable

    If valueChangeEvent.getNewValue () is equal to 'p '.

    Assign PositiveRadiobtn attribute 'p '.

    otherwise set it to "n".

    Kind regards

    Jean-Felix

  • Difficulties to view events generated by the SSM-GOAL-10 on server CETS

    Hello

    Is there a trick that can help me to see the xml file generated by the CETS-server in a more convenient way. See attachment for more details.

    The events are interwoven with html tags.

    Thank you

    Julie

    Julie-

    If you don't want to read XML, you then have a script that it will look into something that is readable.

    I would suggest installing the free IPS Manager Express and pulling on the events of the probe, you want to see in it.

    Then, you can browse events in IME or export them to HTML or CSV format.

    Each sensor can send traffic events for up to 5 collectors event (even if it will cost you some processing on the sensor power to maintain additional sessions).

    -Bob

  • The use of contextual events for &lt; af:commandToolbarButton... &gt;

    Hi all

    I use 11.1.1.7.0 jdev and I cannot upgrade to a newer version.

    I need to trigger an event in a region and perform actions according to him in the other. I want to use the ContextualEvent feature as has been described in here . Everything seems clear, but I stuck in how to declare the popup event.

    I have a < af:commandToolbarButton... > element to produce the contextual event, I can't change it to something else. "af:commandToolbarButton" isn't Behaivor - ContextualEvents inside-tab to declare a contextual event. Maybe I need to specify it in the other way, for example using an actionListener = "#{viewScope.BeanName.callToEventProducer}" and perform programmatically attempt to contextual event mounted? "


    in my code I have:
    <af:commandToolbarButton ... actionListener="#{BBean.commandUndoRedo}"/>
    and in the code of bean:
        public void commandUndoRedo(ActionEvent actionEvent) {
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            JUEventBinding eventBinding = (JUEventBinding) bindings.get("undoRedoEvent");
            ActionListener al = (ActionListener)eventBinding.getListener();
            al.processAction(actionEvent);
        }
    and in taskFlow page def:
      <bindings>
        <eventBinding Listener="javax.faces.event.ValueChangeListener" id="undoRedoEvent">
          <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
            <event name="undoRedoPublisherEvent"  eventType="Action Event"/>
          </events>
        </eventBinding>
      </bindings>
    and when I try to find this event in any other workflow in pageDef - links - ContextualEvents - subscribers-

    I don't see any "undoRedoEvent" or "undoRedoPublisherEvent".

    I do well?

    Thank you.

    Hello

    You can create A producer events

      
        
          
            
          
        
      
    

    And inside the Manager of consumer, you can get a handful of beans of region C (if it is different from A) and update only this part.

    for example.
    This would be your method of consumer (class to create + Create + Add data as the Action method on jsff control)

        public void handleRefresh(Object payLoad){
                 FacesContext fctx = FacesContext.getCurrentInstance();
    
            ELContext elctx = fctx.getELContext();
            ValueExpression valExpr =
                fctx.getApplication().getExpressionFactory().createValueExpression(elctx,
                                                                                   "#{backingBeanScope.backing_}",
                                                                                   YourBeanName.class);
            YourBeanName bean = (YourBeanName)valExpr.getValue(elctx);
            bean.refreshT1();
    
        }
    

    You can check
    http://www.jobinesh.com/2010/11/triggering-navigation-from-contextual.html
    http://www.jobinesh.com/2009/07/programmatically-publishing-contextual.html

    Thank you
    JIT

  • Helps the event Felx.IDEL

    Hi people,

    I am a beginner in Flex and I used an example on Flex.IDLE event of
    http://inflagrantedelicto.memoryspiral. ... nt-page 1.
    to log out a user after a specific interval inactive.

    What happens with me is

    1. when the window is minimized, this event does not occur.
    2. when some flash content are run in the same or different, browser event fires sometimes and sometimes not.

    Can someone help me to understand why this is happening and how I can solve this problem. Please help me.

    Thanks in advance.
    Kind regards

    When you add the linstener of the IDLE event?

    I did an experiment: If you put the code "systemManger.addEventLinster(FlexEvent.IDLE,handler)" after the addToStage event has been sent in application, which works well

  • SelectOneChoice and read-only Table

    Hi Experts,

    I am very new in ADF and try to put up a form that contains a component of SelectOneChoice based on a display object.
    I have a table with a variable binding and try to run the Object(underlying read-only table) view with the value that is selected in SelectOneChoice read-only. I added a managed method bean on valueChangeListener control SelectOneChoice and successfully getting the selected value.
    Now I'm getting a reference to the ViewObject and layout NamedParameter and then running it. Here is my code:

    {} public void ChangeValue has only (ValueChangeEvent valueChangeEvent)
    int s = ((Integer) valueChangeEvent.getNewValue ()) .intValue ();
    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) bindings.get ("SanLovVO1");
    listBinding.setSelectedIndex (s);
    currVal int = Integer.parseInt (listBinding.getSelectedValue () m:System.NET.SocketAddress.ToString ());
    System.out.println ("selected value:" + currVal);

    DCBindingContainer bc = (DCBindingContainer) (BindingContext.getCurrent () .getCurrentBindingsEntry ());
    ApplicationModule am = bc.getDataControl () .getApplicationModule ();
    ViewObject vo = am.findViewObject ("SR1");
    vo.setNamedWhereClauseParam ("p_san_header_id", currVal);
    vo.executeQuery ();
    }

    I defined a variable binding (p_san_header_id) in the object View (SR-1), then using this variable of liaison with the query of the view object. I also give a default value to the variable binding.
    Now the problem is: when page gets loaded, I can only read table has records but when I select a value in SelectOneChoice, I am not able to see changed in the table read-only if get running code managedBean and autoSubmit is true for SelectOneChoice.

    Pls help me. This is my first attempt in ADF with Jdev 11.1.1.2

    Thank you
    Sumit

    I put the default value based on the value returned by the database for selectOneChoice on the loading of the page. I just determine the index value of the corresponding value coming from the db and put it in the page scope of stream.
    Then, I put it in the value of the selectOneChoice attribute.

  • Why not FF 3.6.24 write 'Close tab' in the Console log?

    Whenever I get close a tab (a few seconds thereafter) Firefox 3.6.24 wrote the following line to the console system (OS X) log:

    . org.Mozilla.Firefox [7254] close-tab tab

    Curious. Why?

    OS X 10.5
    Firefox 3.6.24

    This is caused by the "DownloadHelper" version 4.9.8 Firefox addon.

    Line dhCore.js 819, there was this statement:

    dump ("close tab-"+ event.target.tagName+"\n" ');

    In case you're curious, any Javascript can print messages in console.log using the dump() function, and any addon can cling in browser events like tabs are closed.

    You can safely comment this out by prefixing the line with "/ /" (without the quotation marks), and then restart Firefox. I also raised a bug with the developer of the addon: http://bugzilla.downloadhelper.net/show_bug.cgi?id=405

  • Why does my Net connection disappear spontaneously?

    Recently, I had a problem where very well work my connection to the Internet, then all of a sudden he disappeared. The browser (any browser) gives me messages about being unable to find the server. Remedies, I tried:

    1. by using the option "Repair" of the system tray icon that accesses my Internet connection. Repair always freezes during the disconnection. Furthermore, the option 'Status' says my connection is excellent, but it's probably just between my wireless adapter and the AT & T wi - fi antenna.
    2. unplug the AT & T wi - fi antenna power, wait 30 seconds and in him plugging back in. This is one of the AT & T recommended methods of troubleshooting. Does not work for me.

    Here's what works, and the reason I think that the problem is in my PC and not with AT & T DSL service. If I use the power button before on my tower to completely power off, wait a few seconds, then starts upward, the problem is solved. What hassle.  Oh, the reason why I do not use start > Shutdown is that it has also stopped working. He goes as far as a blue screen and just hangs there.

    For reference, I try to keep my tidy HD. Enough free space, regular defrag, all Microsoft updates, run the tool to check disk with the fix option activated, etc..

    Here are the 12 entries of observer of events leading up to the last spontaneous disconnect from the Internet. I doubt it is useful, because the disconnection occurred at about 09:30, much later than the last recorded event.

    Event type: WARNING
    Event source: disk
    Event category: no
    Event ID: 51
    Date: 04/10/2011
    Duration: 03:10:59
    User: n/a
    Computer: PC
    Description:
    An error was detected on device \Device\Harddisk3\D during a paging operation. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 03 00 68 00 01 00 00 b6... h...¶.
    0008: 00 00 00 00 33 00 04 80... 3.. ?
    0010: 2d 01 00 00 00 00 00 00-...
    etc.

    Event type: WARNING
    Event source: disk
    Event category: no
    Event ID: 51
    Date: 04/10/2011
    Duration: 02:21:52
    User: n/a
    Computer: PC
    Description:
    An error was detected on device \Device\Harddisk3\D during a paging operation. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 04 00 68 00 01 00 00 b6... h...¶.
    0008: 00 00 00 00 33 00 04 80... 3.. ?
    0010: 2d 01 00 00 00 00 00 00-...
    etc.

    Event type: WARNING
    Event source: disk
    Event category: no
    Event ID: 51
    Date: 03/10/2011
    Time: 23:55:45
    User: n/a
    Computer: PC
    Description:
    An error was detected on device \Device\Harddisk3\D during a paging operation. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 04 00 68 00 01 00 00 b6... h...¶.
    0008: 00 00 00 00 33 00 04 80... 3.. ?
    0010: 2d 01 00 00 00 00 00 00-...
    etc.

    Event type: WARNING
    Event source: disk
    Event category: no
    Event ID: 51
    Date: 03/10/2011
    Time: 23:55:43
    User: n/a
    Computer: PC
    Description:
    An error was detected on device \Device\Harddisk3\D during a paging operation. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 03 00 68 00 01 00 00 b6... h...¶.
    0008: 00 00 00 00 33 00 04 80... 3.. ?
    0010: 2d 01 00 00 00 00 00 00-...
    etc.

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7036
    Date: 03/10/2011
    Time: 22:02:55
    User: n/a
    Computer: PC
    Description:
    FLEXnet Licensing Service service entered the running state. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7036
    Date: 03/10/2011
    Time: 22:02:55
    User: n/a
    Computer: PC
    Description:
    FLEXnet Licensing Service service entered the running state. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7035
    Date: 03/10/2011
    Time: 22:02:55
    User: PC\Administrator
    Computer: PC
    Description:
    FLEXnet Licensing Service service was sent successfully a starting control. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event type: Information
    Event source: Tcpip
    Event category: no
    Event ID: 4201
    Date: 03/10/2011
    Time: 21:26:11
    User: n/a
    Computer: PC
    Description:
    {The system detected that network card \DEVICE\TCPIP_{F92491AD-0D9F-40D0-91DC-38AEFC36B609} was connected to the network and launched a normal operation via the network card.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 00 00 00 00 02 00 50 00... P.
    0008: 00 00 00 00 69 10 00 40... I have... @
    0010: 02 00 00 00 00 00 00 00...
    etc.

    Event type: error
    Event source: Dhcp
    Event category: no
    Event ID: 1001
    Date: 03/10/2011
    Time: 21:25:29
    User: n/a
    Computer: PC
    Description:
    Your computer not was not assigned an address from the network (by the DHCP server) for the network card with network address 0026F2B066BE.  The following error occurred:
    The operation was cancelled by the user. . Your computer will continue to try and obtain an address on its own from the server network address (DHCP). For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 04 00 00 c7

    Event type: Information
    Event source: Tcpip
    Event category: no
    Event ID: 4201
    Date: 03/10/2011
    Time: 21:25:29
    User: n/a
    Computer: PC
    Description:
    {The system detected that network card \DEVICE\TCPIP_{F92491AD-0D9F-40D0-91DC-38AEFC36B609} was connected to the network and launched a normal operation via the network card.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 00 00 00 00 02 00 50 00... P.
    0008: 00 00 00 00 69 10 00 40... I have... @
    0010: 02 00 00 00 00 00 00 00...
    etc.

    Event type: Information
    Event source: BROWSER
    Event category: no
    Event ID: 8033
    Date: 03/10/2011
    Time: 21:25:29
    User: n/a
    Computer: PC
    Description:
    The browser has forced an election on network \Device\NetBT_Tcpip_{F92491AD-0D9F-40D0-91DC-38AEFC36B609} because a master browser was stopped. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7036
    Date: 03/10/2011
    Time: 21:22:06
    User: n/a
    Computer: PC
    Description:
    The Windows Installer service entered the stopped state. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7036
    Date: 03/10/2011
    Time: 21:12:37
    User: n/a
    Computer: PC
    Description:
    The iPod service Service entered the running state. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    As far as I know, there are two problems:

    1 then we need to fix all the errors on the hard drive, and...

    2. for some reason any when I restart or start the PC, it linked to low of a non-secure neighbor connection wi - fi rather than I have here my apt. I reorganized the order of precedence by which Windows searches for a network to connect to, and it works perfectly!

  • How to display data on the screen and save the data in a file at the same time?

    The code can display acceleration on the screen of the playbook.

    But, when fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ") runs, debug displays no source available.

    ??

    Does anyone know how to solve the problem, which writes data to a file?

    The code is below.

    /*
    * Copyright (c) 2011 Research In Motion Limited.
    *
    Licensed under the Apache License, Version 2.0 (the "license");
    * You may not use this file except in compliance with the license.
    * You can get a copy of the license at
    *
    www.Apache.org/licenses/license-2.0
    *
    * Unless required by the applicable law or agreement written, software
    * distributed under the license is distributed on an "AS IS" BASIS.
    * WITHOUT WARRANTIES OR CONDITIONS of ANY KIND, express or implied.
    * See the license for the specific language governing permissions and
    * limitations under the license.
    */

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    /**
    The milliseconds between the accelerometer readings. It's the same thing
    * rate in which the accelerometer data will be updated
    * material. The update of material rate is below to help
    * accelerometer_set_update_frequency (FREQ_40_HZ).
    */
    public static const int ACCELEROMETER_MAX_POLL_INTERVAL = 25;

    public static screen_context_t screen_ctx;
    public static screen_window_t screen_win;
    dialog_instance_t main_dialog = 0;

    paused int = 0;

    The forces of the accelerometer
    float force_x, force_y, force_z;

    file elements
    int _logcounter = 0;
    FullName Char [256];
    FILE * f;

    /**
    * Use the PID to set the id of Group window.
    */
    public static char
    get_window_group_id()
    {
    public static char s_window_group_id [16] = "";
    If (s_window_group_id [0] == '\0') {}
    snprintf (s_window_group_id, sizeof (s_window_group_id), "%d", getpid());
    }
    Return s_window_group_id;
    }

    /**
    * Set up a basic screen, so that the browser will be
    * Send window state events when the State of the window changes.
    *
    * @return @c EXIT_SUCCESS or EXIT_FAILURE @c
    */
    public static int
    setup_screen()
    {
    If (screen_create_context (& screen_ctx, SCREEN_APPLICATION_CONTEXT)! = 0) {}
    Return EXIT_FAILURE;
    }
    If (screen_create_window (& screen_win, screen_ctx)! = 0) {}
    screen_destroy_context (screen_ctx);
    Return EXIT_FAILURE;
    }
    use of int = SCREEN_USAGE_NATIVE;
    If (screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_USAGE, & use)! = 0) goto fail;
    If (screen_create_window_buffers (screen_win, 1)! = 0) goto fail;
    If (screen_create_window_group (screen_win, get_window_group_id())! = 0) goto fail;
    buff screen_buffer_t;
    If (screen_get_window_property_pv (screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void *) & buff)! = 0) goto fail;
    buffer_size int [2];
    If (screen_get_buffer_property_iv (buff, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size)! = 0) goto fail;
    int attributes [1] = {SCREEN_BLIT_END};
    If (screen_fill (screen_ctx, chamois, attributes)! = 0) goto fail;
    int dirty_rects [4] = {0, 0, buffer_size [0], buffer_size [1]};
    If (screen_post_window (screen_win, buff, 1, (const int *) dirty_rects, 0)! = 0) goto fail;
    Return EXIT_SUCCESS;
    in case of failure:
    screen_destroy_window (screen_win);
    screen_destroy_context (screen_ctx);
    Return EXIT_FAILURE;
    }

    /**
    * Rotates the screen at the specified angle.
    *
    @param angle angle to rotate the screen.  Must be 0, 90, 180 or 270.
    *
    * @return @c EXIT_SUCCESS on success, to another @c EXIT_FAILURE
    */
    public static int
    rotate_screen (int angle)
    {
    If ((angle! = 0) & (angle! = 90) & (angle! = 180) & (angle! = 270)) {}
    fprintf (stderr, "Invalid Angle\n");
    Return EXIT_FAILURE;
    }
    int rc;
    int rotation;
    RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, & rotation);
    If (rc! = 0) {}
    fprintf (stderr, "error getting the window of the screen rotation: %d\n", rc);
    Return EXIT_FAILURE;
    }
    int size [2];
    RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error getting size memory buffer window screen: %d\n", rc);
    Return EXIT_FAILURE;
    }
    int temp;
    switch (angle - rotation) {}
    case - 270:
    case - 90:
    decision 90:
    case 270:
    Temp = size [0];
    size [0] = size [1];
    size [1] = temp;
    break;
    by default:
    break;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, &angle);)
    If (rc! = 0) {}
    fprintf (stderr, "screen rotation window for parameter error: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window screen size: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SOURCE_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window screen size: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window buffer size of the screen: %d\n", rc);
    Return EXIT_FAILURE;
    }
    Return EXIT_SUCCESS;
    }

    /**
    To manage an event of navigator.
    *
    * @return @c the value true if the application should shut down, another fake.
    */
    public static bool
    handle_navigator_event(bps_event_t *Event)
    {
    bool should_exit = false;
    switch (bps_event_get_code (event)) {}
    case NAVIGATOR_EXIT:
    should_exit = true;
    break;
    case NAVIGATOR_ORIENTATION_CHECK:
    navigator_orientation_check_response (event, true);
    break;
    case NAVIGATOR_ORIENTATION:
    {
    int angle = navigator_event_get_orientation_angle (event);
    If (rotate_screen (angle) == EXIT_FAILURE) {}
    should_exit = true;
    }
    navigator_done_orientation (Event);
    break;
    }
    }
    Return should_exit;
    }
    /**
    * Display an alert dialog box that contains the location data.
    */
    public static void
    show_main_dialog()
    {
    If {(main_dialog)
    return;
    }
    dialog_create_alert(&main_dialog);
    dialog_set_alert_message_text (main_dialog, "Acceleration to first fix");
    dialog_set_size (main_dialog, DIALOG_SIZE_FULL);
    dialog_set_group_id (main_dialog, get_window_group_id());
    dialog_set_cancel_required (main_dialog, true);
    dialog_show (main_dialog);
    }

    /**
    * Displays geolocation data in the main dialog box.
    */
    public static void
    display_acceleration_data (float force_x, float force_y, float force_z) {}
    char buf [1024];
    snprintf (buf, sizeof buf,
    "\tX: m\n % 7.3.f.
    "\tY: m\n % 7.3.f.
    "\tZ: m\n % 7.3.f."
    force_x, force_y, force_z);
    dialog_set_alert_message_text (main_dialog, buf);
    dialog_update (main_dialog);
    }

    void createafile() {}
    sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
    {if(f==null)}
    file does not exist
    f = fopen (fullname, "r");
    {while(f!=null)}
    file exists
    fclose (f);
    ++ _logcounter;
    sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
    f = fopen (fullname, "r");
    }
    }
    }

    write data to the file
    void writedataintofile() {}
    f = fopen (fullname, "w");
    fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
    fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
    fclose (f);
    }

    /**
    * A sample application shows the native APIs of BlackBerry for accelerometer.
    * The example initializes and reads the accelerometer periodically until one
    * NAVIGATOR_EXIT event is received.
    Enforcement also tuned to changes status window in the browser so that
    * It can stop reading the accelerometer when the application is no longer visible.
    */
    int main (int argc, char * argv {})
    bool exit_application = false;
    /*
    * Until we can listen for events from the BlackBerry Tablet OS platform
    * services, we need to initialize the BPS infrastructure
    */
    bps_initialize();
    /*
    * Once the BPS infrastructure has been initialized, we can save to
    * events of different services of BlackBerry Tablet OS platform. The
    * Browser service manages and provides the life cycle of application and
    * events of visibility.
    For the example, we ask browser events so that we can follow when
    * the system ends the application (NAVIGATOR_EXIT event). This allows to
    * us to clean up resources in the application.
    */
    navigator_request_events (0);
    dialog_request_events (0);
    /*
    * Initialize the screen so that the Windows Id is correctly set, to allow
    * dialogs to display.
    */
    If (setup_screen()! = EXIT_SUCCESS) {}
    fprintf (stderr, "Failed to initialize the screen.");
    Exit (-1);
    }
    /*
    * Once the BPS infrastructure has been initialized, we can save to
    * events of different services of BlackBerry Tablet OS platform. The
    * Browser service manages and provides the life cycle of application and
    * events of visibility.
    *
    For the example, we ask browser events so that we can follow when
    * the system ends the application (NAVIGATOR_EXIT event).
    *
    * We ask events of dialogue so that we can be notified when the service of dialogue
    * answers to our queries/requests.
    */
    If (BPS_SUCCESS! = navigator_request_events (0)) {}
    fprintf (stderr, "error asking navigator events: %s", strerror(errno) (errno));
    Exit (-1);
    }
    If (BPS_SUCCESS! = dialog_request_events (0)) {}
    fprintf (stderr, "error asking dialog events: %s", strerror(errno) (errno));
    Exit (-1);
    }
    /*
    * Create and display the dialog box that displays the data from the accelerometer.
    */
    show_main_dialog();
    /*
    Prior to initialize the accelerometer function, we must ensure the unit
    * takes in charge
    */
    If (sensor_is_supported (SENSOR_TYPE_ACCELEROMETER)) {}
    /*
    * If the device does not support the accelerometer so warn the user,.
    * clean in and out
    */
    public static const int SENSOR_RATE = 40;
    sensor_set_rate (SENSOR_TYPE_ACCELEROMETER, SENSOR_RATE);
    sensor_request_events (SENSOR_TYPE_ACCELEROMETER);

    }
    /*
    * Initialize the accelerometer setting the rate at which the
    * accelerometer values will be updated material
    */
    accelerometer_set_update_frequency (FREQ_40_HZ);

    /*
    Treat browser events and take the accelerometer readings periodically
    * until we receive a NAVIGATOR_EXIT event.
    */
    createafile();
    f = fopen (fullname, "w");

    While (! exit_application) {}
    /*
    * By setting the timeout to bps_get_event to ACCELEROMETER_MAX_POLL_INTERVAL,
    * We assign the maximum duration (in millis) who will wait before
    * release so that we can take a reading of the accelerometer.
    */
    bps_event_t * event = NULL;
    bps_get_event (& event, ACCELEROMETER_MAX_POLL_INTERVAL);

    If {(event)
    If (bps_event_get_domain (event) is {sensor_get_domain()})
    /*
    * We woke up. See if we are in the paused state. If not,
    take a reading of the accelerometer
    */
    If (! pause) {}
    sensor_event_get_xyz (event, & force_x, & force_y, & force_z);
    display_acceleration_data (force_x, force_y, force_z);
    fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
    fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
    } //paused
    }
    / * If this is an event of the dialog box, determine the response code and handle
    * the event accordingly.
    */
    {ElseIf (bps_event_get_domain (event) == dialog_get_domain() {)}
    ;
    }
    /*
    * If it's a NAVIGATOR_EXIT event and then set the exit_application
    * indicator so that the application stops processing events, clean and
    * output.
    */
    {ElseIf (bps_event_get_domain (event) == navigator_get_domain() {)}
    exit_application = handle_navigator_event (event);
    }
    } //if event
    } //while
    /*
    * Destroy the dialog box, if it exists.
    */
    If {(main_dialog)
    dialog_destroy (main_dialog);
    }

    fclose (f);

    /*
    * Clean the infrastructure bps and output
    */
    sensor_stop_events (SENSOR_TYPE_ACCELEROMETER);
    bps_shutdown();
    screen_destroy_window (screen_win);
    screen_destroy_context (screen_ctx);
    return 0;
    } //main

    Hello

    As I said on your other thread:

    In order to write in the shared directory/documents, your application should request action "access_shared" and it must be granted by the user. Make sure you have

    access_shared

    in your bar - descriptor.xml.

    Also note that the shared documents folder may not be the best place to write the application log data. There is one connects / in the sandbox to this effect, or the application directory data / directory if the information should be persisted. The documents/shared/folder is designed for documents that the user creates or interacts with.

    HTH,

    Christian

  • invoke the url from the menu

    Hello.  I need help, try to understand this.

    I want to be able to go to a different location when you click a menu option.  I used the BrowserFieldSampleApplication sample that comes with the JDE and want to raise him.  Basically, the vehicle has currently the feature to display the browser has filed in the main screen.  So I want to add to the addition of adding a menu item and calling another url when this menu is click, but it does not work.  The code is below.  This essential element of this code is that sample application that came with the JDE, I didn't add the menu.

    When I do:

    Thread PrimaryResourceFetchThread = new PrimaryResourceFetchThread ("http://www.hotmail.com", null, null, null, this); THIS ME GIVE A COMPILATION ERROR, BUT I CAN'T UNDERSTAND WHY?

    Thread PrimaryResourceFetchThread = new PrimaryResourceFetchThread ("http://www.google.com", null, null, null, new MyButtonListener()); IT DOES NOT DISPLAY THE PAGE

    MyMenu MenuItem = new MenuItem ("Go to Hotmail", 1.1)
    {
    public void run()
    {
    Dialog.Alert ("display of the Hotmail Page");
              
    Thread PrimaryResourceFetchThread = new PrimaryResourceFetchThread ("http://www.hotmail.com", null, null, null, this); THIS DISPLAYS A COMPILATION ERROR--> WHY COMPILATION ERROR HERE I CAN'T UNDERSTAND.
    Thread PrimaryResourceFetchThread = new PrimaryResourceFetchThread ("http://www.google.com", null, null, null, new MyButtonListener()); IT DOES NOT DISPLAY THE PAGE
    thread. Start();
    }
    };

    class TestMe extends UiApplication{
        public static void main(String[] args)
        {
            TestMe buttonListener = new TestMe();
            buttonListener.enterEventDispatcher();
        }
    
        TestMe() {
            pushScreen(new MyButtonListener());
    
        }
    } 
    
    class MyButtonListener extends MainScreen implements RenderingApplication
    {
        private static final String REFERER = "referer";   
    
        private RenderingSession _renderingSession;
        private HttpConnection  _currentConnection;
    
        public MyButtonListener()
        {
            _renderingSession = RenderingSession.getNewInstance();
            PrimaryResourceFetchThread thread = new PrimaryResourceFetchThread("http://www.google.com", null, null, null, this);
            thread.start();
        }
    
        MenuItem myMenu = new MenuItem("Go to Hotmail", 1,1)
        {
            public void run()
            {
                Dialog.alert("Displaying Hotmail Page");
    
               // PrimaryResourceFetchThread thread = new PrimaryResourceFetchThread("http://www.hotmail.com", null, null, null, this); //THIS IS GIVING ME A COMPILING ERROR
                PrimaryResourceFetchThread thread = new PrimaryResourceFetchThread("http://www.google.com", null, null, null, new MyButtonListener()); //THIS ISN'T DISPLAYING THE PAGE
                thread.start();
            }
    
        };
    
        protected void makeMenu(Menu menu, int instance)
        {
            menu.add(myMenu);
        }    
    
        public boolean onClose()
        {
            Dialog.alert("You are about to close this app");
            return true;
        }
    
        // Process Connection Class
        public void processConnection(HttpConnection connection, Event e)
        {
            // Cancel previous request.
            if (_currentConnection != null)
            {
                try
                {
                    _currentConnection.close();
                }
                catch (IOException e1)
                {
                }
            }
    
            _currentConnection = connection;
    
            BrowserContent browserContent = null;
    
            try
            {
                browserContent = _renderingSession.getBrowserContent(connection, this, e);
    
                if (browserContent != null)
                {
                    Field field = browserContent.getDisplayableContent();
    
                    if (field != null)
                    {
                        synchronized (Application.getEventLock())
                        {
                            //_mainScreen.deleteAll();
                            deleteAll();
                            //_mainScreen.add(field);
                            add(field);
                        }
                    }
    
                    browserContent.finishLoading();
                }
    
            }
            catch (RenderingException re)
            {
            }
            finally
            {
                SecondaryResourceFetchThread.doneAddingImages();
            }
    
        }    
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#eventOccurred(net.rim.device.api.browser.Event)
         */
        public Object eventOccurred(Event event)
        {
            int eventId = event.getUID();
    
            switch (eventId)
            {
                case Event.EVENT_URL_REQUESTED :
                {
                    UrlRequestedEvent urlRequestedEvent = (UrlRequestedEvent) event;
                    String absoluteUrl = urlRequestedEvent.getURL();
    
                    HttpConnection conn = null;
    
                    System.out.println("Lcle: you requested" + absoluteUrl);
    
                    PrimaryResourceFetchThread thread = new PrimaryResourceFetchThread(urlRequestedEvent.getURL(),
                                                                                             urlRequestedEvent.getHeaders(),
                                                                                             urlRequestedEvent.getPostData(),
                                                                                             event, this);
                    thread.start();
    
                    break;
    
                }
                case Event.EVENT_BROWSER_CONTENT_CHANGED:
                {
                    // Browser field title might have changed update title.
                    BrowserContentChangedEvent browserContentChangedEvent = (BrowserContentChangedEvent) event; 
    
                    if (browserContentChangedEvent.getSource() instanceof BrowserContent)
                    {
                        BrowserContent browserField = (BrowserContent) browserContentChangedEvent.getSource();
                        String newTitle = browserField.getTitle();
                        if (newTitle != null)
                        {
                            /*synchronized (getAppEventLock())
                            {
                                //_mainScreen.setTitle(newTitle);
                                setTitle(newTitle);
                            }*/
    
                        }
                    }                   
    
                    break;                
    
                }
                case Event.EVENT_REDIRECT :
                {
                    RedirectEvent e = (RedirectEvent) event;
                    String referrer = e.getSourceURL();
    
                    switch (e.getType())
                    {
                        case RedirectEvent.TYPE_SINGLE_FRAME_REDIRECT :
                            // Show redirect message.
                            Application.getApplication().invokeAndWait(new Runnable()
                            {
                                public void run()
                                {
                                    Status.show("You are being redirected to a different page...");
                                }
                            });
    
                        break;
    
                        case RedirectEvent.TYPE_JAVASCRIPT &colon
                            break;
    
                        case RedirectEvent.TYPE_META :
                            // MSIE and Mozilla don't send a Referer for META Refresh.
                            referrer = null;
                            break;
    
                        case RedirectEvent.TYPE_300_REDIRECT :
                            // MSIE, Mozilla, and Opera all send the original
                            // request's Referer as the Referer for the new
                            // request.
                            Object eventSource = e.getSource();
                            if (eventSource instanceof HttpConnection)
                            {
                                referrer = ((HttpConnection)eventSource).getRequestProperty(REFERER);
                            }
    
                            break;
                        }
    
                        HttpHeaders requestHeaders = new HttpHeaders();
                        requestHeaders.setProperty(REFERER, referrer);
                        PrimaryResourceFetchThread thread = new PrimaryResourceFetchThread(e.getLocation(), requestHeaders,null, event, this);
                        thread.start();
                        break;
    
                }
                case Event.EVENT_CLOSE :
                    // TODO: close the appication
                    break;
    
                case Event.EVENT_SET_HEADER :        // No cache support.
                case Event.EVENT_SET_HTTP_COOKIE :   // No cookie support.
                case Event.EVENT_HISTORY :           // No history support.
                case Event.EVENT_EXECUTING_SCRIPT :  // No progress bar is supported.
                case Event.EVENT_FULL_WINDOW :       // No full window support.
                case Event.EVENT_STOP :              // No stop loading support.
                default :
            }
    
            return null;
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#getAvailableHeight(net.rim.device.api.browser.BrowserContent)
         */
        public int getAvailableHeight(BrowserContent browserField)
        {
            // Field has full screen.
            return Display.getHeight();
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#getAvailableWidth(net.rim.device.api.browser.BrowserContent)
         */
        public int getAvailableWidth(BrowserContent browserField)
        {
            // Field has full screen.
            return Display.getWidth();
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#getHistoryPosition(net.rim.device.api.browser.BrowserContent)
         */
        public int getHistoryPosition(BrowserContent browserField)
        {
            // No history support.
            return 0;
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#getHTTPCookie(java.lang.String)
         */
        public String getHTTPCookie(String url)
        {
            // No cookie support.
            return null;
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#getResource(net.rim.device.api.browser.RequestedResource,
         *      net.rim.device.api.browser.BrowserContent)
         */
        public HttpConnection getResource( RequestedResource resource, BrowserContent referrer)
        {
            if (resource == null)
            {
                return null;
            }
    
            // Check if this is cache-only request.
            if (resource.isCacheOnly())
            {
                // No cache support.
                return null;
            }
    
            String url = resource.getUrl();
    
            if (url == null)
            {
                return null;
            }
    
            // If referrer is null we must return the connection.
            if (referrer == null)
            {
                HttpConnection connection = Utilities.makeConnection(resource.getUrl(), resource.getRequestHeaders(), null);
    
                return connection;
    
            }
            else
            {
                // If referrer is provided we can set up the connection on a separate thread.
                SecondaryResourceFetchThread.enqueue(resource, referrer);
            }
    
            return null;
        }
    
        /**
         * @see net.rim.device.api.browser.RenderingApplication#invokeRunnable(java.lang.Runnable)
         */
        public void invokeRunnable(Runnable runnable)
        {
            (new Thread(runnable)).start();
        }
    
    }    
    
    class PrimaryResourceFetchThread extends Thread
    {
        private MyButtonListener _application;
        private Event _event;
        private byte[] _postData;
        private HttpHeaders _requestHeaders;
        private String _url;
    
        PrimaryResourceFetchThread(String url, HttpHeaders requestHeaders, byte[] postData,
                                      Event event, MyButtonListener application)
        {
            _url = url;
            _requestHeaders = requestHeaders;
            _postData = postData;
            _application = application;
            _event = event;
        }
    
        public void run()
        {
            HttpConnection connection = Utilities.makeConnection(_url, _requestHeaders, _postData);
            _application.processConnection(connection, _event);
        }
    }
    

    Hello

    I'm not quite sure, but post your compiler error that would help.

    The key word is perhaps not MyButtonListener instance?

    Kind regards

    Jochen

  • How to recover the dynamic value of ADF text entry?

    Hello

    I'm developing an application where this scenario occurs.

    1. a dynamic text input for the click on the radio button, must be created.  (I am able to do this).

    2. I am entering a value in dynamic text that is created at run time.

    How to get the value of dynamic text in my java code?

    Or what property must be used to retrieve dynamic data of text entry?

    Hello

    Here is a case that as it is similarly instead of your box here a commandbutton control.

    JSPX code

    actionListener="#{viewScope.Mbean.ActionLis}"/ >

    track 1:

    1. here you using "setValueChangeListener".

    2. with the help of MethodBinding to invoke the listener in the same class itself.

    3 MethodBinding and el class has been deprecated in this approach.

    the bean code

    Import javax.faces.context.FacesContext;

    Import javax.faces.el.MethodBinding;

    Import javax.faces.event.ActionEvent;

    Import javax.faces.event.ValueChangeEvent;

    Import javax.faces.event.ValueChangeListener;

    Import oracle.adf.view.rich.component.rich.input.RichInputText;

    Import oracle.adf.view.rich.component.rich.layout.RichPanelBox;

    Import oracle.adf.view.rich.component.rich.nav.RichCommandButton;

    Import oracle.adf.view.rich.context.AdfFacesContext;

    public void ActionLis (ActionEvent actionEvent) {}

    Add the code in the event here...

    RichInputText rt = new RichInputText();

    rt.setAutoSubmit (true);

    Class parms [] = new class [] {ValueChangeEvent.class};

    MethodBinding mbind = FacesContext.getCurrentInstance () .getApplication () .createMethodBinding ("#{viewScope.Mbean.valuchnglis}", parms);

    rt.setValueChangeListener (mbind);

    ((RichCommandButton) actionEvent.getSource ()) .getParent () .getChildren () .add (rt);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (((RichCommandButton) actionEvent.getSource ()) .getParent ());

    }

    {} public void valuchnglis (ValueChangeEvent valueChangeEvent)

    System.out.println ("value" + valueChangeEvent.getNewValue ());

    }

    Track 2:

    1. here you using "addValueChangeListener".

    2. you need an additional class to do so.

    3. you can retrieve the value of processValueChange.

    the bean code

    Import javax.faces.context.FacesContext;

    Import javax.faces.el.MethodBinding;

    Import javax.faces.event.ActionEvent;

    Import javax.faces.event.ValueChangeEvent;

    Import javax.faces.event.ValueChangeListener;

    Import oracle.adf.view.rich.component.rich.input.RichInputText;

    Import oracle.adf.view.rich.component.rich.layout.RichPanelBox;

    Import oracle.adf.view.rich.component.rich.nav.RichCommandButton;

    Import oracle.adf.view.rich.context.AdfFacesContext;

    public void ActionLis (ActionEvent actionEvent) {}

    Add the code in the event here...

    RichInputText rt = new RichInputText();

    rt.setAutoSubmit (true);

    rt.addValueChangeListener (new vc());

    ((RichCommandButton) actionEvent.getSource ()) .getParent () .getChildren () .add (rt);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (((RichCommandButton) actionEvent.getSource ()) .getParent ());

    }

    Import javax.faces.event.ValueChangeEvent;

    Import javax.faces.event.ValueChangeListener;

    public class vc implements {ValueChangeListener

    public void processValueChange (ValueChangeEvent valueChangeEvent)

    {

    System.out.println ("value of the class" + valueChangeEvent.getNewValue ());

    }

    }

    Thank you

  • Delay action Dynamics keypress

    Hi gang,.

    Imagine a search page that behaves a lot like google - each character typed in the search field will affect the search results.

    Here's a basic example.
    http://Apex.Oracle.com/pls/Apex/f?p=35127:4

    With this, I created a dynamic action
    Event: Press on the key
    Article: P4_REPORT_SEARCH

    With two actions
    1: run code pl/sql - execute null; but article submit page will be P4_REPORT_SEARCH
    2: employee refreshment area

    What I found was a delay between entering characters for the search and the updating of the report. I noticed this in another case where I had a button toggling on KeyPress.

    Is it a problem with the browser event, or my logic DA? I'm event thought since rollback doesn't seem to update the region either.
    And to recreate this problem on apex.oracle.com, I noticed that session state is updated a keypress behind, too.

    For adding info in this demo, I display some items more, located in the pl/sql in the DA, if everything goes well beyond noting my observations
    :p4_cnt := :p4_cnt + 1;
    :p4_x := :p4_report_search;
    Any suggestions?

    See you soon,.

    Scott

    Apex 4.1.1
    11 GR 2
    any browser "big 3" - which is a valid condition for chrome/ff/IE? ;-) "»

    In general, KeyUp is a better event for that. Have you tried KeyUp?

    Kind regards

    Also, this is a known issue with keypressed.
    >
    Note: The onkeypress event is not raised for keys (e.g., ALT, CTRL, SHIFT, ESC) in all browsers. To only detect if the user has pressed a key, use the onkeydown event, because it works for all keys.
    >

    BTW, it seems to me that he is not a delay but a case of event by a key behind shot.

    1. press on k. Nothing happens
    2. press BACKSPACE and K research shows.

    Kind regards

    Published by: Dominique 3 may 2012 12:15

Maybe you are looking for