Using javascript to detect the onclick event over a datatable row

Hi all,
I'm working with JSF 1.2 R.I. and I would like to add some javascript to my datatable to be able to control the onclick event on a row.
At the moment I have just added a checkbox to be able to know which row the user wants to select but I'm not satisfied with this solution.
<h:dataTable
value="#{person_iupopulations_Observation.customer}" var="customer"
rowClasses="evenRow,oddRow"
cellspacing="0">
<h:column>
<f:facet name="header">
<h:outputText value="Select" />
</f:facet>
<h:selectBooleanCheckbox value="" onclick="getRow(this)">
</h:selectBooleanCheckbox>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{customer.Name}"></h:outputText>
</h:column>
</h:dataTable>
What I would like to achieve is:
When the user clicks the row (wherever, not only the checkbox) the checkbox changes to the new value depending, off course, on the user's selection.
For this purpose I would need to add the onclick event to every row and associate it to a javascript function to update the checkbox.
Can anybody help me please.
I appreciate any suggestion.
Thanks in advance!

I am looking for answers on how to use javascript to detect the onclick event over a datatable row . I have a selectBooleanCheckBox in one of the columns in the every row in the table. On click of the checkbox in any row of the table, I want to get some values from the selected row and also verify that the rest of the checkboxes in all the other columns are unchecked. I want to do this using javascript. If any of you have answers, please repsond. Thanks.

Similar Messages

  • Using JavaScript to remove the loading overlay?

    Is there a way to remove the loading overlay. It appears to block events.
    I want that if the slide hasn't loaded within say, 30 seconds, then present the user with a message to go to next slide or wait.
    Is this possible?
    Thanks for any help anyone can be.

    I am looking for answers on how to use javascript to detect the onclick event over a datatable row . I have a selectBooleanCheckBox in one of the columns in the every row in the table. On click of the checkbox in any row of the table, I want to get some values from the selected row and also verify that the rest of the checkboxes in all the other columns are unchecked. I want to do this using javascript. If any of you have answers, please repsond. Thanks.

  • Using javascript to detect JVM

    Hi all.
    I'm trying to use javascript to detect whether the JVM (either j2sdk or j2ee) has been installed and take the user to SUN web page if not.
    The original MS JVM is not useable for my purposes (does anyone use it?).
    I know how to detect browsers and plug-ins but not JVM.
    Can anyone help out please ?
    TIA :-)

    If you use the classid and codebase attributes of the <object and <embed tags, it will download automatically. Easiest is to use HTMLConverter. You can change codebase to point to somewhere on your network if not everyone has internet access. See [url http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/using_tags.html]here

  • Detecting the send event in Outlook addin

    I'm trying to write an Outlook AddIn app in C# using Visual Studio 2012.  I need to detect when the send button is clicked in a current email.  I'll want to perform some actions after the send button has been clicked.   
    I assume an event handler needs to be created, but I'm not sure where- at the item level, or application level.  I created a mail item object with Outlook.MailItem publicItem = (Outlook.MailItem).this.OutlookItem.  It seems like I should be detecting
    publicItem.send but I'm not clear on how and where to use event handlers in this case.  
    I added a checkbox, and Visual Studio created publicCheckBox_Changed(object sender, EventArgs e) for me.  To check if the box was checked, I used  'if(publicCheckBox.checked) { do stuff }.   Is detecting the send event similar? 
    I'm new to c# and Outlook Addins, and fairly new to coding.  
    Thanks for your help. 
    Wayne

    Hello Wayne,
    In the check box Clicked event you can add a user property to the MailItem (see UserProperties.Add). Then in the ItemSend event ( see the Application class) handler you can check out the property value - whether it is set or not. Be aware, the Cancel parameter
    passed to ItemSend event handler allows to prevent the item from sending.

  • How to supress the onClick event?

    Hi, is it possible to Supress an onClick event from an htmlb extension object?
    i want to add a confirm message in javascript.
    if the user select 'no' the form should not be sended.
    i thought about add a onClientClick handler and supress or initiiate the onClick event there.
    is this possible, or btw. is this a good solution?
    Message was edited by:
            Grafl Ronald

    Here you go..
    <%@page language="abap" %>
    <%@extension name="zhtmlb" prefix="zhtmlb" %>
    <script language="JavaScript" type="text/javascript">
    function WindowOpenPopup(buttontype) {
    if (buttontype == "A") {
    Check = confirm("Do you really want to approve the requisition items?");
    if (Check == true) {
    htmlbSL(this,2,'ButtonReject:PRApprove');
    </script>
    <zhtmlb:content design="design2003" >
      <zhtmlb:page title="Query flight data " >
        <zhtmlb:form>
          <zhtmlb:button id            = "ButtonApprove"
                        text          = "Approve"
                        design        = "Emphasized"
                        tooltip       = "Approve PReq"
                        encode        = "FALSE"
                        onClientClick = "javascript:WindowOpenPopup('A');" />
        </zhtmlb:form>
      </zhtmlb:page>
    </zhtmlb:content>
    Raja T

  • TS2771 i was using an app while the battery ran over, then when i recharged my ipod, i can no longer open that app anymore. Why?

    i was using an app while the battery ran over, then when i recharged my ipod, i can no longer open that app anymore. Why?

    No idea why.
    What have you tried to solve?
    Have you tried the basics from the manual?
    restart, reset, restore.
    Have you tried removing the app, tehn adding it back?

  • Using javascript to change the "Overall Result" cell in WAD

    Hi experts,
    I am trying to use javascript to change the text of the "Overall Result" cell in my web template using BI 7.0. I am not familiar with javascript, but I this is what I have done so far.
    I dragged the web item "Script" into my web template and I inserted the following code:
    function change_overall_result_to_average() {
    var cell = document.getElementsByTagName("TD");
    var cellText;
    for (i = 0; i < cell.length; i++)
          cellText = cell<i>.innerText;
               if (cellText == "Overall Result")
                     cell<i>.innerText = "Average";               
    In the XHTML view I am using added the onload function to start the javascript every time the web template is loaded. The code works fine when the web template is first loaded and the cell text is changed to "Average". However, if I navigate in my web template, the javascript function is not triggered, and the cell is therefore changed back to "Overall Result". For example, this happens when I pick another selection from one of my dropdown boxes, such as changing the selection from year 2008 to year 2007.
    I don't really know how to solve this problem in an easy way, and the current solution is not good enough. I hope one of you guys can suggest an easy way of fixing this:-)
    Best Regards,
    Morten

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • How to call  a javascript method after the PPR event has finished  ?

    Hi!
    How can we make a javascript method get called after the processing of ADF PPR event?
    My specific use case is,
    I want to call a javascript function after the data in the table is loaded...
    In 10g, that is not a problem, as the data used to get loaded directly during onLoad, and so i would call my js function on load;
    but in 11g , the table data is being loaded through PPR which is initiated onload, and so i needed to call my function after the PPR Response processing has been done; for which I need the name of the event triggered at that instance.
    Is it possible to do this?
    Regards,
    Samba

    Hey, I got it.
    I handled the ADF Controller's PREPARE_RENDER_ID phase of the lifecycle, and then called the
    script to get Executed.
    The code :
        public void afterPhase(PagePhaseEvent pagePhaseEvent) {
            FacesPageLifecycleContext ctx = (FacesPageLifecycleContext)pagePhaseEvent.getLifecycleContext();
                 if (pagePhaseEvent.getPhaseId() == Lifecycle.PREPARE_RENDER_ID) {
                    if(AdfFacesContext.getCurrentInstance().isPostback() )
                        afterRender();
        }is written in lifecycle listener , and my backing bean extended this listener ,
    and in the afterRender() method I did this :
       public void  afterRender(){
                System.out.println("AFTER RENDER CALLED");
               FacesContext context = FacesContext.getCurrentInstance();
               ExtendedRenderKitService service = (ExtendedRenderKitService)Service.getRenderKitService(context, ExtendedRenderKitService.class);
               service.addScript(context, "translate();");
           }That's it.
    It did work, magnificently.
    Thanks for the idea.
    Regards,
    Samba

  • Using javascript to control the browser

    Hi all,
    One of the most requested features on our first Breeze
    project was a "quit" button. The easiest way to do so in an HTML
    environment is to use the command
    javascript: window.close();
    Type this into the address bar on your browser, and hit
    return. Isn't that neat?
    Okay, the scripting language in Flash (Actionscript) can
    simulate typing something in the address bar with the command
    getURL ("javascript: window.close();");
    ...all we have to do is add that actionscript to the
    onRelease event handler for a button in Flash. Then, add the button
    to your PowerPoint before you use Presenter, and when the student
    clicks it... voila!
    This same trick can be used to replace that MacroDobe©
    logo in the Breeze player. This time, when the user clicks the
    button, we'll use javascript to pop up an alert box with a clever
    message:
    getURL ("javascript: alert('Aren't we clever?');";
    This button has to be small, around 50 x 29 pixels, to
    properly replace the logo. To actually replace it, you need to
    publish your presentation to the hard drive like normal. Next, find
    the folder you published to, and place a copy of your "button.swf"
    file in the "data" subfolder. Then, edit (don't "open") the
    vconfig.xml file in the same subfolder using notepad. Near the top,
    you'll find an entry that says:
    <uireplace name="logo" value= "" />
    place the name of your button file between the quotation
    marks and save:
    <uireplace name="logo" value= "button.swf" />
    When you load up the training next time, the logo will have
    changed to your button.
    You'll have to do this every time you publish the training,
    as Presenter deletes & recreates all those subfolders each time
    you do. BTW, MacroDobe© does offer a small applet to parse
    this xml file for you... but they want 5 grand per copy. I'm
    thinking notepad works just as well :)
    cheers!
    Marc B

    The biggest difficulty with a Swing Applet is that it needs the latest version of the JVM to run and many people don't have this installed on their PC. You can set the Aplet tags to download the plug-in but it can discourage users and may not always work. I would only use a Swing Applet for webapps with a limited client base.

  • Catch the onClick event on Interactive Report to access columns content

    Hi,
    I am using Apex 4
    I would like to display some rows into an interactive report. I have define a dynamic action on that report in order to catch the Mouse OnClick Event.
    The Goal is to display the detail of the row in a form region in the sidebar.
    To do this, I would like to get the content of a column of the row clicked and then execute a pl/sql block to get the detail of my row.
    I am stuck to get the content of the column I have clicked within the dynamic action to pass it to execute the pl/sql block.
    Any idee?
    Many thanks
    jko
    Edited by: user617942 on 29-Jul-2010 04:19

    Hello,
    Did I ask something stupid :-)
    Jko
    Edited by: user617942 on 29-Jul-2010 04:19
    Edited by: user617942 on 29-Jul-2010 08:34

  • It possible using javascript to change the value of another jsf text field?

    In my case, I have an input text field and would like to copy it's value on the onchange() event into another text field. Using the destination text field's Id and assigning some content with it's .value property

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • In FCPX, how do I use multiple clips of the same event?

    This is a beginner question, but having recently moved from Final Cut Express to FCPX, I am having trouble using 3 clips (church play, 3 cameras) of the same event (and reading through the manual has not helped me). I have lined them up in the timeline, one "on top" of the other, but the viewer only shows the top clip. I would like to see what the other clips look like and use the cutting tool and opacity (which I found) to choose the best view (and move between the clips lined up with the audio). It feels like I am trying to use an old work flow on a new product. How do I view the all the clips and move between them?

    Here is one of those free tutorials (in two parts), which , IMO, is particularly good.
    There is also, of course, more comprehensive paid training available that may better fit your needs.
    Good luck.
    Russ

  • Using JavaScript to extend the height of a DIV to the height of a document or page.

    Hello everyone,
    How can I use JavaScript to dynamically resize a DIV on a page so that the div extends vertically to the size of the page or document.
    I have been experimenting all evening with different methods, some don't even work.
    Thanks everyone!
    WE

    Thanks for responding, I'll gladly explain further, hopefully you can help me.
    I have a DIV on the right side of the page (sidebar) it has very little content and does not extend to the botom of the page.
    However, I have another DIV with text that extend further down the page.
    What I am trying to do is have the sidebar extend to the bottom of the page or window height.
    This way as more text is place in the other DIV and the page stretches down, the sidebar stays extend at the bottom.
    I know the CSS method but I would like to experiment with JavaScript.
    I want to be the cook with many knives!
    Thanks for helping!
    WE
    garywpaul wrote:
    I'm not sure I understand you question. It sounds to me like you want div columns to match in size regarless of content amount?  If that is the case, you want to use faux columns.
    Read about it here:
    http://www.paulgdesigns.com/faux-columns.php
    If I am not understanding you, post back.
    gary

  • Using javascript to resize the window

    I've got a project that I would like to resize depending on which slide the learner is viewing.
    I' aware that the javascript method:
    window.resizeTo(width,height)
    can be used to resize a window.
    In my case I want it to be for the tall window:
    window.resizeTo(1016,650)
    and for the short window;
    window.resizeTo(1016,165)
    I'm also aware that you can tell a button (or anything else) to execute javascript.
    I'm having trouble making it work, tough.
    I've tried putting the method directly into the Script_Window for the button.
    I've tried writing a function in the published file, then having the button call that function.
    Can you paste javascript snippets into the Script_Window? Or do you need go the whole 9 yards and write the entire function, name the button instance, and tell the Captivate button to call that function?
    I'm just now sure how much Captivate knows how to do and how much I need to tell it.
    Thanks in advance!
    Joe           

    Thanks for your response, Jim.
    My window was created by a previous window using the code:
    <script language="JavaScript">
    function newWindow() {
    TheNewWin = window.open("main.htm","newWin","status=no,resizable=yes,left=0,top=0,width=1014,height=6 50");
    TheNewWin.focus()
    </script>
    I tried the code above in the ScriptWindow of a Captivate button (running in a Captivate SWF in the new window). It didn't work.
    I also tried:
    TheNewWin.resizeTo(1016,165);
    and
    newWin.resizeTo(1016,165);
    neither of which worked.
    Any other guidance would be appreciated.

  • How to use Javascript array in the JSP

    hELLO Friends,
    I am creating an String array using the values
    in the list of a jsp page using Java script..
    How can I use this array in the same jsp
    file for processing...
    any help in this regard would be highly appreciated.
    thanks in Advance...
    ashish

    you cannot pass values from javascript to JSP without having to form-post to another JSP page.

Maybe you are looking for