HTMLB- Button Event CASE Dyn Nav problem

Hi,
I am prototyping a solution in BSP which has a page with two buttons at the bottom, a BACK button and a SUBMIT button which both send the User to different pages, and I can't make the re-directs work.
I am trying to stick to HTMLB and not get lazy and use HTML.
I have a page call it page1.htm, at the bottom there is a submit button and back button with htmlb code as follows:
<htmlb:button       text         = "Back"
                    onClick      = "event_1" />
<htmlb:button       text         = "Submit Request"
                    onClick      = "event_2" />
in the EVENT HANDLER for the OnInputProcessing Event I have the following CASE statement:
CASE event_id.
  WHEN 'event_1':.
  navigation->goto_page( 'default.htm' ).
  WHEN 'event_2':.
  navigation->goto_page( 'submitresult.htm' ).
ENDCASE.
the idea is that when the BACK button is pressed the OnInputProcessing event handler will pick this up and using the value of the EVENT_ID which can be either event_1 or event_2 the CASE statement will re-direct the User to the correct page.
Problem -> it doesn't work.
Does anyone have any ideas where I am going wrong.
Thanks for your time,
Milan.

Hallo Milan, (interesting name, English?)
Somehow we are just overlooking something. I quickly built a very small cut-and-paste example.
Create a new BSP application, and add into it three pages called page1.htm, page2.htm and page3.htm. The source is below. (Note all three has the same event handler:).
<b><u>onInputProcessing for all three pages</u></b>
DATA: event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event_ex( request ).
IF event IS NOT INITIAL AND event->event_name = 'button'.
  navigation->goto_page( event->event_server_name ).
ENDIF.
<b><u>page1.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page>
    <htmlb:form>
      <htmlb:button       text          = "Page 2"
                          design        = "NEXT"
                          onClick       = "page2.htm" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
<b><u>page2.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page>
    <htmlb:form>
      <htmlb:button       text          = "Page 1"
                          design        = "PREVIOUS"
                          onClick       = "page1.htm" />
      <htmlb:button       text          = "Page 3"
                          design        = "NEXT"
                          onClick       = "page3.htm" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
<b><u>page3.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page>
    <htmlb:form>
      <htmlb:button       text          = "Page 2"
                          design        = "PREVIOUS"
                          onClick       = "page2.htm" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
I highly recommend to run this in design2003. You will love that PREVIOUS/NEXT design on the buttons. If this example is not working for you, there are a few other things to be checked. But first try this.
++bcm

Similar Messages

  • Dynamically call htmlb button event

    Hi
    Does anybody know how to dynamically call the onClick event of an htmlb button?
    for regular html, you use <buttonID>.fireEvent("onClick")
    thanks in advance
    Anton Kruse

    Hi,
    Use both onClientClick to call the client event an use onClick to execute the server event.onClientClick is executed with first priority and then the onClink event is fired in the server.
    e.g :
    <hbj:button
              id="Send_Button"
              text="Send"
              tooltip="Sends my name"
              jsObjectNeeded="true" onClientClick="validate();"
              onClick="onSendButtonClicked"
              width="100"
              design="EMPHASIZED">
    First the validate javascript method executes then the onClick "onSendButtonClicked()" method in the controller executes.
    If helps reward with points.
    Regards
    Ritu
    Thanks

  • Event Handling for HTMLB Buttons

    Dear Pros,
    How we handle HTMLB Button Events for the following Code in the Layout section:
    I want the user to Click this button for Downloading the Internal table displayed onto an Excel file on Presentation Server.
    <htmlb:content design="classic" >
      <htmlb:page title="page1 " >
        <htmlb:form>
          <htmlb:button id = "Dwd_Excl"
             text          = "Download to Excel"
             tooltip       = "Please click for Excel Download"
             onClientClick = "EXCEL"
             design        = "small"
             width         = "200" />
          <htmlb:tableView id          = "tv1"
                       headerText      = "Sales Statement"
                       design          = "alternating"
                       headerVisible   = "true"
                       visibleRowCount = "20"
                       selectionMode   = "lineEdit"
                       table           = "<%= t_zsstable %>"
                       iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Waiting for your suggestions/replies.
    Sincere Thanks to All.
    Vivek Singh.

    Hi Craig,
    Just worked on the code sample you provided. Heres' how my code looks in OnInputProcessing segment:
          Some internal table population code here
    then the following code segment:
    file = 'C:\ZSS.XLS'.
    event = cl_htmlb_manager=>get_event_ex( request ).
    IF event IS NOT INITIAL AND event->event_id = 'Dwd_Excl'.
      results = 'Button was pushed'.
    ENDIF.
    IF results = 'Button was pushed'.
      CALL FUNCTION 'WS_EXCEL'
        EXPORTING
          filename      = file
        TABLES
          data          = t_zsstabl
        EXCEPTIONS
          unknown_error = 1
          OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDIF.
    The problem is that when I push the Download to Excel HTMLB Button, the following Error is being displayed on the page :
    500 SAP Internal Server Error
    Error message: Exception condition "NO_BATCH" raised. ( type of termination: RABAX_STATE )
    The Layout part code is :
    <htmlb:content design="classic" >
      <htmlb:page title="page1 " >
        <htmlb:form>
          <htmlb:button id            = "Dwd_Excl"
                        text          = "Download to Excel"
                        tooltip       = "Please click for Excel Download"
                        onClick       = "ExcelButton"
                        design        = "small"
                        width         = "200" />
          <htmlb:tableView id              = "tv1"
                           headerText      = "Sales Statement"
                           design          = "alternating"
                           headerVisible   = "true"
                           visibleRowCount = "20"
                           selectionMode   = "lineEdit"
                           table           = "<%= t_zsstabl %>"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    I hope you can suggest something on this.
    Waiting for your response.
    Best Regards,
    Vivek.

  • Htmlb:button  onClick event

    Hi experts I'm using follwoing code  for htmlb :button
              <htmlb:button       id            = "myButton2"
                                text          = "<%= v_save %>"
                               tooltip       = "<%= v_save %>"
                               onClick       = "approveClick"
                               design        = "emphasized"
           />
    and in
    do_handle_event  I'm using followin code
    DATA : button_event TYPE REF TO cl_htmlb_event_button,
             event1 TYPE REF TO cl_htmlb_event.
      event1 = cl_htmlb_manager=>get_event(  runtime->server->request ).
      CASE event1->server_event.
        WHEN 'approveClick'.
          button_event  ?= event1 .
    <   some code >
    ENDCASE.
    when i clicked the button it is not going into do_handle_event
    I'm unable to capture onclick event of button .I tried it by keeping some break points .But couldn't be ableto capture it
    Here I'm using MVC pattern .When one check box clicked in view of another controller  the page which contains this button will be displayed.Do i need to write any additional code for it

    There are 2 kind of break-points.
    1. Session break-points - This will wok only to debug normal ABAP codes.
    2. External break-points - This will help you to debug BSP/Webdynpro application.
    Set the external-break point to figure out whether its triggering the events or not.
    <b>
    To set the external Break-points:</b>
    Before settings the external-break-point, you need to Active External break-point for HTTP. YOu can find this option in
    SE80, in
    Utilites--> Break-point/External break-point or Utilites--> External break-point --> Set External break-point
    or if you dont find, then
    utilities-->setttings -> ABAP Workbench -> look at the debugger tab
    & find the external Debugging check box or External Debugging user ID. Give SAP User ID
    Also have a look at this..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/17/00ab3b72d5df3be10000000a11402f/frameset.htm
    <i>* Reward each useful answer</i>
    Raja T
    Message was edited by:
            Raja Thangamani

  • Problems in capturing the button event

    Hi
    I have created a BSP page with some buttons on it.
    I am trying to execute some code on click of the button, I am capturing the button in OnInput processing event using the following code
    event_data = cl_htmlb_manager=>get_event( runtime->server->request ).
    however the event_data is not getting populated with the button event and i am getting a null reference dump...
    can you tell me if i need to anything else apart from adding the above code.
    Thanks
    Bharath Mohan B

    Hi Bharrie,
    the online documentation describes this very clearly. You access it by double-clicking on the BSP Extension element in the Tag Browser.
    A brief snippet from the doco....
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
          DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
          button_event ?= event.
      ENDIF.
    Cheers
    Graham Robbo

  • HTMLB +  htmlb:button

    Hello Friends,
    I have a problem in using HTMLB, button in view of BSP page. Actually the problem is that I want to call the main contrller when user click on the button. But as in view there is not Event Handler, so while "onClick="event_1"/>, how I can handle this event!
    here is a bit of code segment!
    <htmlb:button  width="10" onClick="event_1"/>
    Does it work ?? like this if I call controller direct ??
    <htmlb:button  width="10" onClick="main.do"/>
    With Regards,
    Haider Syed.

    So, after making a small mistake in my last post (corrected now), I will try to bring some light into this situation:
    First, summarize all the options you have:
    Each form has a "target" (<b><form action="target_controller.do"></b>) which the browser will submit the form data to.
    Note that this is different from the actual target-attribute (<b><form target="_blank"></b>), which is used to specify the location where the server-response will be displayed - you can let it be shown in a new window here.
    Then, for form elements, you have the option to set client-side javascripts, using the <b>onClientClick</b> attribute. It's best if you just call a javascript function here, and define this function somewhere else in your code (javascript-file-include for example).
    <htmlb:button ...
       onClientClick="yourFunction();" />
    You can access your HTML elements (also form elements) using javascript, so changing the target or action parameter from within your function is possible!
    To finish this post, there is the server-side event, specified by the <b>onClick</b> attribute, which is usually checked for in DO_HANDLE_EVENT (in case of MVC) or in OnInputProcessing (for non-MVC BSP pages, like Craig mentioned). But remember, this is server-side event!
    So, with this info, you should be able to specify in more detail what you call "for each button a new event" - whether you mean server-side or client-side event ... maybe thinking about this alone will almost solve your problem.
    Regards,
    Max

  • Can I have multiple event structures with the same event cases?

    Hello, 
    I'm doing an application that reproduces the front panel of the HP6675A power supply. To achieve this, I have done a state machine with different states
    (initialize, measures, voltage, current, ocp, ov, store, recall, etc). In each state, should have an event structure that catches the events of the buttons, like for example: if the current state is the Voltage mode and the user press the current button the next state will be the Current mode. For this in each state of the state machine should be the same event structure with the same events.
    My problem is that the Vi doesn't work properly when I have multiple event structures with the same event cases. There are some possibily to do this, and how? Or is impossible to have multiple events? I have been reading some posts, but I don't find solutions. 
    Any help is appreciated.
    Thank you very much.
    Solved!
    Go to Solution.

    natasftw wrote:
    Or as others mentioned, make two parallel loops.  In one loop, have your state machine.  In the other, have just the Event Handler.  Pass the events from the handler to the state machine by way of queues.
    A proper state machine will not need the second loop.  The "Wait For Event" or "Idle" state (whatever you want to call it) is all you really need in order to catch the user button presses.  The setup is almost there.  Maybe add a shift register to keep track of which state to go to in the case of a timeout on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can I launch a new JSP on a popup window, when cliking a HTMLB button ?

    Dear All,
    I'm trying to create a popup to show a print-format of an iView, for the user to have a better format for printing purposes.
    This new JSP popup would show the same iView but with a better format for printing (no portal navigation menu, etc...)
    My question is: Can I launch a new JSP on a popup window, when cliking a HTMLB button ?
    Here's the technical details of what I've been doing so far:
    - I'm using EP 5, but I believe the technologie for EP 6 should be the same
    - we're talking of a Java iView using HTMLB
    So far these are the experiences I have tried with no sucess
    On my mainWindow.jsp I have this piece of code, but it doesn't work:
    (etc...)
    <%
    ResourceBundle res = componentRequest.getResourceBundle();
    IResource rs = componentRequest.getResource(IResource.JSP, "printFormat.jsp");
    String JSP_URL = rs.getResourceInformation().getURL(componentRequest);
    %>
    (etc...)
    <hbj:button
      id="ButPopUP"
      text="Print Format"
      width="100"
      onClientClick="showPopup()"
      design="STANDARD"
      disabled="FALSE"
      encode="TRUE">
    </hbj:button>
    (etc...)
    <script language="Javascript">
    function showPopup(){
    mywindow = window.open ("<%=JSP_URL %>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1,
    resizable=1, width=600,height=400");
    htmlbevent.cancelSubmit=true;
    </script>
    (etc...)
    Thank you very kindly for your help.

    Hi Kiran,
    sorry for the late reply.
    Thank you so much for your JAR file.
    Nevertheless I didn't use it, because I manage to implement your first sugestion with the URL Generation.
    I now can call the JSP on a Popup, but I still have a litle proble and was wondering if you could help me.
    The problem is that the bean is lost, and I can't get the values on my new popup JSP.
    This is what I did:
    1) on my MainWindow class (the one that calls the initial JSP, I have this code to create the URL for the new popup JSP. This is the code:
    IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
    IPortalUrlGenerator portalGen = null;
    ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
    if (specUrlGen instanceof IPortalUrlGenerator) {
         portalGen = (IPortalUrlGenerator) specUrlGen;
         try {
              String url = null;
              url = portalGen.generatePortalComponentUrl(request, "Forum_IS.popvalues");
              myBeanDados.setPopupURL(url);
         } catch (NullPointerException e) {
              log.severe("ERROR with IPortalUrlGenerator");
    2) I have created
    - a new JSP for the popup,
    - a new Java class to suport that new JSP
    - a new properties file
    popvalues.properties with the following code:
    ClassName=MyPop
    ServicesReference=htmlb, usermanagement, knowledgemanagement, landscape, urlgenerator
    tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
    MyPop is the new class that is associated with the new JSP popup.
    The problem now is that the bean was lost.
    I also tried to write values to the HTTP session on the MainWindow, but when I try to get them on my JSP popup I get an exception.
    How can I pass the values (or beans) to my new popup JSP ?
    Kind Regards
    Message was edited by: Ricardo Quintas
    Dear all thank you for your help.
    I have managed to solve the problem I had.
    Here's the problem + solution sumary.
    I have to remind you that we are talking of EP 5, PDK 5 (Eclipse version 2.1.0), with JAVA JDK 1.3.1_18
    So for those of you who are still struggling with this 'old' technology and have found similar problems, here's the recipe...
    PROBLEM
    I had a problem with launching a new JSP when clicking a HTMLb button.
    I wanted to create a JSP to present a 'print-format' of an iView.
    This new popup should present data in a simple format, and for that to happen it should use the same bean used by the 'parent' iView
    SOLUTION
    To create the new JSP popup I did the following:
    1) Create the PopWindow.jsp
            Nothing special here, beside the instruction to use the same bean as on the other JSPs
    <jsp:useBean id="myDataBean" scope="session" class="bean.DataBean" />
       2) Create the associated JAVA class
    MyPop.java.      This class will be used to call the PopWindow.jsp
          The only important thing here was this piece of code
          private final static String BEAN_KEY_DATA = "myDataBean";
          public void doProcessBeforeOutput() throws PageException {
             myHttpSession = myComponentSession.getHttpSession();
             myDataBean = (DataBean) myHttpSession.getAttribute(BEAN_KEY_DATA);
             myComponentSession.putValue(BEAN_KEY_DATA, myDataBean);
             this.setJspName("PopWindow.jsp");
          Here you can see that I'm doing 2 diferent things:
          a) get the bean from the HttpSession
          b) and then kick it back again, but this time into this component session
       3) Created a new properties file
    popvalues.properties.      This file contains the follwing code:
          ClassName=MyPop
          tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
          Contrary to some opinions on this discussion,
    you can't call a component in EP 5 by using ComponentName.JSPname.
    Or at least that didn't work for me.
    You nee to use an aproach like this one ComponentName.NewProperiesFileName
    4) On my main class MainClass.java (for the parent iView) I haded the following code on the event doInitialization: 
            IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
            IPortalUrlGenerator portalGen = null;
            ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
            if (specUrlGen instanceof IPortalUrlGenerator) {
                 portalGen = (IPortalUrlGenerator) specUrlGen;
                   try {
                       String url = null;
                       url = portalGen.generatePortalComponentUrl(request, "MyMainApplication.popvalues");
                       myDataBean.setPopupURL(url);
                       } catch (NullPointerException e) {
                          etc...
          The idea here was to build dinamicaly a URL to call the popup.
          To construct that URL I had to use
    ISpecializedUrlGenerator that would point to my main application, but this time with the new properties file discussed already on item 3)      This URL is stored inside the bean, and will be used afterwards with the javascript - see item 6 b)
          I had this on the import section
          import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
       5) Then I had to solve the problem of how to pass the bean from the parent iView to the popup.
          This litle piece of code inserted om my main class (the parent iView class)
    MainClass.java solved the problem: 
          import javax.servlet.http.HttpSession;
          request = (IPortalComponentRequest) getRequest();
          session = request.getComponentSession();
          session.putValue(BEAN_KEY_DATA, myDataBean);
          myHttpSession = session.getHttpSession();
          myHttpSession.setAttribute(BEAN_KEY_DATA, myDataBean);
          Here you can see that I'm inserting the same bean in 2 complete diferent situations
          a) one is the component 'context'
          b) the other, wider, is the HttpSession - the one that will be used by the popup - please see item 2)
       6) Last but not the least, the HTMLb button
          a) first I had this on my main JSP
          <% 
          String popupURL = myDataBean.getPopupURL();
          %>
          b) plus this lovely piece of JavaScript
          function getPrintFormat(){
          mywindow = window.open ("<%=popupURL%>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1, resizable=1, width=600,height=400");
          htmlbevent.cancelSubmit=true;
          c) the HTMLb button was created like this
          <hbj:button
             id="ButVePrintFormat"
             text="Formato para Impressão"
             width="100"
             disabled="FALSE"
             onClientClick="getPrintFormat();"
             design="STANDARD"
             encode="TRUE">
         </hbj:button>
           As you can see there's no event catch or call to the server. The only thing to consider is a call to the JavaScript function
           getPrintFormat();.
           Está todo lá dentro.
           That's all there is to it.

  • Regarding HTMLB button

    Hello SDN
    I'm new to portal and facing problem with button event management .when i triggered event its giving error that eventhandler could not be found .Where should i write my event handler  in"doProcessAfterInput()" or elsewhere
    waiting for help

    HI,
    I hope this code clears your doubt
    public class HelloDyn extends PageProcessorComponent {
      public DynPage getPage(){
        return new HelloDynDynPage();
      public static class HelloDynDynPage extends JSPDynPage{
        public int state = 0;
        public void doInitialization(){
        public void doProcessAfterInput() throws PageException {
         public void confirm(Event event) {
              IPortalComponentResponse response=(IPortalComponentResponse)this.getResponse();
              IPortalComponentRequest request =(IPortalComponentRequest)this.getRequest();
              InputField inputf=(InputField)getComponentByName("name");
              String inputValue=inputf.getValueAsDataType().toString();
              response.write("Welcome" + " "+inputValue);
              IUser user1 = request.getUser();
              String usn = user1.getDisplayName();
              response.write(usn);
              state = 1;
        public void doProcessBeforeOutput() throws PageException {
             switch(state)
                  case 0:
                   this.setJspName("HelloJsp.jsp");
                   break;
                   case 1:
                   this.setJspName("hiUser.jsp");
                   break;

  • Can you use event case with labview real time?

    I have a real time application I am putting together and until recentally have concentrated on getting the data acquisition working as expected.
    I am using a PXI-8183 in a 1031 chassis.
    I am now trying to add the functionality for setting up the system in the form of a GUI remote front panel that I connect to with a host laptop.  I am connecting with the host as expected and it seems to be working well in that respect.
    My problem is with event cases, operating in a while loop on the target.  They just dont seem to want to trigger when i click on a button I have set an event for.
    I have looked through the documentation and cant see any reference to issues with event cases on rt, but I feel I am missing something fundamental.  Can anyone help?
    Regards,
    Barry

    look here maybe:
    http://digital.ni.com/public.nsf/allkb/42B70D2D0C4B568586256E2F0051441D
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome

  • Few seconds of processing & button events

    Hi,
    i have a 'theory' question -
    some feature of my app has a bit long processing time, about a few seconds, in which there's an activity indicator running.
    this processing should start after the user pressed some "start process" button.
    my question is -
    is it good or bad or neither to do this large processing issue from within the button's event method (the one connected to "TouchUpInside" event for example, or there's a better way to use events to signal other parts of the application to do that processing.
    the reason i ask this is when i do the processing from within the buttons event method, the button is highlighted and than remains highlighted until all the process is done.it seems that the highlight is there until the button's event method finished.
    i hope i explained myself clearly enough.
    thanks a lot.

    nkobik wrote:
    is it good or bad or neither to do this large processing issue from within the button's event method
    The problem in this case isn't which method starts the long process. No matter where you run that task, it's going to freeze the UI until you get it out of the main thread. Running the process in the action method makes the problem more noticeable since the button's state can't change until the process completes, but freezing the UI is never acceptable even if some users don't notice it. I.e. even if the app has nothing useful to do until the long process completes, the controls should still respond normally, if only to pop up an alert asking the user to be patient. Generally the user should also have the opportunity to cancel a long process, which isn't going to be possible with a frozen UI.
    So it looks like you need to bite the bullet and use some kind of concurrent operation. I think the choice will depend in part on your experience and preference. If you're comfortable with threaded programming, starting a helper thread to run the long process might be the easiest for you. However the SDK supports higher level concurrency management, and if you're not familiar with the NSOperation classes you might want to look over the Concurrency Programming Guide.
    Whatever approach you decide on, let us know if you need help with it, and I'm sure someone around here will be able to advise you.
    \- Ray

  • LabVIEW 7.1: menu driven event structure question: How can I cause an event case to fire when either a boolean object or a menu item is selected without polling?

    I am using an event structure to eliminate the overhead associated with polling from the GUI. I have build cases associated with each front panel button, and would like to programmatically generate a menu for the vi, adding each selection from the menu to its associated case. However adding a "user event" to a case that is already associated with a front panel button does not seem to allow the selection of the associated user event. Do I have to register each option on the custom menu? Should I programmatically generate the menu and use the same array to register the choices? Are there any examples out there
    that would help me?
    Thanks!!!!
    Steve

    Hello:
    I visited the forum for the purpose of getting some ideas on user
    events architecture. Well, I have to finished standalone working
    modular VI codes one which works as a standalone local control and
    one  which works on a remote communications mode. Now these 
    codes in themselves has event driven capabilities my problem is I
    needed to create another topmost layer VI that will be capable of
    switching between these remote and local operating mode - which I was
    thinking also to be event driven. This maybe a poor idea but I tried
    anyway. Is the User Event loop can be nested? Meaning an event within
    an event thing?
    Regards,
    Berns B.
    Bernardino Jerez Buenaobra
    Senior Test and Systems Development Engineer
    Test and Systems Development Group
    Integrated Microelectronics Inc.- Philippines
    Telephone:+632772-4941-43
    Fax/Data: +632772-4944
    URL: http://www.imiphil.com/our_location.html
    email: [email protected]

  • Continous increasing using a event case

    Hello,
    I'm making a game space invaders in labview, but i've a problem with it. I have make my shooter already, I can move(step by step) and shoot with it ...
    But my problem is,  I wan't to move continously. When I press the right key, it should keep on going ... now it stops after one step ...
    How can I do this ??

    Use the "Key Repeat" event to detect this.  Or, run a seperate loop that watches key buttons and sends the values over User Events.  Then, register the User Events and hook up the refnum to the dynamic terminal on the event case.  From there, you can watch those values.
    7J1L1M

  • HTMLB Button

    Hello,
    Iam trying to understand the htmlb Button.
    can anybody explain what is wrong with the following code:
    <b>button.java</b>
    package com.sap;
    import com.sapportals.htmlb.Button;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class button extends PageProcessorComponent {
      public DynPage getPage(){
        return new buttonDynPage();
      public static class buttonDynPage extends JSPDynPage{
      IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
      private button_bean myBean = null;
        public void doInitialization(){
          IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
          Object o = componentSession.getValue("myBean");
          if(o==null || !(o instanceof button_bean)){
            myBean = new button_bean();
            componentSession.putValue("myBean",myBean);
          } else {
              myBean = (button_bean) o;
        public void doProcessAfterInput() throws PageException {
              IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
              myBean = (button_bean) componentSession.getValue("myBean");         
        public void doProcessBeforeOutput() throws PageException {
             this.setJspName("button_display.jsp");
           public void ProcessConfirm(Event event) throws PageException{
                Button b = (Button) this.getComponentByName("OrderConfirm");
                myBean.setMessage("Clicked");
                b.setText(myBean.getMessage());
    <b>button_display.jsp</b>
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.sap.button_bean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
    <hbj:button
            id="OrderConfirm"
            text="Confirm"
            width="125px"
            tooltip="Click here to confirm order"
            onClick="ProcessConfirm"
            disabled="false"
            design="STANDARD"
    />
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <b>button_bean.java</b>
    package com.sap;
    import java.io.Serializable;
    public class button_bean implements Serializable {
    private String message;
    public String getMessage(){
         return message;
    public void setMessage(String string){
         this.message = string;
    <b>
    Iam getting the button displayed perfectly but clicking on it won't do any good.
    Appreciate your time</b>
    Message was edited by: Robert Drater

    Hi Robert,
    Change your button_display.jsp as follows:
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.cop.button_bean" />
    <hbj:content id="myContext" >
    <hbj:page title="PageTitle">
    <hbj:form id="myFormId" >
    <b><hbj:button
    id="OrderConfirm"
    width="125px"
    tooltip="Click here to confirm order"
    onClick="ProcessConfirm"
    disabled="false"
    design="STANDARD"
    >
    <% OrderConfirm.setText(myBean.getMessage()); %>
    </hbj:button></b>
    </hbj:form>
    </hbj:page>
    </hbj:content>
    This should solve your problem.
    Ranjith
    Also change your button.java as follows:
    <b>public void ProcessConfirm(Event event) throws PageException{
    Button b = (Button) this.getComponentByName("OrderConfirm");
    myBean.setMessage("Clicked");
    IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
    componentSession.putValue("myBean",myBean);
    //b.setText(myBean.getMessage());
    }</b>
    Message was edited by: Ranjith Vijayan
    Message was edited by: Ranjith Vijayan

  • Unable to capture button event in pageLayout Controller

    Hi Guys,
    I have the following layout
    pageLayout
    pageLayoutCO (controller)
    ----header (Region)
    ----------messageComponentLayout (Region)
    -----------------MessageLovInpurt
    -----------------MessageChoice(Item)
    -----------------MessageTextInput
    -----------------MessageLayout
    ----------HideShow (Region)
    -----------------MessageLovInpurt(Item)
    -----------------MessageChoice(Item)
    -----------------MessageTextInput(Item)
    -----------MessageComponentLayout (Region)
    -----------------MessageLayout
    ------------------------SubmitButton(ID:SearchBtn)
    ------------------------SubmitButton(ID:ClearBtn, fires partial action named clear)
    -----------header(Region)
    I am not able to capture the event fired by the button ClearBtn in the controller of the pagelayout.....
    The two methods I used as follows aren't worked:
    if ("clear".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    if (pageContext.getParameter("ClearBtn") != null) {
    what should i do in order to capture the button event in the pageLayout Controller
    Thanks in advance
    Mandy
    Edited by: user8898100 on 2011-8-2 上午7:49

    Mandy,
    Its really strange that its not able to caputure the event in CO.
    Below is the way in which we handle to Submit action at CO level.
    /Check whether ClearBtn is same in case too.
    if(pageContext.getParameter("ClearBtn")!=null){
    System.out.println("Inside the Clear Btn Action");
    Regards,
    Gyan

Maybe you are looking for