Creation and Visiblity of Buttons in a View

Hi,
I wish to create buttons in a view without the help of HTML coding.
I implemented the interface IF_BSP_WD_TOOLBAR_CALLBACK and using the methods of it I was able to display the buttons of the view.
But when I tried inserting the above view in a View Set or Over View page I am unable to see the buttons.
Is there any chance of displaying the buttons of the view while embeded in a over view page or over view set without the help of HTML Coding.
Hope I am clear on my question
Regards
Edited by: SAP LEARNER on Oct 13, 2011 11:30 AM

Armin Reichert: see TJA311 WebDynpro Part 1 Unit 10, example optional 1 solution  6-3,6-4 -))
my new conclusion is that any UI elements should only be access in wdDoModifyView method
the javadoc discourage from using instance fields not static fields but recommends not to use UIs outside of the method:
Hook method called to modify a view just before rendering.
This method conceptually belongs to the view itself, not to the
controller (cf. MVC pattern).
It is made static to discourage a way of programming that
routinely stores references to UI elements in instance fields
for access by the view controller's event handlers, and so on.
The Web Dynpro programming model recommends that UI elements can
only be accessed by code executed within the call to this hook method.

Similar Messages

  • Dynamic View Object Creation and Scope Question

    I'm trying to come up with a way to load up an SQL statement into a view object, execute it, process the results, then keep looping, populating the view object with a new statement, etc. I also need to handle any bad SQL statement and just keep going. I'm running into a problem that is split between the way java scopes objects and the available methods of a view object. Here's some psuedo code:
    while (more queries)
    ViewObject myView = am.createViewObjectFromQueryStmt("myView",query); //fails if previous query was bad
    myView.executeQuery();
    Row myRow = myView.first();
    int rc = myView.getRowCount();
    int x = 1;
    myView.first();
    outStr = "";
    int cc = 0;
    while (x <= rc) //get query output
    Object[] result = myRow.getAttributeValues();
    while (cc < result.length)
    outStr = outStr+result[cc].toString();
    cc = cc+1;
    x = x+1;
    myView.remove();
    catch (Exception sql)
    sql.printStackTrace(); myView.remove(); //won't compile, out of scope
    finally
    myView.remove(); //won't compile, out of scope
    //do something with query output
    Basically, if the queries are all perfect, everything works fine, but if a query fails, I can't execute a myView.remove in an exception handler. Nor can I clean it up in a finally block. The only other way I can think of to handle this would be to re-use the same view object and just change the SQL being passed to it, but there's no methods to set the SQL directly on the view object, only at creation time as a method call from the application module.
    Can anyone offer any suggestions as to how to deal with this?

    I figured this out. You can pass a null name to the createViewObjectFromQueryStmt method, which apparently creates a unqiue name for you. I got around my variable scoping issue by re-thinking my loop logic.

  • HT5361 When inserting pictures in a new mail message using the " photo browser" button I can view and select photos but the " choose "  button is gone. What have I done wrong?

    When inserting pictures in a new mail message using the " photo browser" button I can view and select photos but the " choose "  button is gone. What have I done wrong?

    Hi Liz,
    Sorry to hear you are having a similar problem.  Last night I went to the tool bar at the top of iphoto, clicked on "File",  then clicked "Browse Backups" in the drop down menu.    I have an external hard drive that is set up to Time Machine.   The Browse Backups  opened the iphoto pages in the Time Machine.  I selected a date one day ahead of the day I performed the now infamous update, and it showed my iphoto library as it had existed that day.   I then clicked  "Restore Library" at the bottom right corner of the Time Machine screen.   Roughly 2 hours later my iphoto was back to normal.   When I opened iphoto there was a message saying I need to upgrade my program to be compatible with the new version of iphoto(version 9.2.1).  I clicked "Upgrade" and within seconds it had done whatever upgrading it needed to do. 
    The only glitch in the restoration was that it restored the library as it appeared last week, so I no longer had photos I had imported this past weekend.   I simply went back to the Browse Backups in the drop down menu,  when Time Machine opened I selected the page showing my pictures from this weekend and again said to Restore Library.   Roughly 45 minutes later the library was restored including the most recent photos.  
    I am now a happy camper. 
    I don't know if any of this will be of help to you because your email says you are having trouble with photos imported after the upgrade was performed.   Have you had any pop up notices when you first open iphoto,  that tell you you need an upgrade to be compatible with the new iphoto?     If so have you clicked "upgrade"? 
    Good luck Liz,  if you have Time Machine running as a back up to your library, maybe you wil be able to get help there, by following my instructions above.   Otherwise,   good luck with your investigations.   I'd be interested in hearing how you make out.
    Karen

  • Infopath2013 button in secondary view not visible on form in SharePoint online

    We have a SharePoint list that has gotten its Form with Infopath.
    The infopathform has 2 views:
    Userview and Fullview.
    The Userview has some fields and a submit button and is activated when adding a new item in the list.
    The Fullview is active when opening a list item. The open form will not show the additional button that resides in the Fullview.
    Any ideas how to get the button to show?
    brgs
    Bjørn

    Hi,
    Could you please explain about "additional button"? Do you mean other list fields or "Save"/"Cancel" button?
    If you mean list fields, you could manually drag them to this view from Fields.
    If you mean "Save"/"Cancel" button, by default, there are some ribbons under Edit Tab as below:
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • I am trying to delete duplicate content in my iTunes library. I have stopped the download and I can see them on VIEW Displaying Duplicates, but cannot delete them with the Delete button. Can anyone assist?

    I am trying to delete duplicate content in my iTunes library. I have stopped the download and I can see them on VIEW>Displaying Duplicates, but cannot delete them with the Delete button. Can anyone assist?

    If you've paused the download (they are partially greyed out on the duplicates screen ?) then you will need to delete them from download window, you can't (as far as I know) delete partially downloaded items from that screen. When you have items downloading, or downloads that are paused, you should have a downward pointing arrow at the top right of the iTunes screen
    If you click that arrow you should get a popup window with the items that are downloading/paused - and you should be able to select and delete them (or resume their download) from there.

  • Data View and Data Source buttons Greyed out

    I have Site Admin permissions on an On Prem SharePoint 2013 site.
    In SharePoint Designer 2013 the Data View and Data Source buttons are greyed out.
    Can anyone shed some light as to why this is occurring?

    Hi grantzre,
    Could you provide a screenshot about the location you want to insert the Data View web part and Data Source?
    I think you may put the mouse cursor in the incorrect place to add the data view web part, please try putting the cursor before the tag </ZoneTemplate> and see if "Data View" button is enabled, then you can insert an empty
    dataview web part and then insert the data source in tag <DataSources> by clicking ribbon button "Data Source" (also click the ribbon button "Parse HTML" of the page if needed).
    Thanks
    Daniel Yang
    TechNet Community Support

  • BC SETS creation and usage for sap mm  point of view

    Hi All,
    Need Information About  BC SETS  creation and usage from sap mm point of view.
    Thanks in advance for sap mm forum guys.
    Regards.
    Parameshwar.

    Hi,
    Customizing settings can be collected by processes into Business Configuration Sets (BC Sets). BC Sets make Customizing more transparent by documenting and analyzing the Customizing settings. They can also be used for a group rollout, where the customizing settings are bundled by the group headquarters and passed on in a structured way to its subsidiaries.
    BC Sets are provided by SAP for selected industry sectors, and customers can also create their own.
    When a BC Set is created, values and combinations of values are copied from the original Customizing tables into the BC Set and can be copied into in the tables, views and view clusters in the customer system. The BC Sets are always transported into the customer system in which Customizing is performed.
    Advantages of using BC Sets:
    1.     Efficient group rollout.
    2.     Industry sector systems are easier to create and maintain.
    3.     Customizing can be performed at a business level.
    4.     Change Management is quicker and safer.
    5.     Upgrade is simpler.
    To create BC sets follow the below step:
    Choose Tools ® Customizing ® Business Configuration Sets® Maintenance in the SAP
    menu, or enter the transaction code SCPR3 in the command field.
    Choose Bus.Conf.Set ® Create.

  • Remove group tree and parameter button from crystal view in iView

    Hi
    I have a crystal report which renders in an iView on the SAP portal. When a user views the report, in the viewer I see the group tree button and the parameter button. Is there a way to disable the group tree button and parameter button ?
    Thanks,
    Daniel

    Hi Udi,
    I have a page within it I have a Composite view (SearchPage) and an iview (MyIview1). I have passed a URL to the iview (MyIview1).
    In searchpage i have a variable @Address which is selected from a dropdown box. On click of a button i need to pass the variable @Address to the iview (MyIview1).  which should be appended to the URL that i pass to MyIview1.
    If i use URL action it opens as popup, and shows the desired result. But, I want it to open within the iview (myiview1).
    Please let me know how else do i pass the variable from composite view to the url iview within the same page as ="www.abcd.com?address="&@Address  does not open the url in the iview.
    Thanks and Regards... Vibha

  • HT5361 how do I keep the classic look ? I go to mail preferences and click the button but when I launch mail again it is still in the list view which I hate. Anyone know ?

    how do I keep the classic look ? I go to mail preferences and click the button but when I launch mail again it is still in the list view which I hate. Anyone know ?

    The first thing to try if a setting does not "keep" is a PRAM reset.
    http://support.apple.com/kb/ht1379
    Change the setting to what you want, then PRAM reset on restart:
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Program associated with the creation of a virtual instrument of Lab View. Please help me

    I have a question with program associated with the creation of a virtual instrument of Lab View. 1.Create of virtual instrument based on the NI 9401 module fitted to the chassis NI Compaq DAQ (Ni-cDAQ-9172). Creating a virtual tool needed to implement the following counting impulses in impulse series, visualization of data through a digital indicator, comparing the number of impusite with pre-set value, that value can be assigned by the user. Indicator light when reaching in reaching the set number of pulses, the opportunity to reset the meter of a button on the front panel. Switch to digital output in reaching the set number. I hope someone can help me.
    Solved!
    Go to Solution.

    What is your question? You've described what the program is supposed to do, but it's not clear what you're asking about. Do you need help getting started? If so, have you gone through the LabVIEW tutorials? You and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free. Have you looked through the many examples that ship with LabVIEW for data acquisition?

  • Dynamic Event Creation and Handling the events

    Hi All
    I am using WAS 6.4.
    I have two components say Component A and Component B in which Component A is a reusable component and is used by other components say for e.g the Component B.
    The following is the requirement.
    Component A should create buttons for other components dynamically.
    As an example, Component B specifies to Component A the buttons required say button B1 and button B2.
    Component B also contains methods M1 and M2 for the buttons created by the component A.
    Now I would like to associate these buttons created by component A with the methods created in Component B
    The number of buttons that are to be created may vary from component to component.
    If any one as any suggestion or solution, help me out.
    Thanks
    Regards
    NagaKishore

    Hi NagaKishore,
         I'm not exactly sure why you want to do this, but it is pretty easy if I switch it up a bit.  (Maybe you are trying to create a navigation page or something?) 
         Instead of your component B using component A, if you define a Web Dynpro interface in component A, then implement this interface in component B (or all component Bs), achieving your goal would not be too difficult.  It could define a generic method (or event) with a "button key" as an argument that would tell component B which button was pressed and allow it to behave as desired.  The Web Dynpro interface defined in A could also have an interface context that would allow the the button text to be passed along with (for the sake of simplicity) a "button key" that component that should be triggered when the button is pressed.  (Note this could be a varying size list as required.)
         The component B(s) need not be known until run-time.  They can be created using something like:
    wdThis.wdGet<Used Compontne Name>ComponentUsage().createComponent(<Component Name>,<Object Name (if in a different component)>)
         Once the component is created, the context can be accessed giving the list of buttons to create and the values.  The buttons can be created in the wdModifyView during the first pass of the creation of the view displaying the buttons (after the dynamic creation of the used components which can occur in the wdDoInit of the component controller).
         If the user presses a chosen button on component A, then the generic method (most likely an event) of component Bs interface is called and passed the "button key", component B then takes over.  Note this would also work if component B had a visualization component that must be displayed through an interface view that is defined on the web dynpro component interface that is implemented by B.
         Hope this helps or at least triggers discussion that will answer your question,
           --Greg

  • Jsp and jspx and scriplets - Hiding buttons based on J2EE security roles

    Hello:
    I have security a scoped managed bean with methods is Technician(), isUser() etc. In the jsp world, it was very easy to inspect these methods in the jsp via scriplets and show/hide buttons/links etc. I am just curious. Or, is rendering via EL expression the way to go?
    (1) In the jspx world (SRList.jspx in my case), is there an easy way to inspect these managed bean methods and use scriplets to access them and show/hide buttons.
    In the jsp world, I would have written something like
    if (SecurityInfo.isTechnician()
    { %>
    <Button>
    <% } %>
    There would be an import statement to have access to SecurityInfo class in jsp world. I know something is out there in the ADFBC/jspx world. Please advice? If you know of any urls, please let me know.
    (2) Is there a way to grant read/write access to individual pages in my app? I can hide/view buttons based on roles but can't grant update/view access to individual fields on my pages. I know I have to wait for JDEV 11 release to grant permissions via pagedef/iterator as is done in file based security.. Any other solution till then?
    Thanks

    hi useradfbc
    about (1), you could try something like this
    <af:commandButton text="my button for managers" rendered="#{userInfo.manager}"/>(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Problem with combo boxes and the reset button in certain situations

    Hi Everyone,
    i have a problem to make the reset-button function properly in an what-if analysis dashboard.
    The dashboard uses two combo boxes that are not visible at the same time. In my application the second combo box only appears when a dedicated menu (label based menu button) has been activated.
    So i have combo box 1 when menu A is active an dand combo box 2 when menu 2 is active.
    After starting the dashboard initial values are fine. If you then directly change to menu 2 (seeing combo box 2 with
    the correct default value) and press the reset button, the dashboard returns to the initial view, showing
    the menu 1 with the correct default value. If you now switch back  to menu 2, you will see, that the combo box 2
    is empty (i.e. nothing selected).
    I also tracked the destination cells for the combo box value results as well as the source cells for the "selected item" and the
    destination cells for the "Insert Selected Item". All this values seem to be correct. Therefore i assume that
    this is an issue of event handling. Maybe the combo box 2 does not refresh its selected value because it is already
    invisible when the values are restored.
    This case can easily be simulated by placing two combo boxes and a push button (that changes the visibility of
    the combo boxes) and the reset button on the canvas.
    Maybe someone can help. I am able to provide a test xlf, if neccessary.
    Thanks,
    Oliver
    P.S. I am using Xcelsius SP4 (Version 5.4.0.0)

    Hello Debjit_Singha_86,
    thank you for your support. At the moment i have the following setting:
    label based menu
    - General: Insertion Type "value" from a list of ID's for the menu-items to a dedicated cell (current menu ID, say tab1!$A$1)
    - Behavior: Selected item (position) fixted to item 1
    hidden combo box
    - General: Insertion Type "position" to a dedicated cell with the current choice (say tab1!$B$1)
    - Behavior: Selected item (position) to the same cell (tab1!$B$1)
    Can you give me a hint on how to connect the two components according to your solution, so that the label based menu sets the default for the hidden combox box only in case, that the reset button is pressed?
    Thanks,
    Oliver

  • Visibility for button

    Hi there,
    I've created two value nodes and value attributes for visibility in my view.
    node: VisNode
             attr: VisAccSearch: type: com.sap.ide.webdynpro.uielementdefinitions.Visibility
                    VisBDX: same type
    Then I bound these attributes to the visibility property of the respective buttons.
    Finally I coded this in the event handler of inbound plug 'onPlugipFindConBdx' so when that inbound plug is used, the visibility of button BDX will be set to invisible & button AccSearch will be set to visible:
    wdContext.currentVisNodeElement().setVisBDX(WDVisibility.NONE);
    wdContext.currentVisNodeElement().setVisAccSearch(WDVisibility.VISIBLE);
    Though when I execute my application I get the following error trace:
    java.lang.NullPointerException
         at com.bdx.sap.bb.comp.bupa.ConResults.onPlugipFindConBdx(ConResults.java:193)
         at com.bdx.sap.bb.comp.bupa.wdp.InternalConResults.wdInvokeEventHandler(InternalConResults.java:199)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    What have I done wrong?
    Thanks already!
    Allan

    Hi,
    I think the cardinality of the node VisNode is 0..n try to make it 1..1.
    Thats the reason why when you access the plug it dumps with null pointer
    wdContext.currentVisNodeElement().-> code will result in null as thier is no element.
    if you change the cardinality to 1..1 atleast one element will exist.
    Regards
    Ayyapparaj

  • Having a problem with NavigatorContent and Visibility

    I have been working on this for more than a day, so it's time for some help...  I'm not a Flex/Flashbuilder expert, so any help is appreciated...
    I've got a NavigatorContent object that I want to set the visibility on based on the content of the object.  Bascially, if it is empty, I don't want to show it.  However, no matter what I do, I can't actually get the visibility to change.  It's ALWAYS visible.  I've checked the .visibile property and it IS set correctly, but I can still see the tab.  So, if I get the childNavReports.visible, it will say "false" but still display...
    Here's the code where it's built:
    var childNavReports:NavigatorContent = new NavigatorContent();
    childNavReports.name="assessment_reports"
    childNavReports.percentWidth = 100;
    childNavReports.percentHeight = 100;
    childNavReports.minWidth = 780;
    childNavReports.minHeight = 150;
    childNavReports.maxHeight = 170;
    childNavReports.visible=false;
    loadReportTree(childNavReports,graphic,layer); //this is where it's populated
    childNavReports.visible=false;
    childNavReports.enabled=false;
    childNavReports.includeInLayout=false;
    tabNavAssessment.addElement(childNavReports);
    I've even tried the following:
    childNavReports.setStyle("visibility", "hidden;");
    tabNavAssessment.getChildByName("assessment_reports").visible=false;
    tabNavAssessment.getTabAt(tabNavAssessment.getItemIndex(tabNavAssessment.getChildByName(" assessment_reports"))).visible=false;
    tabNavAssessment.getTabAt(tabNavAssessment.getItemIndex(tabNavAssessment.getChildByName(" assessment_reports"))).enabled=false;
    tabNavAssessment.getTabAt(tabNavAssessment.getItemIndex(tabNavAssessment.getChildByName(" assessment_reports"))).includeInLayout=false;
    Global.getLogger(this).info("childNavReports.visible added to tabs"+ childNavReports.visible.toString());
    tabNavAssessment.getChildByName("assessment_reports")
    tabNavAssessment.getTabAt(2).visible=false;  // 2 is the correct index
    tabNavAssessment.getTabAt(2).includeInLayout=false;
    tabNavAssessment.getTabAt(2).enabled=false;
    Any ideas?  Or work arounds?

    What model iMac do you have?
    What version of Mac OS is it running? If you don't know, try to give approximations on when it was set up and whether it was ever updated so we can take our best guess.
    How are you trying to boot from the install disc? Your description of 3 icons with x in a column' leads me to believe that you aren't booting from the install disc, but rather you are inserting the disc after booting from the OS that is installed on the hard drive. If that is what is happening you'll see something like this, although it will vary depending on the actual version of the Install Disc that you have and how you've chosen to view the files (icon, list, column, etc).
    What happens if you restart the system with the Install Disc inserted, then quickly hold down the 'c' key so that the system attempts to boot from the Install Disc. Do you still experience the same issue?

Maybe you are looking for