Can I dynamically add string to goMenuItem destination?

In my managedbean, I build the menu with a list of goMenuItem action. Each goMenuItem has a different destination.

When the user clicks on the goMenuItem, I want to be able to add additional information to the destination URL and to open the URL in a new window.

CAN/how can I do this? Any suggestions on the use of different components?

Thank you.

Michelle

With the help of the forum, I am able to solve my problem.

In my java code bean managed, rather than create a GoMenuItem with the URL, I created CommandMenuItem with action and the action listener.

            Class args = new class [] {ActionEvent.class};
            Class args2 [] = new class [] {};
            MethodExpression me =.
                elFactory.createMethodExpression (elContext, "#{viewScope.FinderBean.appendSelectedPKs}", Object.class, args);
            MethodExpressionActionListener menuItemActionListener = new MethodExpressionActionListener (me);
menuItem.addActionListener (menuItemActionListener);
MethodExpression actionExp = elFactory.createMethodExpression (elContext, "#{viewScope.FinderBean.actionMenuClicked}", Object.class, args2);
menuItem.setActionExpression (actionExp);

appendSelectedPKs will add a string to the URL for this CommandMenuItem and call another method to open the URL in a new window.

In this way, I'm kind of implement GoMenuItem with CommandMenuItem.

I think that GoMenuItem should have actionListener, so the user can add an extra string the destination directly.

Tags: Java

Similar Questions

  • Dynamically add custom headers in ListView

    I'm working with a ListView which is based on a api, that I have no control.

    I dynamically add some custom headers subject see the following as to what I am referring to (A, B)

    http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__listview.html

    How can I dynamically add these? For example, I want to add a conflict between the first element of the list and the second

    Section A

    Header

    Item B

    Point C

    Hi Philippe,.

    To do this, you must use a custom list item component.

    Heres how I could do that

     


    Moreover, in the custom "Header" just create a structure as follows:

    IF/ELSE ON A FLAG

    if(someflag == "header"){
         //use header style
    }else{
       // show normal list style
    }
    

    My Code

    ListView{
    dataModel: ArrayDataModel{
       id: myDataModel
    }
    
    listItemComponents: ListItemComponent
    {
        Container{
           layout: StackLayout{
              orientation: LayoutOrientation.TopToBottom
           }
           Label{
              text: ListItemData // complete data string
           }
           Label{
              text: ListItemData.split("~")[0]
            }
            Label{
              text: ListItemData.split("~")[1]
            }
           Label{
              text: ListItemData.split("~")[2]
            }
        }//end Container
    }//end ListItemComponent
    
    onCreationCompleted: {
       //The data inside append is one item.
    
       //let's append a bunch of data
       for(var i=0;i<30;i++){
           //append 30 list items
           myDataModel.append("Header~Some data whatever~Status");
       }
    }
    }
    
    • In my example I am adding data to the model.

    ListItemData - the full string

    ListItemData.split("~") [0] - first part etc.

    • I shared parts of the data with a single symbol. In my case the «~»
    • To get the data I want to that I just throw a ListItemData.split("~"). It breaks the string into 3 parts.
    • I will be able to access somewhere I want using the notation ListItemData.split("~") [index]
    • You can include paths to images, or whatever the text you

    AS IF THIS HELPED YOU!

  • How we can dynamically add or remove action from the popup menu in qml item

    Hi all

    I want to just dynamically add or remove action from the actionset item in the contextual menu especially in qml.

    Thanks in advance.

    Kind regards

    Ankur

    You can do so by joining the actionitem as attachedObjects. Once the page is complete (signal onCreationCompleted), you can add it to the page using addAction()

    To remove, you simply delete the page using removeAction()

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__page.html

  • Dynamically add an OAFormValueBean to a region

    Hello.

    I need to dynamically add an OAFormValueBean on my page. In the processRequest of the controller method I create like this:

    OAFormValueBean employeeIdBean is createWebBean (OAFormValueBean) (oapagecontext, OAWebBeanConstants.FORM_BEAN, NUMBER_DATATYPE, REG_HEADER_EMP_ID);.

    But that runs the page I get this exception:

    The signature of createWebBean (pageContext OAPageContext, style of string, the String data type) only supports TextInputBean

    How to dynamically add an OAFormValueBean to a region?

    Hello

    Use
    You can create the hidden dynamically field
    OAFormValueBean = formValueBean
    CreateWebBean (OAFormValueBean) (pageContext, HIDDEN_BEAN, null, "");

    Thank you
    Kumar

  • How to dynamically add a plot to a graph of mixed signals

    I have a graph of mixed signals where I'm plotting a signal from a time axis. I'm trying to dynamically add a second plot to this graph against the same time axis (with a different scale of Y), but when I built a 2D array and try to connect in the graph (using a local variable) I get an error of size mismatch. I know for sure I did in the past (cable tables with different sizes for a same MSG) with no problems but, today, for some reason any I can't solve this problem.

    Am I missing something?

    Yes, you're probably writing a table 1 d somewhere that is causing to accept only 1 d. To address your problem above, just put a table node build in whenever you have a 1 d table and it will be just a 2D array with a single line of data.

    To add a field to your current locations, your screenshot above should work once the plot knows that he has to accept the 2D tables.

    Reading from a local variable, change something and then write about it once again can lead to a lot of issues down the line. Race conditions are a pain in the butt, so get rid of that sort of thing is good to do from the start. I didn't know the rest of your code, so I don't know how you treat it, but just keep in mind that you add to your software.

  • 9.0 can a dynamic nat be used via ipsec vpn?

    9.0 can a dynamic nat be used via ipsec vpn?

    We have a vpn and work between asa and when we run traffic through a static nat rule traffic goes over the vpn. When we use a dynamic nat traffic does not get picked up by the ACL vpn.

    We disable the nat rules to switch back and just so, even when we use the same destination to source the result is the same.

    Am I missing something with 9.0 versions of code? If I disable all the nats and pass traffic it goes via the vpn.

    So, it seems that when you use the dynamic nat statement, it pushes traffic to the external interface without looking at the acl of vpn. Please let me know if I'm crazy, I'm a newb on 8.3 zip code.

    Thank you

    Have you included in the ACL crytop natted ip address or range?

    You allowed natted ip address or range to the other end of the tunnel?

  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • Dynamic add to cart

    Hey everybody, just try to see if there's a way dynamically add something to the cart. I see the html code for how works the add to Cart button, but it looks like it uses the ID 'product' to add the product itself. However, I am not able to see how I can retrieve the id of the product if all I have is the 'Product Code' (from {tag_productcode}). These two values are different for non insiders.

    I know that if I work a little longer on that I could just get some ajax to visit the real great product page manually and find add to Cart button and enter the ID of the product in this way, this seems excessive.

    If anyone has any ideas, I would be very grateful.

    With the add to Cart then that.

    I don't know why people do not use the documentation - all that it:

    The developer reference

    {{id}} {tag_productid} System displays product ID.
    {{catalogId}} {tag_catalogueid}

    These two you will need dynamic, but make sure you also get the other correct settings.

  • How can we dynamically open an external URl of the page of the OFA

    Hi team
    Hello, how can we dynamically open an external URl of the page of the OFA
    For example: my datas table DB are like that
    Employee no       Url
    1     https://www.google.co.in/
    2     https://www.facebook.com/
    3     https://www.yahoomail.com/
    When I don't ask used no 1 of my Search Page
    In the result of my search page table, I get
    1 https://www.google.co.in/
    NOTE: Here item URL is type bean link when I click on the link it should open google page in separate browser
    At the same time, when I question used no 2 which is shown below, then it should open facebook page in a separate browser.
    2 https://www.facebook.com/

    When I try this
    Destination URI - https://www.google.co.in/
    It opens no separate browser, but for employees don't I question as open 1,2,3 only the same page of google in the separate browser for everyone, it is static, I want to dynamically open the URL depend on my employee to query no. If I query emp No 2 it must open facebook page this is my requirement. How can I pass the URL as a parameter?

    Please share your knowledge and experience and your advice my on this issue
    How can I complete my task
    I hope that my requirement is clear, if not please let me know I explained more anyway :)

    Is it Possible to achieve this OAF Page
    Thank you for all your suggestions on this
    Thanks in advance

    A.T. :)

    .findIndexedChildRecursive ("ResultTable");

    Here, you should have the exact itrm link id and not the region containing the lino

    Would it be more likely ImagePath I think ResultTable corresponds to the id of the table of search results

  • Dynamically add data to a table field in a drop-down list?

    Hello

    I tried to create a drop down menu to dynamically fill a table based on what menu option drop down is selected. I can run to add a line to the times, which is good, but I want to add the text for the option chosen to a field in the newly created line. I can get this to work using Row1.Field.rawValue = "blah blah blah" but when I want to get dynamic and call the line created by using something like resolveNode I can't get anything to be entered in the field. Is this possible at all?

    Here is my script:

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

    topmostSubform.Page1.tabletest.DropDownList2::exit - (JavaScript, client)

    If (this.rawValue == 1) {}

    Table4._Row1.addInstance)

    Page1.tabletest.Table4.Row1.identity.RawValue = 'Servitude for Transmission line.

    };

    If (this.rawValue == 2) {}

    Table4._Row1.addInstance)

    Page1.tabletest.Table4.resolveNode(row1[Table4.row1.instanceManager.Count-1]). Identity.RA wValue = ' Servitude for electricity and other purposes.

    xfa.host.messageBox ("Ausgrid");

    };

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

    The first part, for this.rawValue is 1 good works for a single instance of the addition. The second part, where I tried to do a resolveNode, adds a line, but does not enter any text.

    Thanks in advance for your assistance with and review of this problem.

    See you soon,.

    Greig

    poulate_table_dynamically_from_drop_down.jpg

    Hello

    the resolveNode method must somExpressions wrapped in quotes.

    In front of FormCalc JavaScript does not support numeric values in the [] accessors to solve a case.

    Modify your script

    Page1.tabletest.Table4.resolveNode("Row1[" + Table4.Row1.instanceManager.count-1 + "]").Identity.rawValue = ...
    
  • Add strings at the end of the text file... Run Run Pinocchio

    The Write() and Writeln() seem to copy more old content when it is called. Can I just add the text to the last insertion position in a text file? I could just pop the string into an array and write the table in the file, but I prefer a direct means to do so.

    Thanks for any help,

    KUD

    The modes are in the File.open ('a') logon options

  • Dynamically add UIComponent without refreshing entire page (JDEV 11.1.1.3)

    Hi all
    I have this problem.

    I need to dynamically add an element within a page without refreshing entire page jspx.

    For example, look at this page:


    Titus: _
    Name: _______
    Job: _ (+ add more jobs)

    When I click on (+ add more jobs), I add a new RichInputText:

    private RichPanelBox pb1;

    public String cb1_action2() {}
    RichInputText rc = new RichInputText();
    rc.setId (...);
    [....]
    This.PB1.GetChildren (). Add (RC);
    Returns a null value.
    }

    The field is displayed properly on the page, but the system do a full refresh and lose your position on the page.

    Obviously becomes inconvenient for the user to have to scroll the page up to a certain point where it was before.
    Is it possible to avoid this problem and to add the field without a complete refresh of the page?

    Thank you
    Cristian

    Published by: on February 11, 2011 baol 7,53

    Try with PartialSubmit for the button and use PPR as follows:

    JSPX Code:





    partialSubmit = 'true '.
    actionListener = "#{SamplePageBean.onAddJobs}" / >




    Bean code:

    public class SamplePageBean {}
    private RichPanelBox panelBox;

    public SamplePageBean() {}
    }

    {} public void onAddJobs (ActionEvent actionEvent)
    RichInputText richInputText = new RichInputText();
    richInputText.setId ("Id1");
    richInputText.setLabel ("Job Title");
    this.panelBox.getChildren () .add (richInputText);
    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.panelBox);
    }

    {} public void setPanelBox (RichPanelBox panelBox)
    this.panelBox = panelBox;
    }

    public RichPanelBox getPanelBox() {}
    After a return;
    }
    }

    Thank you
    Nini

  • How to dynamically add data in a Spark list control

    Hi, I have a spark list in one of my custom components() control(id="Cclist") and a text input control. When a value is entered in the entry of the texts, I want to dynamically add the same in the list control. I tried to do the following:

    protected function Cc_selectHandler(event:CustomEvent):void

    {

     var cctext:DisplayObject = event.data as DisplayObject
    CcList.enabled = true;
    CcListButton.enabled = true;

    CcList.addChild(cctext);

    }

    But I get an error saying "addChild() is not available in this category.  "Instead, use addElement(), or change the skin. So I tried to use addElement, but apparently it is not available at all. No idea what im doing wrong?

    Add the text entered in the textinput to the dataProvider of the list in the appropriate format.

    A simple example:

    
    
        
            
        
    
        
            
        
    
        
            
        
        
        
        
    
    
  • Is it possible to dynamically add children to a TabNavigator

    Is it possible to dynamically add and remove children from a TabNavigator. If yes how?

    I have a tabnavigator control with

        <mx:TabNavigator x="70" y="97" width="200" height="200">
            <mx:Canvas label="Tab 1" width="100%" height="100%" id="tab">
            </mx:Canvas>
        </mx:TabNavigator>
    

    How can I add a tab to the tabnavigator?

    Help, please.

    Hello

    Yes, it is possible to add tabs dynamically to TabNavigator.Pls find the code below. Let me know if you have any problem.

    http://www.Adobe.com/2006/mxml">

    Import mx.controls.Label;

    Import mx.containers.VBox;

    private function onCreationComplete():void

    {

    var vbox1: VBox = new VBox();

    vbox1. Label ='Tab 1';

    var lbl1: Label = new Sun

    LBL1. Text ="Panel1";

    vbox1. AddChild (LBL1);

    tabNavigator.addChild (vbox1);

    var vbox2: VBox = new VBox();

    vbox2. Label ="Tab 2";

    var lbl2: Label = new Sun

    LBL2. Text ='Group 2';

    vbox2. AddChild (LBL2);

    tabNavigator.addChild (vbox2);

    var vbox3: VBox = new VBox();

    vbox3. Label ='Tab 3';

    var lbl3: Label = new Sun

    lbl3. Text ="Group 3";

    vbox3. AddChild (lbl3);

    tabNavigator.addChild (vbox3);

    }

    private var counter: number = 0;

    private function addNewTab():void

    {

    var VBox: VBox = new VBox();

    VBOX. Label ="Tab"+ Counter.ToString ();

    var lbl: Label = new Sun

    LBL. Text ="Panel"+ Counter.ToString ();

    vbox.addChild (lbl);

    tabNavigator.addChild (vbox);

    counter ++;

    }

    ]]>

    with respect,

    Mayeul Singh Bartwal

  • Allow users to dynamically add rows

    Hello

    During the creation of form, I found an option "allow users to dynamically add rows. I need so that users must be able to create new lines if necessary for new TBHs. How does this option, could someone let me know?

    Thank you

    IDI

    Hello

    If the user has write access to the form and the option is selected to "Allow users to dynamically add lines", when the user runs the form that it has the option in the menu (Edit > Add Row)
    Then, this will open a window where the user can select the members for the dimension of the row to which it has access.

    The function does not work if you have selected "remove Missing Data".

    Useful, correct, answered? you know that you can do.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

Maybe you are looking for