How can I receive the value of a selected item in the backing bean

I have a table in a jspx file.
When I go to the detail page I want to do something with the value of the currentrow.
I want do a calculaction of the value of ClbId.
How can I receive the value of the selected ClbId in my backing bean
<af:table value="#{bindings.Searchteamlist.collectionModel}"
var="row" rows="#{bindings.Searchteamlist.rangeSize}"
first="#{bindings.Searchteamlist.rangeStart}"
emptyText="#{bindings.Searchteamlist.viewable ? 'No rows yet.' : 'Access Denied.'}"
selectionState="#{bindings.Searchteamlist.collectionModel.selectedRow}"
selectionListener="#{bindings.Searchteamlist.collectionModel.makeCurrent}"
rendered="#{backing_FirstFlag_Club_Club.searchFirstTimeClub_Club_AdresAndereClubs == false}">
<af:column sortProperty="Matricule" sortable="true"
headerText="#{bindings.Searchteamlist.labels.Matricule}">
<af:outputText value="#{row.Matricule}"/>
</af:column>
<af:column sortProperty="ClbId" sortable="true"
headerText="#{bindings.Searchteamlist.labels.ClbId}">
<af:outputText value="#{row.ClbId}">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.Searchteamlist.formats.ClbId}"/>
</af:outputText>
</af:column>
<af:column sortProperty="Nom" sortable="true"
headerText="#{bindings.Searchteamlist.labels.Nom}">
<af:outputText value="#{row.Nom}"/>
</af:column>
<f:facet name="selection">
<af:tableSelectOne text="Select and">
<af:commandButton text="Submit"
action="club_AdresAndereClubsDetail">
<af:setActionListener from="#{row}"
to="#{processScope.row}"/>
</af:commandButton>
</af:tableSelectOne>
</f:facet>
</af:table>

hi tde
Using an Expression Language helper class like this one from Steve Muench ...
http://radio.weblogs.com/0118231/stories/2006/12/18/sourceForMyFavoriteElHelperClass.html
... you could write something like this in your backing bean:
Integer vClbId = (Integer)EL.get("#{row.ClbId}");(Make sure to cast it to the correct type.)
success
Jan Vervecken

Similar Messages

  • How can I set default value to a transient parameter  in the VO

    I have created a transient parameter in the VO, which is type of boolean.
    When I try to input the "true" or "True" or "Y" in the 'default value',
    and then running the programm, but all failure.
    so I don't know how can i do.
    Genuinely waiting for you help, thanks in advance.

    Hi Sumury,
    First of all you could check if this transient attribute is read only. to check this, edit the VO and select the transient attribute under the Attributes tab. Then verify if it is marked as "Updateable Always" on the right-hand section.
    If it is updateable, then try setting the default value on the VO Implementation class: open the xxxVOImpl class, go to the transient attribute's setter (setxxx()) and change it to:
    <code> if (getXXX() == null) setAttributeInternal(XXX, "Y");
    else setAttributeInternal(XXX, value);</code>
    This might work. If it does not, then please post the exact message you are receiving when running the app.
    Hope this helps!
    Thiago

  • How can I pass a value that is selected in a dropDownlist into a java metho

    My explanation is below and heres my jsp and javascript code:
    <form action="" method="post" enctype="multipart/form-data" name="form1">
    <table width="90%" cellpadding="0" cellspacing="0" class="tblProperties">
    <tr class="trBackColor"><td class="tdLayoutTwo"> </td></tr>
    <tr class="trLayout">
    <td class="tdLayout" align="right">Student Name: </td>
    <td width="316">
    <select name="studentID" id="studentID">
         <option value="0" selected>Select...</option>
         <%=frmStudent.createList(appStudent.getStudentID())%>
        </select>
    </td>
    </tr>
    <input class="inputForm" type="submit" onClick="setValues(form1)" name="Submit"  value="Continue">               
    </td>
    </tr>
    </table>
    </form>Javascript code...
    function setValues(frm) {
         var stuID = frm.studentID.value;
         <%=appForm.setStudentID(stuID)%>
         }I need to pass a selected value from the Form Dropdown into a java setMethod() in my jsp page. But I can't seem to figure out how? I used the "setValue" javascript funtion as shown above, that passes the value from Javascript to jsp on a onClick event, but it doesn't work. I did some research on the internet and have learnt that I cannot pass values from Javascript to jsp.
    Is there any other method, may be after I hit the submit button? I need to pass the selected value from a student dropdown list to a jsp setMethod(). So for example if I select, Jon from a Dropdown list which has a ID = 5, then I need to pass 5 to the java method.
    Any Clues?
    Thanks

    hi zub786,
    you have to do following things:
    1) Get the value of the selected index using javascript methods on selection of student ID.
    2) Use hidden tag and pass that index to value of the hidden parameter.
    3) Use that parameter in your next Jsp where you want that id.
    I hope this info might help u.
    Leozeo

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • My daughter accidentally dumped my iTouch into the tub.  It is ruined.  How can I receive my one time regrant on all the songs I've lost.  There were approximately 80 songs I purchased on iTunes.  They get me through the day!  Please help!

    My daughter accidentally dumped my iTouch into the bath tub.  It is ruined.  How can I receive my one time regrant to get back the 80 plus songs I purchased and downloaded on iTunes?  I'm devastated....please help!  My husband bought me the new iPhone4 for my new Mother's Day gift.  I would like to download all the songs I lost.  Thank you so much!

    You can redownload the songs as many times as you want, the "one time regrant" no longer exists. Make sure you are using the same apple id on both your dead itouch and your iphone 4. On your iphone 4 go to the itunes app > Purchased (may be under more based on your settings) at the top click not on this iphone, click all songs then click the little cloud next to each song you want to redownload. It will prompt you for your id and password and the begin your download

  • How can i add two values under the same property?

    Hi all,
    How can i add two values under the same property name in a
    prop list? For example:
    [question1: "item1","item2", question2: "item3","item4"]
    To be more precise, i am creating a property list and I want
    whenever a two values have the same property name to be added int
    he list under the same property. For example:
    gMyList.AddProp (#""&question&"" & x,
    member("input").text)
    question is a variable that is updated fromt he user's input.
    Now, whenever somethign like this happens:
    question = "question1"
    member("input").text = "five"
    question = "question1"
    member("input").text = "six"
    I want to output list to be:
    [question1: "five","six"] and so on
    Any ideas?

    Maybe you could make each property a list (so you have a
    property list full
    of lists), and add multiple values to the list held in a
    particular
    property?
    Cheers
    Richard Smith

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • How can i receive the information from a form ?

    I created a form in Dreamweaver CS5 with some input fields and with a send button.
    The question is how can I receive the information that is filled in by the visators.
    Where can I tell to which email adress the information has to be send. Where can I find this in dreamweaver CS5?
    Or what else do I have to do before a form is actually working and I'm receiving the input?
    Already thanks
    Ron

    I'm just starting with building a site
    so thanks for this email
    2010/11/17 DeonH <[email protected]>
    Hi there.
    >
    I don't know what your capabilities are regarding coding. I am no
    programmer and use "Forms to Go" with much success. Take a look here:
    http://bebosoft.com/products/formstogo/overview
    >
    Regards,
    Deon
    >

  • How can i receive my receipt on the iphone 4 I purchased in August 2011

    How can i receive my receipt on the iphone 4 I purchased in August 2011

    No one here with a crystal ball or into mind reading! Who did you buy the iPhone from? You should be talking to them about the receipt.

  • I need to get the latest version of Adobe Reader.  Is this still free?  How can I receive automatic upgrades?

    I need to get the latest version of Adobe Reader.  Is this still free?  How can I receive automatic upgrades?

    Of course the free Reader is still available: http://get.adobe.com/reader/
    To get automatic updates set the Updater in the Reader Preferences.

  • How can i receive the user name of the present operating system

    HI,all.
    how can i receive the user name of the present operating system from SAP.Have any funciton to use?Thankyou!

    use sy-uname system field.
    report ztest.
    write:sy-uname.
    thanks.
    reward if solved.

  • How can I receive a fax?  The phone jack does not seem to fit in the ethernet port....(OS 10.6.7)

    how can I receive a fax?  The phone jack does not seem to fit in the ethernet port....(OS 10.6.7)

    sarahfromberkeley wrote:
    how can I receive a fax?  The phone jack does not seem to fit in the ethernet port....(OS 10.6.7)
    The MacBook has no fax-modem. You will need an external (USB) modem.
    Stedman

  • How can i dynamically assign values to the tld file

    How can i dynamically assign values to the tld file

    In the tld you write for the tag handler mention the following sub tags in the attribute
    <attribute>
    <name>xyz</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    import the packagejavax.servlet.jsp.tagext.DynammicAttributes;
    add the method
    public void setDynamicAttribute(String rui, String localname, Object value) throws JspException
    <Your Required task>
    Its better if you SimpleTagSupport class to be extended.

  • The Apple Mail group my sent and received similar messages in my inbox, how can i disable this? I just want to see the messages i received, not the ones i sent!

    The Apple Mail group my sent and received similar messages in my inbox, how can i disable this? I just want to see the messages i received, not the ones i sent!

    Mail/Preferences/Composing. Do you have the CC myself box checked?

  • How can we receive the Payment?

    Hello,
    How can we receive the payment with the help of profit center?
    Is Sales & Distribution mandatory for the revenue posting?
    Thanks

    Hello,
    In general, revenue entries are being initiated from SD module.
    Are you booking some revenue on your project. If so, what is the transaction code you are using?
    In SAP revenue is treated as credit and will be shown with minus.
    When there is a billing,
    Customer A/c Dr
      To Sales Account
    You will observe a credit sign against sales account.
    Please clarify more.
    Regards,
    Ravi

Maybe you are looking for