DB statements in button actions in view

can i write the code of select, update etc statements in BUTTON Ui element in a View.
is it mandatory to write the code using Classbuilder(SE24)(OO ABAP) in WD4A.
just a simple question, i am new to WDABAP.
clarify me.
thanks n reagrds
rk

Hi Ramakrishna,
WD is based on MVC architecture... It tells seperation of Presentation and Bussiness Logic. If you follow this you need to seperate business logic.
That depends on project, and Client, You can write Select statements in methods also, but Recomendable is Follow MVC.
Check this about MVC..
http://wiki.sdn.sap.com/wiki/display/WDABAP/ArchitectureofWebdynproforABAP
MVC Web Dynpro  for ABAP
Cheers,
Kris.
Edited by: kissnas on Apr 19, 2011 6:52 AM

Similar Messages

  • How can i test the boolean state of button action?

    Hello,
    in as2.0, how can i test the boolean value if a button was
    pressed or not?
    I have a simple function im trying to work with like this...
    button_btn.onRelease = function (success:Boolean) {
    if (success) {
    trace("we pressed the button - value is true");
    else {
    trace("value is false");
    working with booleans in this way is new to me - any pointers
    will do - thanks!

    Well, I'm not really that familiar with using video in flash,
    but from what I understand of what you are going for, these are my
    suggestions:
    If the code within your button has scope of the variable you
    are testing for:
    _global.myInfoObject;
    button_btn.onRelease = function(){
    if( myInfoObject.code == (value your are testing for) ) {
    trace("value is correct);
    } else {
    trace ("value incorrect");
    if you aren't in scope you can always maybe forward the
    onRelease function to some handler that is in scope:
    var myInfoObject;
    var release = function(){
    //to do code here;
    button_btn.onRelease = release;
    I hope some of these ideas help a little.
    You can always send your .fla to my email at
    [email protected] and I'll take a look at it.

  • Set State of button in NSTabview

    Hi,
    i am trying to set the state "enabled or not" of a NSbutton which is located on a Tab view item on a window (NSwindow)
    So i do have:
    * "myWindow" = NSWindow
    * "tabView" = NSTabview
    * "clean" = NsTabView Item or Tab not sure howto call it
    * "cleanUserCache" = NSButton
    My code is executed in the *on opened* section of the AppleScript
    I have tried several combinations i.e:
    set testerlein to state of button "cleanUserCache" of view of tab view item "clean" of tab view "tabView"
    display dialog testerlein
    idea: read the state and save it as first test. does not work.
    set state of button "cleanUserCache" of view of tab view item "clean" of tab view "tabView" to 1
    does not work
    set enable of button "cleanUserCache" of view of tab view item "clean" of tab view "tabView" to true
    does not work
    the examples above are executed in a *tell window "myWindow" ... end tell* section
    changing checkboxes on a simple window worked like that for me:
    tell window "myWindow"
    set state of button "bla" to 0
    end tell
    But till now i haven't found the correct code for the new case.
    any idea how to set the state in AppleScript ?
    Message was edited by: fidel-castro

    self-answering is better then nothing.
    found the solution 3 minutes after posting this thread
    set enabled of button "cleanUserCache" of view of tab view item "clean" of tab view "tabView" to 0

  • How to view an Image in ABAP Webdynpro on button action

    Hi Experts,
    I want to view an image on a button action without creating a new view or window.
    I just need to display the image.
    Thanks,
    R Sahu

    Hi Rabi,
    Add Context Attribute "SOURCE_IMG" with type String.
    Add Image UI "img_id" in layout and bind its source with this context attribute.
    on any method where you want to change/show image dynamically, put this code :
    here url can be path to image on local or any url-path for web image.
    call method wd_context->set_attribute
           EXPORTING
             name = 'SOURCE_IMG'
             value          = url .
    I hope this is what you are looking for.
    Thank you
    Meet Vajaria

  • ID 5.5 Interact. PDF, cannot remove white background for Multi-States and buttons.

    Hi
    I am working on an Interactive PDF Portfolio document. The problem I have is with Multi-State object feature with several buttons going to states that need to be exported as a SWF and imported back into InDesign 5.5. See, the background of my entire doc. is GREY, but when I import the SWF (as directed in Lynda.com videos correctly) and export the entire doc as Interactive PDF and view it in Adobe Acrobat Pro (version 10.1.1) is when all the trouble starts.
    When I try to get rid of the WHITE background around the Multi-State objects and the buttons for them (using Select Object Tool and then control+click on it to change the Properties to Transparent Background Appearance) it does not change, even when I go forward and backward to the page.
    Does the option of removing white background and making it transparent work only for Animation, but not Multi-State feature with buttons?
    Can anyone suggest any other tecnique to create a nice slide show that works in Interactive PDF in ID CS5.5? Please..
    Sincerely,
    in need of help,
    Eve

    I have 8 Multi-State objects in one stack on the left and the 8 buttons for each state in the stack on the right. The background of my document is dark grey. There is space inbetween Multi-State objects and the buttons that show the grey background. But after exporting as SWF the Multi-States together with the buttons and placing the SWF back in the PDF file, the space inbetween Multi-States and buttons that is supposed to show the grey background appears white. The problem is that I cannot even change this white background to transparent in Acrobat Pro, as well. I used to do that to animations and it worked, but not in this case.

  • InDesign Button Action for PDF – Open File (in new window)

    I am using the 'Open File' action on buttons in a document i am making which will eventually be a PDF, but am wanting to specify the button action to open the file (another PDF) in a new window.
    I have found that I can achieve this and add button actions with this specific behavior in Acrobat, but it seems to be missing in indesign's abilities as far as I can see. Is there a way to do this in indesign so that i do not have to tinker in acrobat after I have made my PDF. As if I have changes to the PDF, all buttons then have to be totally re-done each time, and i will have possibly 900 buttons!!
    Thanks.
    (Using indesign CS4)

    Jeff,
    You are correct. I want to have a DVD with multiple PDFs. The main one almost acting as a table of contents for the rest.
    Problem = the 'main one' is 62 pages long, many hundred buttons and every page has at least a few of these links needed.
    Which means, if you are correct (and I believe you are, hope you aren't) that I need to custom code these buttons in Acrobat.
    The method is easy, but x300 = painful. And then the kicker... Boss says, 'Change slide 30' ... which means: Back to InDesign, Export to PDF, Recode ALL BUTTONS.
    *Note, there are some 'interactive' buttons with roll over states. So I don't think replacing the pages would work.

  • Button Actions are not working -invoking task flow from other project regio

    Hi
    I have a project using a mani.jspx file having a regions and the region is updated with different views based on a router condition in my bounded task flow. Everything working fine with in the project. I have a seperate project in my application having an index.jspx and region in it. I created the ADF lib jar file of the first project and imported to this project. I could invoke the task flow in the first project to the region in the index.jspx file in the seconed project.But none of the action managed bean method attached to the buttons in this view are working.The methods are not getting called on clicking on button and no error in the backend console of Integrated weblogic server.Any body can help what could be the issue ?
    Thanks
    Suneesh

    The issue that is happening when I refreshed the region with task flow from the project I imported.If I load the taskflow from the imported project on first time rendering all my managed bean actions are executing but if I load a different flow initially and change the taskflow Id imported from other project none of the managed actions are working.
    Thanks
    Suneesh

  • Button actions and Paste into

    Hi,
    working with the new InDesign CC, I'm somewhat disappointed that the paste into bug, where the button actions are going to be lost if you paste a group of objects/frames into another frame (ex.: go to state action), still exists. The same if you take a group out of a frame with simple cut feature. I know this is a more InDesign related bug and was already reported several times. But as this feature is mainly used for scrollable content and is part of  a very immature scrollable content creation workflow, I've decided to post it here in this forum.
    Why not making it as other DPS systems. The content of the scrollable frame is placed in a separate document (with links, actions, videos, ...) and you have to import this separate document as link into a frame. This would make updating the content a lot more easy as always cut, make changes, paste into again, recreate actions, ...
    Thanks and kind regards,
    Yves

    I agree it's annoying but it's not a DPS issueŠit's an InDesign issue. I've
    reported and I suggest everyone else do the same:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Bob

  • Button actions not called.

    I have a fairly complicated edt page (lots of data entry components and 3 tables) with a save and a reset button. Somewhere along the line the button actions stopped being called when I click a button in the browser. The buttons' Events-Action properties are set properly. I have a breakpoint set on the first line of the action method, but in debug mode I never get to the breakpoint.
    I even added a new button with its own action but it does not get called either.
    No virtual forms. I've run Clean and Build on the project. Stopped and started the server, closed and reopened the IDE. Nothing changes.
    I created a new test page with a single button. It works fine.
    Any other ideas?

    Do you have a message group component on the page?
    If the page was working but now has stopped, it could be that some component is not passing conversion or validation. If you don't have a message associated with the component or a message group component on your page, and some component is generating a runtime error, you won't know about it.
    Also, if you right-click the server node and choose View Server Log, you can see if the server is emitting any runtime error messages.

  • Where is Button Action in Captivate 8?

    I am working on a responsive project in Captivate 8.
    In the Properties panel of the slides you can select Style, Action and Options.  When you selct Action, you find 'on Enter' and 'on Exit'.
    On some of my slides there are buttons.  Properties for Buttons are Properties, Timing and Position.  None of these show Action.
    The Properties section contains Style Name, Fill, Stroke, Character and  Shadow and Reflection, but according to the manual, this section should also contain an Action section.  It doesn't.
    Action is not to be found under Timing and Position either.
    Obviously I am missing something.  Where can I set actions for a button in a responsive project? 

    Hi Moked,
    Objects properties are listed under Properties panel only.
    Probably you have not selected the button object to view its properties.(or have not clicked on the "Action" tab listed under the Properties panel)
    Button properties are listed as 3 tabs(Style, Action and Option) under Properties panel at Right hand side of the canvas.
    Style Tab lists all the formating options for the text in botton. and"Action" tab will list the On success action options.
    Select button and click on the Action tab under Properties panel to view the action option for any object.
    Thanks
    devraj

  • How to clear a drop down by key on a button action

    Hi All
            I am new to  the webdynpro i have to clear  the dropdown by key, i had tired giving the
                    wdContext.nodeA().invalidate();
                 on a button action which will navigate to next view after click but it doesn't effect when i come back to the first view can any one help me in doing this.
    Regards
    Ashwin

    Hi Ashwin,
    To display the values in DropDownbyKey, yuo need to populate the value in the node before the view is rendered to the user. So must be populating the node in the wddoinit method the view controller or the component controller.
    Now just for your knowlegde, DropDownbyKey just holds the one value which is selected by the user, and all other values are automatically invalidated by the framework. So invalidate methos is a wrong choice in this case. You can probably use the function module SET_STATIC_ATTRIBUTES_NULL for a element. For further info you can check IF_WD_CONTEXT_ELEMENT in se24 transaction.
    Hope this help.
    Cheers !
    Ashish

  • Can't update GridPane from Button Action

    I'm making a simple gui for Conway's Game of Life with a grid (GridPane) and a simple toolbar with Start/Stop buttons. My start button action looks like this:
    startButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                grid.change();
        });So when i click it the grid updates ones as i expect. But i when i add something like a Service/Platform.runLater/Runnable inside it evaluates generations, grid model, but refuses to update the grid view. My Service code looks like this:
    private Service task = new Service(){
        @Override
        protected Task createTask() {
            System.out.println("Task created");
            return new Task<Void>() {
                @Override
                protected Void call() throws Exception {
                    for (int i = 0; i < 3; i++) {
                        System.out.println("calling");
                        Platform.runLater(new Runnable(){
                            @Override
                            public void run() {
                                System.out.println("running");
                               grid.changeGeneration();
                                try {
                                    Thread.sleep(1500L);
                                } catch (InterruptedException e) {
                                    e.printStackTrace(); 
                    return null;
    };It prints Task created calling calling calling running running running to the console, but doesn't update the GridPane after each running, only after everything is done it updates it (in this case after the third "running"). Where am i making a mistake and how to fix this. I don't want to use Swing =)
    Same question on [http://stackoverflow.com/questions/13820734/cant-update-gridpane]
    Edited by: Riddle on 11.12.2012 7:21

    public void changeGeneration() {
            Cell[][] newGen = new Cell[rows][cols];
            Cell cell;
            for (int i = 0; i < newGen.length; i++) {
                for (int j = 0; j < newGen.length; j++) {
    cell = new Cell(destiny(cells, i, j));
    newGen[i][j] = cell;
    add(cell, i, j);
    curGen = newGen;
    My grid class is a subclass of GridPane
    So when i click button it's working, but not from other Runnable
    Edited by: Riddle on 11.12.2012 9:11                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help in button action to open a file that is attached to main pdf doc

    Hello,
    I have created a button and used an icon saying "click here...." the action I want to attach to it is to have on mouse down for it to open the file which is attached to the document.
    Is this possible?  If so how do I direct the acton of "open file" to be the one attached in document?  can't figure out path...
    there was a suggestion of how to make a javascript for the button action to open the attachment panel...
    this is what was written... and then below that is my question on what was written...
    thomp wrote:Try thisif(app.viewerVersion < 8)
    app.execMenuItem(....);
    else
    app.execMenuItem(....);
    what would go in the '(...)' above?
    I am very poor at javascript, but I am guessing that there is something I would need to fill in there? Am I correct?
    thank you...
    I, too, am trying to get my button action to open the attached document in my pdf form - NOT the navigation panel... I already have it doing that...
    thanks again for any feedback!

    Erin,
    After you set your link... go back into the edit mode, click on your link and go to Actions Tab, click on the "go to page view in another document' under the actions part of that tab (bottom portion of page), then click on Edit... it will open a 'Target Document' window and in the top portion click on 'open in...' drop down box and select 'new window'.... close out and SAVE!
    Hope that helps!

  • Adding Custon button on MAintainance View

    Hi Guys,
      I need to add a custom button on maintainance View. On click of that button i need to grab the selected row and do something. How can i achieve this ?
    Thanks
    Amandeep

    Hi Naimesh,
      I am on ECC 5.0 as well. I have put my module as the last module when the complete screen processing is complete.
          MODULE liste_update_liste.
        ENDCHAIN.
      ENDLOOP.
      MODULE liste_after_loop.
      MODULE pdf.
    I still have that unicode problem.
    Data objects in a Unicode program are not convertible.
    Below is my codeod MODULE PDF.
    MODULE pdf INPUT.
      DATA: l_count TYPE i.
    * Table of the same structure of the TOTAL which can be exported
      DATA: BEGIN OF itab OCCURS 0.
              INCLUDE STRUCTURE ztst_incentive.
              INCLUDE STRUCTURE vimflagtab.
      DATA: END OF itab.
      DATA: wa LIKE LINE OF itab.
      LOOP AT total INTO wa.   "----->>>>>> Short Dump Occurs here
    *    APPEND wa TO itab.
        CLEAR wa.
      ENDLOOP.
    ENDMODULE.                 " PDF  INPUT
    SHORT DUMP
    Error analysis
        The statement
          "MOVE src TO dst"
        requires the operands "dst" and "src" to be comvertible.
        Since this statement occurs in a Unicode program, the special
        convertibility rules for Unicode programs apply. In this case, the
        following rules have been broken:
    Amandeep

  • Button actions sometimes buggy

    we have quite a lot of buttons with 4 or 5 actions that are controlling several MSO most of the time they work, but on some pages they are behaving irratically even tho the pages all follow the same template with the same action.
    For instance we have a button that triggers a MSO that is showing different images of a product, that button also has actions to change all other MSO's on the page to a blank state so they are hidden, for most pages this is working as expected yet on some the button only works the first time you press it, the second time it does nothing - but if you slightly swipe the page then the button action will suddenly work

    Yes I'm using the latest tools.
    The pages where this is an issue are ones where there are buttons inside MSO although they are not the buttons that are causing the problem.
    We have 2 products on each page, each has an 'interactivity bar' beneath containing 10 buttons that display a key feature panel, colour change image, specs panel, video and product features. Which are all MSOs. Each button has action to go to next stage of the relevant MSO and to a blank state on all other MSO (they all appear in the same place on the page so need to be hidden).
    Most pages are working ok but one section is more complex as alongside the colour changes there are alternative angled images and for that to work we have had to put buttons inside the MSO so the button is different on each colour image and each angled image (quite hard to explain!) but basically the products are fridge freezers, so the colour change button cycles between 3 or 4 colour variation and clicking the alternate angle button will cycle through open/ closed / angled image but just for the colour variation that you are currently showing. This is working but is causing the other buttons to misbehave.
    I've sort of got round it by changing all the other buttons on these pages from go to next state (so the same button opens and closes the panel) to just go to a specific state, its the only compromise I could come up with without reworking the whole thing, which is on deadline tomorrow!

Maybe you are looking for