JSP Data table - Rendering for command buttons.

Hi All,
We are designing a JSP page where results from table have to be thrown on a data table. (h:dataTable)
Based on one column value on the data table, we need to render a command button for each row of data table.
For example, I select the employees from a table and throw it on data table.
Only for those employees where address is not present, I need to enable an "Update address" command button.
(Command button "Update address" is also part of data table.)
Is it possible to accomplish this on a data table?
If so how should we code the "rendered" tag of the command button in data table.
Any help would be greatly appreciated.
Thanks.

Sounds like the JSF forum would be a closer alignment, but in general
- retrieve your information from the database into a list of Employee beans.
- Have your h:dataTable use the list of Employee beans as a datasource
- have the rendered attribute of your update button depend on the value of employee.address maybe #{empty employee.address}
cheers,
evnafets

Similar Messages

  • Authorization object for Command Button

    Hi all,
    How can I create the Authorization object for command button which is on application server.
    if you do not have auth when you click on that command button, it should be say 'you dont have auth'.
    please help me in this.
    regards,
    Ajay reddy

    Hi,
    Tcode for Authorization Objects are,
    su20----> for defineing authorization field ,
    su21-----> for authorization class,
    su22------> for assignement authorization object
    To create an authorization object:
    1) Execute transaction SU21
    2) Double-click an Object Class to select a class that should contain
    your new auth object
    3) Click on CREATE (F5)
    4) (If creating custom field) - Click the 'Field Maintenance' button -->
    Click on CREATE (Shift+F1)
    5) Enter the Name for the New Authorization field and the corresponding
    Data Element and SAVE
    6) Confirm the Change Request data for the new Authorization Field
    7) Go back two screens (F3-->F3)
    8) Enter the Authorization field name and document the object:
    9) SAVE and ACTIVATE the documentation
    10) Save the new Authorization Object
    11) Confirm the change request data for the Authorization Object and
    EXIT SU21
    12) Finally, the SAP_ALL profile must be re-generated
    Regards,
    hema.

  • Dynamic Text preparation for Command button in ADF (Tr component)

    We have one command link and our requirement is to preapre the command button text dynamicaly .?
    Details are givin below :
    I need to get the button text value form the UCMS file based on the dynamic preparation .
    The key value of UCMS is "setupfamily_group_1-8FAM4".
    In the above mentioned key value the part 1 is "*setupfamily_group*_" is static text and part 2 "*1-8FAM4*" is dynamic which i will get throuth the List of Objects.
    i.e managedServices.product.productId. here managedSercies is varible contains the Objects from the list.
    please let me know how to append the part1 and part 2 as mentioned above in Command button text field ?
    <tr:forEach items="#{pageFlowScope.myExtrasBean.managedServicesExtras}"
    var="managedServices">
    <tr:commandButton text="#{myExtrasBundle.setupfamily_group_+#managedServices.product.productId}" id="setup_service"
    actionListener="#{pageFlowScope.myExtrasBean.manageMyFamilyProducts}"
    action="vfFamilyFlow">
    <f:attribute name="productId" value="#{managedServices.product.productId}"/>
    </tr:commandButton>
    </forEach>
    We not getting how to append the Static and dynamic text for command button text filed ? pleas let me know the syntax .
    Thanks

    HI
    We have tried with above both options .its issues not resolved .
    for the first one we are getting the compile time error
    and for the second option ,when we run the dynamic value its self printing in the JSF .
    We are trying to prepare the command button text as some part dynamically and some part static and its will act as key in the XML and get the corresponding value from the UCMS .
    Thanks

  • Authorization grpup for Command Button

    Hi all,
    I am keeping the one command button name is EMAIl in application tool bar. I want to create auth group those who have auth to execute this Email button .
    For other users this command should be not seen. only auth users to see this button.
    How can i create authgroup for command button.
    regards,
    Ajay

    Hi,
    when the report is started check for authority for the user to execute the transaction.
    like:
    AUTHORITY-CHECK OBJECT auth_obj [FOR USER user]
                            ID id1 {FIELD val1}|DUMMY
                           [ID id2 {FIELD val2}|DUMMY]
                           [ID id10 {FIELD val10}|DUMMY].
    if this authority check fails:
    set pf-status <ur pf status> excluding <function code for command button>.
    Regards,
    Renjith Michael.

  • Data block's table layout complicate command button?

    Why after I create a data block's layout using table format,
    when I try to insert a command button into the canvas, the
    button always appear like a concatenated buttons (i.e. if I have
    5 rows in the tabular format for displaying the data block, my
    command button becomes 5 buttons glued side by side together)?
    Advice, anyone?

    Hello Andy,
    See, when you are attaching a command button to the data block
    you created to show 5 rows, its definitely going to show you 5
    buttons in a stack manner.
    There are two ways to show one button.
    1> You should create a control block (non base table) in the
    form and attach the button there. Rows displayed property of
    this block should be 1.
    2> Open the property palette of the button in the data block.
    Change the value of "No. of Items displayed property" to 1.
    Hope this will solve your problem.
    Wishes,
    Anindya

  • Data View with customized command buttons

    I would like to show data from a table in browse window and place customized command buttons such as search key, filter, etc.
    Please advise.

    What you describe is a form. And you don't want a browse window, but a grid inside this form. The only thing you set in a grid in the first degree is the recordsource, and then it will display the same data view as a browse.
    The rest of your idea can be placed into the same form as controls, textboxes, buttons, etc. and you might make use of the idea sketched by Alaa Mukhtar.
    In the second degree, right click on controls you put on a form while designing it with the form designer, and you can get a help via a builder you get offered in the context menu.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH
    http://www.tmn-systemberatung.de

  • Strange caching on a paging enabled data table when sql-command changes

    Got some strange results when changing the command property of a JdbcRowSetXImpl. To reproduce:
    - create new jsp page
    - drag a table from Data Sources onto the page design grid
    - put a DataTable on the page design grid
    - bind DataTable to the RowSet for the table from step 2
    - enable paging on the DataTable; make sure the page is smaller than the number of items in the table. Also add the page navigation buttons
    - add a read-write property 'query' to SessionBean1
    - add a button to the page design grid
    - double click button and add
    getSessionBean1().setQuery("SELECT * FROM <table> ORDER BY <someColumnName>"); // replace <> strings with appropriate names
    - change the command property / query string for the table in the page backing bean to getSessionBean1().getQuery();
    - run application
    - click on button with query change code 'behind it'
    - click on '->' next page button
    - click on '<-' previous page button
    Notice that one page is sorted, the other not. All pages that have been displayed before the 'query change' button was pressed remain in the 'old' sort order.
    I have tried to call xxxRowSet.execute(), dataTable1Model.getDataCache().reset() on several places, to no avail.
    The only hack I found to be working was adding a private static int hackCounter, and changing the ctor to dataTable1Model.setDataCacheKey("com.sun.datacache.bug.xxxRowSet" + hackCounter++);
    Clearly there must be a better solution.

    did u try dataTable1Model.execute();
    you didn't mention that you did.
    I have had datatables that didn't update only to find I didn't do dataTable1Model.execute();
    Regards
    Jonathan

  • Custom renderer for radio buttons?

    I want to change how radio buttons are rendered (so they aren't all rendered alone in their own table). What would be the best way to do this?
    One way would be to create a custom component, tag handler, and renderer (and register them all in faces-config.xml).
    But what about using the existing JSF components and just writing my own renderer. Could that work? Would just need to write a renderer and configure faces-config.xml to use the appropriate component-family (for the existing JSF radio button component) and renderer-type (for the existing component tag class for the radio button)�.like this:
    <render-kit>
    <renderer>
    <component-family>javax.faces.SelectOne</component-family>
    <renderer-type>javax.faces.Radio</renderer-type>
    <renderer-class>my.custom.renderer</renderer-class>
    </renderer>
    </render-kit>
    Could this work?
    Thanks.

    Could this work?Yes. Why do you doubt it?

  • Data loss popup for cancel button on overview page

    Hi Experts,
    Data loss popup generally appears on UI, when i try to navigate with out saving the changes. This is a standard SAP behaviour.
    But, i come across the requirement where this data loss popup should also appear on clicking the 'Cancel' button on overview page on UI.
    I understood that, this popup will be triggered by the methods ON_BEFORE_WA_CONTENT_CHANGE & IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT of the window impl class.
    Please suggest how can i make this popup work in case of Cancel button as well.
    Thanks....

    Hi bkvs,
    Usually when you click the "Cancel" button that means you don't want to save your entry... hence displaying the dataloss popup doesn't make really sense to me. However, you may want the user to confirm that he really wants to cancel.
    So I would suggest to redefine the EH_ON_CANCEL method of your view, to display a simple confirmation popup before you actually cancel everything. This wiki will show you how to do it:
    Creating popup message in webclient UI - CRM - SCN Wiki
    Regards,
    Nicolas.

  • Master data table name for background jobs...

    Hi Friends,
    can any body pl tell me the table name, where I can see all the background jobs which have been created till date.
    Thanks,
    Hardik

    hi,
    please check table TBTCP ,TBTCO
    Regards
    Suresh.

  • IE table rendering issues. Any ideas how to eliminate extra cell spacing rendered by IE

    I have a problem with IE 9 rendering a table. This particular page has a larger table rendered for an application.
        1. I have disabled all CSS on the site (its strictly in the table render on the site)
        2. Removed as much spacing as possible in the RAZOR view of the application to try to eliminate whitespace issue in code  
        3. Ensured that there are no extra characters in the text (from the DB) so stripping out anything that is non alphanumeric.
    When IE renders this site note that there is not any extra table elemnents missing there are closing tags on all elements and no syntatical issues.
    I have seen other sites with this issue in IE 9 on Windows 7.
    A table is not ideal here but that is how it was written.
    (Since I don't see an e-mail or anything to verify my account here is a "non-link" to my screenshot of an example)
    i.imgur.com/av8FCZL.png
    Does anyone know how to solve this issue in IE? Also is a side by side of other browser results.

    Thanks Rob for the reply,
    The page passes validation. The CSS was only disabled on the site to determine if it was causing my spacing issue on the table. Initally the CSS was the suspect, but it was eliminated by only showing the raw table element with the same behavior in the browser.
    I will need to convert the table to CSS style or another format (probably a JQuery UI Data Table would be more appropriate in my case)... In any event  I inherited this site so I have not had the time to change the tables out yet. (That was the first
    thing out of my mouth when I reviewed the application was proposing not to use the HTML tables tag for that data). 
    Interestingly enough I can kid of remedy the behavior in IE if I remove line spaces from my Razor view so maybe IE is interpreting the spacing rendered by the Razor view on the table strangely from the code output? I did find a post with another person having
    a similar problem rendering large tables in razor view and they solved the issue by removing line spacing inside of the chtml file.  
    In any case this solves it for the time being... not an ideal solution but a workable one until the table view can be converted to a better format for such a large table. 

  • How to update a single row of data table

    How we can update a single row of the data table by clicking the button in the same row.
    Thanks in Advance.

    Hi!
    What do You mean 'update'? Get fresh data from DB or change data and commit it in DB?
    If commit, try to read here:
    http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Thanks,
    Roman.

  • Jdeveloper11g:  hover in command button

    i'm developing a web application with ADF Faces and want to disable a button hover effect & i' want to override this method through my css .

    I'm using a command button with background image (my image is pentagon) & text,when i put cursor into button ,that image replace into square box with aqua background-color, which i doesn't want.
    for resolving this problem i want to override the inbuilt commandButton hover method.But i can't find that method.
    in css3.0 i only get
    af|commandButton:highlighted &
    af|commandButton:highlight but not any hover method for command button.
    if i'm using command image link. my background- image is not proper fit into that component & my another images (when i'm using to page, that will be lost).
    my problem is still not resolve.by using button or image link

  • ADF Table - Command buttons disappear when no rows returned for table

    We have a command button that navigates to a create screen, when the table returns no rows the button disappears. We need to have this displayed always and within the ADF table. The code looks like:
    <f:facet name="selection">
    <af:tableSelectOne text=""
    binding="#{Search.tableSelectOne1}"
    id="tableSelectOne1">
    <af:commandButton actionListener="#
    bindings.ExecuteWithParams1.execute}"
    text="Edit n"
    action="edit"
    binding="#{SearchCtgry.commandButton3}"
    id="commandButton3">
    <af:setActionListener from="#{row.Code}"
    to="#{processScope.toCode}"/>
    </af:commandButton>
    </af:tableSelectOne>
    </f:facet>

    try placing the command button within the "actions" facet of the table. It will place it above the actual rows of the table. You could also use the "header" facet.
    <af:tableSelectOne text=""
    binding="#{Search.tableSelectOne1}"
    id="tableSelectOne1">
    <f:facet name="actions">
    <af:commandButton actionListener="#
    bindings.ExecuteWithParams1.execute}"
    text="Edit n"
    action="edit"
    binding="#{SearchCtgry.commandButton3}"
    id="commandButton3">
    <af:setActionListener from="#{row.Code}"
    to="#{processScope.toCode}"/>
    </af:commandButton>
    </f:facet>
    </af:tableSelectOne>

  • Composite clients:  include command button inside data table

    Directly placing the command button into the datatable does work. However, I'd like to move it outside to another file and then include it. What's the best approach, to use ui:include? Is there a better approach?
    I'd like to have datatable.xhmtl and deletebutton.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    template="./beatlesTemplate.xhtml">
        <ui:define name="content">
            <h:dataTable value="#{beatles.list}"  var="beatle">
                <h:column>
                    <ui:include src="deleteButton.xhtml"/>
                </h:column>
                <h:column>
                     <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" />
                </h:column>
                <h:column>
                    <h:outputText value="#{beatle.title}"/>
                </h:column>
                <h:column>
                    <h:outputText value="#{beatle.comments}"/>
                </h:column>
            </h:dataTable>
        </ui:define>
    </ui:composition>
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    template="./beatlesTemplate.xhtml">
        <ui:define name="deleteButton">
            <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" />
        </ui:define>
    </ui:composition>

    RaymondDeCampo wrote:
    Your approach seems reasonable, did it work when you tried it?No, it didn't. Pardon, I don't have more information on that, but will come back to the topic later (probably on the mailing list, which I prefer.)

Maybe you are looking for