How to get  selected item page number?

I am developing the plug-in for moving page item from one page to another page,for that i need selected item page number.i.e. i need the page number
which the item is selected.

Just access the 'currentCountry' property in the action method.
public void submit() {
    System.out.println("JSF has already set the property: " + currentCountry);
    // Now do your thing with it. E.g. saving it or so.
    countryDAO.save(currentCountry);
}

Similar Messages

  • How to get selected items from a tree in backing bean without adfbc

    Hi ADF Experts,
    Below is my code for af:tree. My question is how can I get selected Items from the selectionListener (without adf bc) this uses formation of tree from backing bean.
    Using Jdev 11.1.1.7.0
    <af:tree var="node" value="#{pageFlowScope.MerchandizeBean.model}"
                      binding="#{pageFlowScope.MerchandizeBean.treeModel}"     id="tree" immediate="true" autoHeightRows="0"
                           styleClass="AFStretchWidth" rowSelection="multiple"
                           selectionListener="#{pageFlowScope.MerchandizeBean.treeNodeSelection}">
                    <f:facet name="nodeStamp">
                      <af:commandLink text="#{node.classDescription}"
                           actionListener="#{pageFlowScope.MerchandizeBean.createListManyItemForMerchandise}"           id="displayTable" partialSubmit="true">
                      </af:commandLink>
                    </f:facet>
                  </af:tree>
        public void treeNodeSelection(SelectionEvent selectionEvent) {
            // Add event code here...
            RichTree tree = (RichTree)selectionEvent.getSource();
                    TreeModel model = (TreeModel)tree.getValue();
                    //get selected value
    Thanks
    Roy

    Hi,
    in a multi select case, try
    RowKeySet rks = tree.getSelectedRowKeys();
    Iterator iter = rks.iterator();
    while(iterator.hasNext()){
    Object aKey = iterator.next();
    tree. setRowKey(aKey);
    Object rowData ? tree.getRowData();
      .... do something with the data here ...
    Frank

  • How to get the total page number when using Crystal Report in JSP

    In my JSP, I use the class CrystalReportViewer to generate and display the report views. But this class only sypply the function to get the info of the active view.
    Thus with this info, I only can get the active view's page number. How can I get the report total page number without showing the last page first?
    Thanks.

    Anything you do without submitting to form has to be done on the client side (ususally by JavaScript) using data which has been send already from the server.
    With JavaScript you can do quite a bit. You can download tables which don't necessarilly appear on the screen, loading them into JavaScript arrays by dynamically generating javascript. Then you can pick up events like drop-box selection and use these tables to chose what you do next (e.g. preloading other fields, setting drop box content etc.).
    Or, you can cause forms to be submitted when actions like a selection happen without the user clicking a button. It's generally a matter of how much data you'd need to transmit.
    Another posibility is to use a Java applet, which can generate requests to the server and handle the results as it chooses. That are a number of problems with that but occasionally it's the best solution.
    What you can't do is to handle user input inside a JSP. The JSP has come and gone before the user even gets to see your form.

  • SRM 7 SOCO enhancement - from step1 to step2, how to get selected items?

    Hi all gurus,
    I'm enhancing the WD /SAPSRM/WDC_DO_SOCO_GAF_1, specifically my requirement is to block FPM navigation if certain conditions based on the selection are met.
    Example:
    An user searches for some PR in sourcing cockpit's step 1, select just a subset from the search result (say, he selects item 1 and item 3, leaving item 2 unselected).
    Then press the NEXT STEP button (which is, as far as I understood, an element managed by the COMPONENTCONTROLLER)..
    Let's suppose the condition we talked about is that each position of a specific PR should be selected; the example above does not meet that condition (only positions 1 and 3 are selected).
    What I'd like to implement is as follows:
    - if the user presses the NEXT_STEP, navigation to the newt WD is cancelled (user remains in STEP 1) and an explicative error message is raised in the message area (e.g. "all positions must be selected").
    Looking for the best, effective way to do this... In particular, I have to:
    -1- identify which positions have been selected when the NEXT_STEP button is pressed;
    -2- implement the check based on positions (that's the easy job);
    -3- raise a message into the messagearea (easy one) and STOP the process so that the user still remains into STEP 1 view (obviously, until his selection meets the specifics).
    I actually overwrote via enhancement the standard PROCESS_EVENT method in the COMPONENTCONTROLLER of that Webdynpro (/SAPSRM/WDC_DO_SOCO_GAF_1), and I'm trying to get the selected lines.
    IF  io_event->mv_event_id = 'FPM_NEXT_STEP'.
        DATA: test           TYPE REF TO /sapsrm/cl_ch_wd_ao_soco.
        DATA: gaf1           TYPE REF TO /sapsrm/if_cll_dom_soco_gaf1.
        DATA: selected_items TYPE WDR_CONTEXT_ELEMENT_SET.
        DATA: selected_item  TYPE /sapsrm/s_cll_wd_soco_workarea.
        test ?= wd_this->ig_componentcontroller~mo_aom_soco.
        CALL METHOD test->/sapsrm/if_cll_ao_soco~get_dom_soco_gaf1
    *  EXPORTING
    *    ion_wd_set                 =
    *    io_wd_view_controller      =
    *    io_wd_component_controller =
          RECEIVING
            ro_dom_soco_gaf1           = gaf1.
        DATA: tabselected  TYPE /SAPSRM/T_CLL_WD_SOCO_SEARCH.
        CALL METHOD gaf1->ZR7_IF_CLL_DOM_SOCO_GAF1~GET_SELECTED_ITEMS
          IMPORTING
            SELECTED_ITEMS = tabselected.
    where ZR7_IF_CLL_DOM_SOCO_GAF1~GET_SELECTED_ITEMS returns the SEARCH_RESULT node of the view GAF1.  This however returns the SEARCH_RESULTS table which contains ALL the positions in the Search table and not just the selected ones... I basically have to modify the get_selected_items, in order to get the selected lines, but actually don't know how and if it's possible; as far as I've seen in debug, there's no way to get the selection ... maybe it has already been cleared at this point?
    Any help provided on these 3 task is highly appreciated and welcome

    Solved! Quite a tricky solution, but it works.

  • Quick question: How to get the scrolled page number using af:table

    Hi,
    When using range paging on scrolled table, how to get the current scrolled page number(1,2,3...), for example when moving the table vertical scroll bar forward or backward, is there any method in ViewObjectImpl class that I can use to get such information? I have seen the method scrollToRangePage(int i), but when scrolled ("Fetching data..."), it doesn't not get into this method. So it is wrong usage for this method, right?
    Thanks

    Didn't you just ask that question in this thread?: How to catch the page number when using scroll table in ADF 11g?
    A bit of patience might be in order.
    CM.

  • How to get selected item value and display text in selectOneChoice ?

    Hi
    Thank you for reading my post
    I bind the a selectOneChoice component to my backing bean so i have an object which represent this component in the backing bean.
    now i need to find which item is selected by use , i know that i can use
    getSelect_service().getValue.toString() , but it will return the value of the selected item, how about its display text ?
    I should say that i create an static list for selectOneChoice items.
    thanks

    Using JDeveloper 10.1.3.1, freshly downloaded off OTN. I used the following code to try and identify the problem you are encountering. I attempted to use a valueChangeListener in combination with af:selectOneChoice components that use SelectItems and the singular SelectItem. I could not reproduce the error in either case. Please post more information about your development environment.
              <af:selectOneChoice label="Label 1"
                                  binding="#{backing_test.selectOneChoice1}"
                                  id="selectOneChoice1"
                                  valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <af:selectItem label="1" value="1"
                               binding="#{backing_test.selectItem1}"
                               id="selectItem1"/>
                <af:selectItem label="2" value="2"
                               binding="#{backing_test.selectItem2}"
                               id="selectItem2"/>
                <af:selectItem label="3" value="3"
                               binding="#{backing_test.selectItem3}"
                               id="selectItem3"/>
              </af:selectOneChoice>
              <af:selectOneChoice label="Label 2"
                                  binding="#{backing_test.selectOneChoice2}"
                                  id="selectOneChoice2"                              valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <f:selectItems value="#{backing_test.items}"
                               binding="#{backing_test.selectItems1}"
                               id="selectItems1"/>
              </af:selectOneChoice>
        public void valueChangeListener(ValueChangeEvent evt){
            // returns a UISelectOneChoice object
            System.out.println(evt.getSource().getClass().getName());
            // returns a string
            System.out.println(evt.getNewValue().getClass().getName());
        public Map getItems(){
            items = new HashMap();
            items.put("11","11");
            items.put("12","12");
            items.put("13","13");
            return items;
        }

  • How to get select items from multi select in an array or list in jsp

    i have the following multi select which is basically an array coming from the database how can select couple of them and put them in an array in jsp and then save them in the session so when i click the next button they continue till i reach the last finish button of my wizard:
    <SELECT MULTIPLE SIZE=5>
    <OPTION VALUE="o1">Option 1
    <OPTION VALUE="o2">Option 2
    <OPTION VALUE="o3">Option 3
    <OPTION VALUE="o4">Option 4
    <OPTION VALUE="o5">Option 5
    <OPTION VALUE="o6">Option 6
    </SELECT>
    Option 1Option 2Option 3Option 4Option 5Option 6

    Hi,
    As you are tracking changes in ALV data you must define a event handler for ALV evenr ONDATA_CHECK.
    On defining an event handler you will be getting a structure called t_param.
    It contains an element called t_deleted rows.
    See this code to have an idea.
    method ONDATACHECK .
      DATA: x_delete_row LIKE LINE OF r_param->t_deleted_rows.
      "      i_addr_factr TYPE STANDARD TABLE OF ycot_addr_factr,
       "     x_addr_factr LIKE LINE OF i_addr_factr.
    TYPES t_proj_constr TYPE ycot_proj_constr.
      FIELD-SYMBOLS: <fs_row> TYPE t_proj_constr.
      IF wd_comp_controller->ya_optyp = 'DELETE'.
        LOOP AT r_param->t_deleted_rows INTO x_delete_row.
          "x_addr_factr ?= x_delete_row-r_value.
          ASSIGN x_delete_row-r_value->* TO <fs_row>.
        DELETE FROM ycot_proj_constr  WHERE plant = <fs_row>-plant
                                     AND   yr_nbr = <fs_row>-yr_nbr
                                     AND   period = <fs_row>-period
                                     AND  billback_pr_fmly = <fs_row>-billback_pr_fmly
                                     AND  prd_nm = <fs_row>-prd_nm.
      ENDLOOP.
    I hope it helps.
    Regards,
    Sumit Oberoi

  • How to get selected item uid

    Hello
    I want to get the uid of the item selected.is there any way through ISelectionManager? or is there any other way?
    Thanks
    Regards,
    MS Choudry

    Hi MS Choudry,<br /><br />this is not as simple as it seems.<br />You need to build your own "Selection", that means a "SelectLayoutCSB" and a "SelectASB".<br />Below I post the code of our sources, please refer to the documentation about CSB and ASB for more information.<br /><br />SelectLayoutCSB<br />===============<br />class IRSelectLayoutCSB : public CPMUnknown<IIRSelect><br />{<br />public:<br />     IRSelectLayoutCSB(IPMUnknown* boss);<br />     ~IRSelectLayoutCSB(void);<br />     virtual bool16 GetSelectedUID(UID& uid);<br />private:<br />};<br />CREATE_PMINTERFACE (IRSelectLayoutCSB,kIRSelectLayoutCSBImpl)<br />IRSelectLayoutCSB::IRSelectLayoutCSB(IPMUnknown* boss):CPMUnknown<IIRSelect>(boss)<br />{<br />}<br />IRSelectLayoutCSB::~IRSelectLayoutCSB(void)<br />{<br />}<br />bool16 IRSelectLayoutCSB::GetSelectedUID(UID& uid)<br />{<br />     uid = kInvalidUID;<br />     InterfacePtr<ILayoutTarget> iLayoutTarget(this, UseDefaultIID());<br />     if (iLayoutTarget == nil)<br />          return false;<br />     const UIDList selectedItems(iLayoutTarget->GetUIDList(kStripStandoffs));<br />     int32 iNbObjects = selectedItems.Length();<br />     if (iNbObjects != 1)<br />          return false;<br />     UIDRef uidref = selectedItems.GetRef(0);<br />     uid = uidref.GetUID();<br />     return true;<br />}<br /><br />SelectASB:<br />==========<br />class IRSelectASB : public CPMUnknown<IIRSelect><br />{<br />public:<br />     IRSelectASB(IPMUnknown* boss);     <br />     virtual ~IRSelectASB(void);<br />     virtual bool16 GetSelectedUID(UID& uid);<br />};<br />CREATE_PMINTERFACE (IRSelectASB,kIRSelectASBImpl)<br />IRSelectASB::IRSelectASB(IPMUnknown* boss):CPMUnknown<IIRSelect>(boss)<br />{<br />}<br />IRSelectASB::~IRSelectASB(void)<br />{<br />}<br />bool16 IRSelectASB::GetSelectedUID(UID& uid)<br />{<br />     return (Process (make_functor(&IIRSelect::GetSelectedUID, uid), this, IIRSelect::kDefaultIID));<br />}<br /><br />HTH,<br />Daniel

  • How to get selected item from AutoSuggestBox in Windows Phone 8.1

    In CS File "SelectedItem" is not working what is the alternative to "SelectedItem" for AutoSuggestBox in WP8.1
    In XAML File:
    <AutoSuggestBox x:Name="tblkpersonname" Width="380" Margin="0,-7,0,0" ItemsSource="{Binding}" TextChanged="tblkpersonname_TextChanged">
    <AutoSuggestBox.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding Name}"
    Tag="{Binding PersonID}"/>
    </DataTemplate>
    </AutoSuggestBox.ItemTemplate>
    </AutoSuggestBox>
    In Cs File:
    private void tblkpersonname_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
    try
    if (tblkpersonname.SelectedItem != null)
    tblkdes.Text = ((values)tblkpersonname.SelectedItem).Description;
    persononlineimg.Source = new BitmapImage(new Uri(((values)tblkpersonname.SelectedItem).FlickrPersonImageUrl, UriKind.RelativeOrAbsolute));
    catch (Exception ex)
    Exceptions.SaveOrSendExceptions("Exception in tblkpersonname_SelectionChanged_1 Method In AddCast.cs file.", ex);
    Devi Prasad.P

    Hi
    Not sure about the code you have mentioned here, there is no property named selecteditem in msdn. Please refer
    https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.autosuggestbox.aspx
    <AutoSuggestBox x:Name="suggestions"HorizontalAlignment="Left" Margin="52,62,0,0"
    ItemsSource="{Binding }"VerticalAlignment="Top"
    Width="296" TextChanged="suggestions_TextChanged"
    SuggestionChosen="suggestions_SuggestionChosen"/>private void suggestions_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
                if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
                    Suggestions.Clear();
                    Suggestions.Add(sender.Text + "Tea");
                    Suggestions.Add(sender.Text + "Tatt");
    private void suggestions_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
                suggestions.Text = "Choosen";
    Something like this can be used
    Regards
    Varun Ravindranath Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to get selected value from selectOneRadio ???

    Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
    Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
    Plzzzzzzzz i need help

    You have a datatable in which each row is a question, correct?
    Also in each row you have 5 possible answers that are in a radio, correct?
    So,
    You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
    So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
    ex:
    <h:selectOneRadio value="#{notas.selectedString}" id="rb">
    <f:selectItem itemValue="#{notas.valuesList}"/>
    </h:selectOneRadio>
    Search the web for examples like yours.

  • How to get selected value from OADefaultListBean.

    Hi All,
    How to get selected value from OADefaultListBean ?
    Thanks,

    Hi,
    To identify the user's selection(s) when the page is submitted, you would add the following logic to your processFormRequest() method:
    OADefaultListBean list =
    (OADefaultListBean)webBean.findChildRecursive("positionsList");
    String name = list.getName();
    String[] selectedValues = pageContext.getParameterValues(name);
    To retrieve all the values in the list box, call list.getOptionsData().
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get selected values from selectManyCheckbox ?

    Hi,
    I am a SOA developer and using 'Auto generated adf form' of Human Task. I did some customization in the form. I need to show one dynamic list (contains multiple string values) on a form, from which user will select desired values. For this I have used <af:selectManyCheckbox> adf component.
    It has generated code as follows...
    <af:selectManyCheckbox value="#{bindings.Response.inputValue}"
                                             label="#{bindings.Response.label}"
                                             id="smc1">
                        <f:selectItems value="#{bindings.Response.items}" id="si9"/>
    </af:selectManyCheckbox>
    I am able to show list on a form and can select multiple values also.
    Now, I want the multiple selected values back in my BPEL process. I need only those values which are selected by user.
    Currently I am getting complete list as it is back in BPEL process.
    Please help me out..!
    Thanks..
    Suraj

    Unwinding ADF: How to retrieve Selected Items from selectManyCheckbox using ValueChnageListener

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • How to get selected row keys from RichSelectManyCheckbox

    Adf Table has getSelectedRowKeys but SelectManyChekcbox does not has anything similar. Can you tell me how to get selected row keys programmatically for RichSelectManyCheckbox?

    Hi User,
    selectManyCheckbox component's value property holds the selected items values. Bind this property to some bean variable(of type list) so that you can get the selected values by accessing the bean property.
    Sireesha

Maybe you are looking for