Link from a dataTable with row id

I can't seem to get a link from a dataTable to work with a specific id. Example:
<h:dataTable columnClasses="list-column-center,list-column-center,
list-column-center, list-column-center"
headerClass="list-header"
rowClasses="list-row-even,list-row-odd"
styleClass="list-background"
id="table"
rows="20"
value="#{processList.processes}"
var="process">
<h:column >
<f:facet name="header">
<h:outputText value="ID"/>
</f:facet>
<h:outputText value="#{process.id}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:inputHidden value="#{process.id}" />
<h:commandLink
action="#{processBean.showProcess}"
>
<h:outputText value="#{process.name}"/>
</h:commandLink>
</h:column>
I've tried putting bindings on the inputHidden and the commandLink, but those give me a type mismatch for some reason. I just want to click the link and open a page showing the information related to that row in the table.
How can I pass the id along to the action ??

If you call externalContext.getRequestMap().get("process") in your action routine, you can get an object reference to the row data containing the link that was clicked on. "process" being the value you gave to the var attribute in the dataTable tag.
Ed Dowgiallo

Similar Messages

  • Emailing datatable with rows determined by sessionbean properties

    Is it possible to email a datable (a link for the datatable) with rows determined by sessionbean parameters? Even after the session expires the link should work. (That means the session properties should be embeded in the link)
    Thank you very much.

    I want to email search results from a database. The search is carried out by supplying some session properties. The search results are displayed in a datatable.
    The contents of the email can be the datatable itself or a link to the datatable.
    It should be assumed when the recipient see the email the session(used to do the search and send the email) will have expired. Bu till the recipient should be able to load the datatable by clicking the link.

  • How to create a datatable with row headers and column headers

    Hi,
    I am trying to create a two dimensional datatable which has both column headers and row headers. using <h:datatable> i could create a datatable with only column headers.
    Thanks in advance

    Are you saying that you want a column with only th's? You could also just apply some CSS on that specific column that its rows look like headers.

  • Command link from nested datatables

    I have nested datatables that work, but I need to be able execute an actionListener from a h:commandLink and reference the item that is being clicked. The example below works except that it always returns the items in the last category. So that if the 2nd item in the first category is clicked, the 2nd item of the last category is returned. I tried binding my dataTables to UIData objects on my managed bean so that I could call getRowData() but I cannot find a way to bind the embedded h:dataTable when I don't know how many to expect.
    Here is the code (stripped down for simplicity):
    <h:dataTable value="#{bean.categories}" var="category">
        <h:column>
            <h:outputText value="#{category.name}" styleClass="txtTitle"/>
            <h:dataTable value="#{category.items}" var="item">
                <h:column>
                    <h:commandLink actionListener="#{bean.activate}">
                        <h:outputText value="#{item.name}"/>
                        <f:param name="activate" value="#{item}"/>
                    </h:commandLink>
                </h:column>
            </h:dataTable>
        </h:column>
    </h:dataTable>
    =====================================================
    public class ManagedBean {
        private List categories;
        private Item activeItem;
        public void activate(ActionEvent e) {
            UICommand command = (UICommand)e.getComponent();
            List children = command.getChildren();
            for (Iterator i = children.iterator(); i.hasNext(); ) {
                UIComponent child = (UIComponent) i.next();
                if (child instanceof UIParameter) {
                    UIParameter param = (UIParameter)child;
                    if (param.getName().equals("activate")) {
                        this.activeItem = (Item)param.getValue();
                        break;
        public List getCategories() {
            return categories;
        public void setCategories(List categories) {
                this.categories = categories;
        public Item getActiveItem() {
            return activeItem;
        public void setActiveItem(item activeItem) {
                this.activeItem = activeItem;
    }

    bump

  • How to remove links from apple watch with link bracelet?

    Any idea? Will I be able to do it myself or I need to take it to apple shop to remove links to fit my wrist? Or its one size only?!

    open the strap at the clip.
    look inside of the strap and there are "buttons" on each link.
    press the button and carefully pull the link.
    repeat to get required size
    carefully put the two open ends together and press closed.
    done

  • DataTable - Read Rows Dynamically

    Hi ,
    Does anyone knows how to read rows from Datatable dynamically ?
    What I'm looking for is: a private function which a collection column names and datatable with rows and that function will return me back  the values of those functions with column names
    Bhupinder Singh

    Try something like this
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    DataTable table = new DataTable();
    table.Columns.Add("a", typeof(int));
    table.Columns.Add("b", typeof(int));
    table.Columns.Add("c", typeof(int));
    table.Rows.Add(new object[] { 1, 2, 3 });
    table.Rows.Add(new object[] { 4, 5, 6 });
    table.Rows.Add(new object[] { 7, 8, 9 });
    int numCols = table.Columns.Count;
    List<string> colNames = new List<string>();
    foreach (DataColumn col in table.Columns)
    colNames.Add(col.ColumnName);
    foreach (DataRow row in table.AsEnumerable())
    foreach (string colName in colNames)
    int cell = row.Field<int>(colName);
    jdweng

  • How to get selected values from datatable with paging

    hi all
    here is my problem
    I have a datatable with paging size of 2 and first column as checkbox.
    now i have total record of 5 data,2 row on each page.
    Now i m selecting 1-1 row from each page.
    When i m clicking Command button to display all the selected row from different page ,i m only able to display values selected from last page.
    Through debug i can see that only last page value is set to TRUE OR FALSE and every other value is neither true nor false.
    any help???
    thanks

    <f:facet name="footer">
    <h:panelGroup binding="#{Page1.groupPanel1}" id="groupPanel1"
    style="display: block; text-align: center" styleClass="list-paging-footer">
    <h:commandButton action="#{Page1.dataTable1_firstPageAction}" binding="#{Page1.dataTable1FooterFirstButton}" id="dataTable1FooterFirstButton" image="resources/paging_first.gif" immediate="true"/>
    <h:commandButton action="# Page1.dataTable1_previousPageAction}" binding="#{Page1.dataTable1FooterPreviousButton}"
    id="dataTable1FooterPreviousButton" image="resources/paging_previous.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_nextPageAction}" binding="#{Page1.dataTable1FooterNextButton}"
    id="dataTable1FooterNextButton" image="resources/paging_next.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_lastPageAction}" binding="#{Page1.dataTable1FooterLastButton}"
    id="dataTable1FooterLastButton" image="resources/paging_last.gif" immediate="true"/>
    </h:panelGroup>
    </f:facet>
    Above is the code which i m using for paging which is command button
    Any problem with it.???
    thanks

  • Selecting multiple rows from jsf datatable

    Hi
    i am working on jsf,ejb3.0 .my requirement is to select the multiple rows usng checkboxes from jsf datatable. i am workng on this for last two days. early response is appreciated.please hel me.
    Thanks
    KRamu

    Hi!
    You could enhance your collection item with a boolean. On your interface you then insert a checkbox column that you bind to the boolean property. on any given action you can go thru your collection and check which item has been selected. In case of doubt go to [http://balusc.blogspot.com/] -i'm sure you'll find some samples/tuts there.

  • Won't Open link from email it gives me the option to open but does nothing when I click that open box. This is a new problem my phone never had trouble with this before.

    When I try to open a link from an email it gives me a choice to open but when I choose open it won't! I used to be able to click right on a store or anything and it  would open connect to the store.  Very strange

    Hi
    It shows just 4 always as an option in the "open with" lsit. Also I haven't downloaded any apps for a while so why would it start now?
    Do you know how I can estabilsh how many apps are counting toward this 10 and what they are?

  • Safari keeps crashing every time I try to open a link from a different application, i.e. Mail. The trouble report says that some problem occurs with libcooliris.dylib plug-in. Can any one help?

    Safari keeps crashing every time I try to open a link from a different application, i.e. Mail. The trouble report says that some problem occurs with libcooliris.dylib plug-in. Can any one help?
    Thanks!

    Dear Linc,
    Thank you for the advice, John Blanchard1  and Linc Davis
    As suggested in your reference thread I removed "/Library/Printers/hp/PDEs/hpPostScriptPDE.plugin" and the problem has been resolved.
    I am guessing the the plug-in for the hp printers got corrupted and effected every thing, or became unsuitable when I installed an Apple update. I would be most grateful if you can confirm how the problem was coursed so I can understand and learn from this experiance.
    Ash

  • I have received an email from a friend with a link which I clicked. It directed me to the google home page and I am now suspicious that it is a virus  or a Trojan horse. I would know what to do on my PC but am new to Ipad. How can I check?

    I have received an email from a friend with a link which I clicked. It took me to the google home page. I am now suspicious that my friend's email account has been hijacked and the link contained a virus or a Trojan horse. I would know what to do on my PC but am new to the IPad. Can any form of Trojan horse be planted on IOS 6 or am I worrying unnecessarily? Reassurance would be most welcome as I do use the IPad for checking bank details and web purchases. Thanks for any help.

    PC virus won't run on iPad.

  • How can i link my E-mail with my iPad in a way that i can delete my messages from my email inbox server not from my iPad inbox only?

    How can i link my E-mail with my iPad in a way that i can delete my messages from my email inbox server also not from my iPad inbox only?
    Because when i delete emails from my iPad inbox, it will be deleted on my iPad only but when i check my email inbox server from the browser its not deleted!
    So how can i set up this link so when i delete any email from my iPad it will be deleted from my email inbox server also?

    Hi Pierrot10,
    Insert your backup disc (or plug your external hd), then open Mail.
    In the File menu, click *Import Mailboxes* and follow the steps for a *Mail for Mac OS X* transfer.
    Navigate to your CD/DVD's or external HD's backup and hit "OK".
    This should create a new "Imported" folder in Mail with all your old messages in it, that you can then rearrange as you wish, creating new mailboxes etc.
    Axel

  • Problem with using database link from oracle 7 to oracle 9i

    Hi To Every One
    I have two oracle database oracle 7.3.4.0.1 and oracle 9i 9.2.0.1.0.
    and the tns alias to connect to oracle 9i database is oracle9i and tns
    alias to oracle 7 database is oracle7.I have no problem in connect to
    these database using these tns aliases from either database.The tns
    alias for oracle 7 is available in tnsnames.ora file of oracle9i and
    tns alias for oracle 9i is available in tnsnames.ora file of oracle 7.
    So there is no connection problem from each other.Connection is
    working fine for each other but the problem with database links is
    like this
    Problem:
    when i create database link from oracle9i user or public database link
    from oracle9i for oracle7 user like this
    SQL ORACLE9I >CREATE DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
    IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
    OR
    SQL ORACLE9I >CREATE PUBLIC DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
    IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
    The links get created sucessfully but when i write command like
    SQL ORACLE9I> DESC <ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7
    I RECEIVE A ORACLE ERROR LIKE
    ORA-12663 SERVICE REQUIRED BY CLIENT IS NOT AVAILABLE ON THE SERVER.
    OR IF MY COMMAND IS LIKE
    SQL ORACLE9I> SELECT <FEILD_NAME> FROM
    <ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7;
    I RECEIVE AN ORACLE ERROR LIKE
    ORA-01002 FETCH OUT OF SEQUENCE.
    ORA-02063: preceding line from ORACLE7
    BUT IF I CREATE A LINK FROM ORACLE7 USER FOR ORACLE9I USER
    IT WORKS FINE.
    PLZ HELP ME WHAT IS THE PROBLEM THAT THE LINK FOR ORACLE 7 IS NOT WORKING WHEN
    IT IS BEING CREATED FROM ORACLE9I.
    Thank u.

    Oracle 9.2.0 does not support connectivity to Oracle 7. The newest version that will support this is 9.0.1.

  • Open an IE browser with link from ABAP code

    How to open an IE browser in separate window with dynamic link from ABAP code. The IE should open in a separate window.
    Eg:
    strHttpLink = 'http://www.xxss.com'.
    open IE browser using strHttpLink.

    Hi,
    have a look at this:
    http://www.erpgenie.com/abap/controls/htmlviewer.htm
    Best regards.

  • Issue with opening PDF file link from Safari

    Hi Everyone,
    I got a problem with opening PDF file link from Safari 4.04. Instead of getting a normal pdf content, it shows some weird characters. Not sure it is something wrong with Adobe Reader Plugin or Safari?
    I have uploaded a screenshot of the issue in the adobe forum (http://forums.adobe.com/thread/531870). Please help!
    Many Thanks,
    John

    There's nothing wrong, except the fact that you have Adobe Reader installed. You don't need it, so get rid of it; it will only cause problems with Safari. What you're seeing is the contents of the PDF file, rather than having it displayed.
    If you want to download a PDF file, you can either Control-click on the link and choose "Download Linked File As…", or you can Option-click on the link for the file and it will be downloaded to your Download folder (usually your Desktop).
    If you want to view a PDF file in Safari, you don't need Adobe Reader; Safari is perfectly capable of doing this by itself and has been for years. Adobe Reader will only get in the way and slow everything down.

Maybe you are looking for