h:htmlCommandLink and onclick

Is it possible that <h:htmlCommandLink> haven't onclick attribute
What is reason (myfaces accept this tag) ?
regards
Haris Peco

Note, JSF 1.2 spec does accept onclick for commandLinks - see https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=71 and http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/renderkitdocs/HTML_BASIC/javax.faces.Commandjavax.faces.Link.html. Just remember to have the onclick JavaScript return true if you want the form to actually get submitted.

Similar Messages

  • Map Builder SVG onmouseover and onclick

    Hi,
    I'd like to know more about these functions in Map Builder.
    I'd like to be able to change the color of a marker using onmouseover,
    and select that marker by using onclick. Any info. would help.
    Thanks,
    Marlene

    Hi Marlene,
    these theme attributes (onmouseover and onclick) are to be used when you have an application with MapViewer that generates a SVG map. They define the method to call on your application script. MapBuilder does not generate SVG maps. You can fill these parameters with some name, and save the predefined theme. Then you need to develop an application code for SVG implementing these methods. After you deploy MapViewer kit, you should find on the MapViewer web page some demos including SVG.
    Joao

  • Reverse action and onclick on commandButton.

    Hi, my question is about this:
    In jspx.
    <af:commandButton text="Report" blocking="false"
    action="#{myOwnBean.report_Action}"
    onclick="#{myOwnBean.chainWeb}"/>
    I want execute action first, and then onclick in second place.
    Are there some way to do this? And, how is this done?
    Please, if you could give me some examples.
    Thank you very much.
    In myOwnBean. It changes "chainWeb", the chain may vary, that's why I want to do the opposite.
    private String chainWeb;
    public void report_Action() {
    // In this place I want create a set of dynamic URLs.
    chainWeb="window.open(\"http://www.google.com\" , \"window1\" , \"width=120,height=300,scrollbars=NO\");window.open(\"http://www.oracle.com\" , \"window2\" , \"width=120,height=300,scrollbars=NO\");parent.parent.close();";
    }

    What about this?:
    <af:commandButton text="Report" blocking="false" onclick="#{myOwnBean.chainWeb}"/>Then in the bean do this?:
    public MyOwnBean {
      private String chainWeb;
      public String getChainWeb() {
        chainWeb = "window.open(\"http://www.google.com\" , \"window1\" , \"width=120,height=300,scrollbars=NO\");window.open(\"http://www.oracle.com\" , \"window2\" , \"width=120,height=300,scrollbars=NO\");parent.parent.close();"
        // or alternatively call any other bean code to work out what you want to set chainWeb to.
        return chainWeb;
    }... in that manner the work done by your original report_action method is done in the getChainWeb method. Is that suitable?
    As you know the action attribute of the commandButton is designed for returning navigation rules as calculated on the server after the user submits the page back to the midtier. In turn onclick is a client side JavaScript event and will always fire in the browser before the action attribute is processed by the mid-tier.
    A further issue I see is that the EL expression for the onclick JavaScript attribute will be evaluated when the page is fetched, not when the user onclicks. As such if you want the result of chainWeb to be dependent on values on the current screen, you'll need to know how to extract them in your JavaScript from the DOM, as separate to fetching them from a bean or binding component.
    CM.

  • Cfselect and onClick

    I have a cfselect statement whit the following options.
    "Select" "Men" "Women" "Boys" "Girls" "Infants".
    it is defaulted to "Select" but the user must select one of
    the other options to continue.
    What I want is to be able to include an onClick in the select
    statment to display the rest of the page. because depending on
    which option you take, the rest of the page will be different.
    Ex if the user selects "Men" - there are 4 more questions
    regarding men, if "Women" is selected, 7 questions regarding women
    so on and so forth....
    I know i can do it by forwarding the user to another page but
    I would like to embed it all in the same page...
    Thanks in advance
    Craig

    For what you want to achieve, it's going to be tough. You
    might be able to figure something out with inner html.
    I had a similar problem once and solved it with two forms. In
    my case checking or unchecking a checkbox would determine what form
    was visible.

  • JDev 9.0.3. : JBO Event and "OnClick" attribute" can work together ?

    Hi,
    I've a JSP page developed by JDeveloper 9.0.3, with a checkbox item:
    <input name="pluto" type="checkbox" value="1" onClick="" />
    I need to execute some transactions on db everytime "pluto" is checked or uncheked. I'd like to handle this by a JBO Event, is it possible?
    I know that I could use javascript to handle the "OnClick" event, but how can execute insert statement on db using the same connection already defined in my JSP application?
    Thanks in advance.
    Nunzio

    Repost

  • Is possible to use href= and onclick=Ajax.request to track outgoing link?

    Hi,
    I´m new in Oracle Apex and i'm trying now to track outgoing links on my Apex 3.2.1 application.
    When the user clicks on a link of my application that redirects to an outgoing site, I want them to be taken to the site (href) and I also want a background script that register in a oracle table this "click".
    For example, i have this link in an APEX page:
    When user cliks in this link, i would like to execute in background an oracle procedure, with a parameter. Let´s call this procedure, for example:
    SP_REGISTRA_ACESS_LINK(:P19_COD_TOPICO).
    This procedure insert a record in a table called BAC_ACESS, storing in it the SYSDATE and the value of ":P19_COD_TOPICO".
    Is it possible to link to a new site and call an AJAX request at the same time?
    Could some one give me a example of how i can do it? How i can implement it in my Apex 3.2.1 application?
    I´m working with Apex 3.2.1 and RDBMS 9i. I can not upgrade none of these releases, cause Apex is installed in a production database that can be upgrade now to 10g/11g.
    Best regards,
    Sergio Coutinho

    Jari,
    Very interesting. I didin´t know that this APEX_UTIL exists...
    Although that, i developed a customized access control to specific "media itens" of my application, for example:
    - Download of documents or programs;
    - Play of videos;
    - Play of audios;
    - Acess of CLOB records of a table, that were displayed as a kind of HTML page;
    - Outgoing links;
    I do not want to control all the Apex application as, for example, tabs, report pages, charts, forms, etc.
    All these media itens are stored on oracle tables, and where displayed in apex reports. Customer clicks on a link of this report and the media is displayed to the user.
    I have sucess to control quite all the medias display.
    The only one i could not have success to control are these outgoing links. These links were stored in a oracle table and were displayed in a apex interactive report.
    I would like to know if i can implement my custom rutine to register these access. I think that i could to it with Ajax scripts.
    Best regards,
    Sergio Coutinho

  • Get canvas.toDataURL('image/jpeg') and convert base64 encoding to java.sql.Blob

    Convert canvas.toDataURL('image/jpeg') to java.sql.Blob.
    I am using oracle adf so I am able to action a backing bean from javascript and pass in parameters as a map. I pass in the canvas.toDataURL('image/jpeg') which I then try to decode in my bean. Using BASE64Decoder and the converting the bytearray to a file I can see the image is corrupted as I can't open the file thus converting the bytearray to blob is also a waste.
    Has anyone any ideas on base64 encoding from canvas.toDataURL to file or Blob?

    Use Case:
    A jsf page that enables a user to take photos using the HTML5 canvas feature - interact with webcam -, take photos and upload to profile
    1. I have created the jsf page with the javascript below; this pops up as a dialog and works okay and onclick an upload image, triggers the snapImage javascript function below and sends the imgURL parameter to the serverside managedbean
    <!-- java script-->
    function snapImage(event){
                    var canvas = AdfPage.PAGE.findComponent('canvas');
                    AdfCustomEvent.queue(event.getSource(),"getCamImage",{imgURL:canvas.toDataURL('image/jpeg'),true);
                    event.cancel();
    <!-- bean -->
    public void getCamImage(ClientEvent ce){
    String url=(String)ce.getAttributes().get("imgURL");
    decodeBase64URLToBlob(url);
    private BlobDomain decodeBaseB4URLToBlob(String url64){
                    BASE64Decoder de=new BASE64Decoder();
                    byte[] bytes=de.decode(url64);
                    File file=new File("abc.jpg");
                    InputStream in = new ByteArrayInputStream(bytes);
                    BufferedImage bImageFromConvert = ImageIO.read(in);
                    in.close();
                    ImageIO.write(bImageFromConvert, "jpg", file);
                    return createBlobDomainFromFile(file);
    ----problem---
    Accessing the generated jpeg file shows the image is corrupted, probably missing bytes or encode/decoder issues.and the blob image after uploading to database is saved as a binary stream which ondownload doesnt render as an image or anything i know of.
    Is there anyways of achieving the conversion without errors?

  • Building JSF 1.2 Custom Components with EL and standard components

    Hi all,
    I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
    - Using jsf 1.2
    - Must use unified EL, i am using a UIComponentELTag
    - iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
    Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
    I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
    What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
    What i want help with:
    I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
    Note:
    In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
    Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
    Many Thanks,
    Kev

    Hi all,
    I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
    - Using jsf 1.2
    - Must use unified EL, i am using a UIComponentELTag
    - iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
    Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
    I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
    What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
    What i want help with:
    I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
    Note:
    In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
    Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
    Many Thanks,
    Kev

  • 4.2 - Checkbox : When onClick registered for, MRU not firing (demo incl)

    *** Hopefully this isn't a rehash, I've searched around but haven't found information on it. ***
    I have a wizard created tabular report with a Checkbox (Y/NULL) column. The wizard also created the MRU and MRD.
    In the page header, I've added the following Javascript function:
    function testme(pThis){}
    In the column attributes for my "Simple Checkbox", I added the follow to "Element Attributes":
    onClick="testme(this);"
    With this in place, when I click/unclick the checkbox and submit for a save using the MDU, the changed state of the checkbox is not saved to the database. Also, any new records (via new row) are added with a NULL for the checkbox field regardless of what is selected during creation.
    If I change "Element Attributes" to:
    onChange="testme(this);"
    Then the MDU works just fine. Only reason I'm worried about this is that I understand onChange can be problematic on certain IE versions.
    Thanks,
    Scott

    Howdy Howard (and others) -
    I was hoping someone would have an answer without generating an example, but I hi-jacked the demo and came up with one:
    http://apex.oracle.com/pls/apex/f?p=70849:9:16222360984434:::::
    Workspace: DenverScott
    UserName: Test_User
    P/W: Test123
    Page: 9
    Recreate Problem: Change the checkbox value of an item under OnChange and OnClick and press "Submit", only OnChange items actually change.
    On this report, the two columns "OnChange" and "OnClick" are the focus. They are both simple check boxes and basically have the same settings. They both call an empty javascript function "test_me(this)" when clicked. Difference is, the MRU works for the "OnChange" column, updates are applied. You can change the "Onclick" column and submit all you want and it does nothing.
    If you remove the event for OnClick="test_me(this);" from the "OnClick" column, the submit/updates work just fine.
    (If anyone changes the demo, please return to prior state for others to examine)
    Thanks,
    Scott

  • Commandbutton onclick, action

    i've a situation where i want to execute action of a commandbutton prior to executing onclick event.
    Is it possible?
    i've back process(action) populating inbox.value and onclick event, copying value from child window to parent window...dialog doesn't work for me...had to do this manually.
    OR is it possible for me to bind the action to the onclick event?
    Thank you very much for your help.

    Hi,
    onClick is a JavaScript event and will always execute before the button's action.
    Frank

  • Onclick event in flash

    Hello,
    i have an flv  movie file that i need to convert to swf and add an onclick event to  it. i was able to do the first step by importing the flv movie and  export it as swf. how can i add the onclick event? this swf will be an  advertisement for a product and onclick i need it to redirect to a  specific URL.
    thank you in advance.
    Oliver

    Create a new layer with an invisible button (set its alpha to 0) and add the clicking code needed.
    The first thing you need to do to make it useful code-wise is to assign it a unique instance name.  So while it's selected on the stage, you enter that unique instance name for it in the Properties panel... let's say you name it "btn1"
    In AS3, to make a button work with code, you need to add an event listener and event handler function for it.  You might need to add a few (for different events, like rollover, rollout, clicking it, but for now we'll just say you want to be able to click it to get a web page to open.  In the timeline that holds that button, in a separate actions layer that you create, in a frame numbered the same as where that button exists, you would add the event listener:
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    The name of the unique function for processing the clicking of that button is specified at the end of the event listener assignment, so now you just have to write that function out:
    function btn1Click(evt:MouseEvent):void {
       var url:String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req, "_blank");

  • SelectOneChoice and selectItem foreach row  - Not selecting current value

    Hi -
    I am having a problem whereby the list that is rendered in the UI is not selecting my current ID...It is just showing the "blank" selection, which is another problem - it must be mandatory.
    The UI shows the list (from my iterator) but nothing is selected on the list, even thow the ROWs do have a ClasscategorytypeId assigned to them.
    My Iterator that feeds the list is defined in the PageDef as follows:
    <iterator id="ClasscategorytypeView1Iterator" Binds="ClasscategorytypeView1"
    RangeSize="-1" DataControl="AppModuleDataControl"/>
    </executables>
    Here is the column definition.
    <af:column sortable="false" headerText="ClassCategory"
    binding="#{backing_svrclass_edit_list.column3}"
    id="column3">
    <af:selectOneChoice value="#{row.ClasscategorytypeId}"
    required="true">
    <af:forEach var="item" items="#{bindings.ClasscategorytypeView1.rangeSet}">
    <af:selectItem
    value="#{item.ClasscategorytypeId}"
    label="#{item.Name}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:column>

    Hi Frank - thanks for the feedback.
    for #1 - setting the defaults on the entity and view object didn't help. It still shows up with a "BLANK" field (don't want the blank field, since "required"), and it is not selecting the correct option that cooresponds to the ID from the ROW.
    re #2 - I don't understand solution #1 that he mentions? Here is the quote:
    "Create a second binding to the same attribute that the list binding is for. But make this a plain attribute binding. This binding will map direct to the real value of the column so you can use this second binding as a proxy to the list in your expressions. Note the binding just has to be created in the PageDef file, it does not need to be displayed on the page itself." These parts are confusing to me:
    "Create a second binding...", "use this second binding as a proxy"...I thought that you can have only one binding per control, and second, re: the proxy item - is this implying that I have to setup an onload and onclick event, and somehow map the option items (zero based index) to the real value both when showing the list (and selecting the right one) and processing the currently "selected" item? This sounds like a very combursome thing to do...? Can you clarify that for me?
    (if you had a simple example that would be great!)
    Thanks again!
    I really appreciate it.
    ps. I found the #1 scenario (foreach solution) from the Steve Muench blog here, and if I am to understand this correctly - even his sample is misleading, since the list values returned from the query are zero based, and NOT value based.. so he must have aligned these values in the database to be ZERO based and coorespond to the behaviour of rendering the list... This is very misleading.
    Here's the URL:
    http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/editabletabledropdown/dropdownlistineditabletable.html?_template=/ocom/technology/content/print

  • Re:Event declaration and handling in portals

    Hi,
    I am new to portal and I got struck in how to access events and to declare events as well .
    Please guide me in this issue
                                         Thank You,
                                         D.Durga Rao

    Hi,
      Check this link for the tag for button. It shows onClientClick and onClick. onClientClick is client side validation (code written in javascript inside jsp itself) and onClick is server side validation.
    http://help.sap.com/saphelp_nw70/helpdata/en/f1/9a0e41a346ef6fe10000000a1550b0/content.htm
    For server side: Use onClick:
    JSP DynPage: Declaration of the method that processes the event:
    public void myClick (Event event) { ..coding.. }
    or
    public void onMyClick (Event event) { ..coding.. }
    Here myClick is like ProcessConfirm defined for button. It can be defined as
    public void ProcessConfirm (Event event) { ..coding.. }
    or
    public void onProcessConfirm (Event event) { ..coding.. }
    Regards,
    Harini S

  • JS error message marking up "onclick"

    I would like the buttons on my page to be generated using
    Srpy. I have a dataset with the names,types and onclick actions.
    After Spry markup, the page is correct and the buttons work
    as intended
    But
    I am getting a javascript error of "Expected ";"
    If I remove the markup for the onclick action then the
    javascript error goes away but then my buttons can't work.
    Does anyone now how I can eliminate the annoying message? I
    am on IE7
    The output from Spry.debug is:
    Performing IE innerHTML fix up of Region: spryregion1
    <TABLE id=buttons> <TBODY>
    <TR><!--<spry:repeat select="dsButtons">-->
    <TD><INPUT onclick={dsButtons::onclick}
    type={dsButtons::type} value={dsButtons::value}
    name={dsButtons::name}></TD><!--</spry:repeat>--></TR></TBODY></TABLE>
    Region template markup for 'spryregion1':
    <TABLE id="buttons"> <TBODY>
    <TR><!--<spry:repeat select="dsButtons">-->
    <TD><INPUT onclick="{dsButtons::onclick}"
    type="{dsButtons::type}" value="{dsButtons::value}"
    name="{dsButtons::name}"></TD><!--</spry:repeat>--></TR></TBODY></TABLE>
    Generated region markup for 'spryregion1':
    <TABLE id="buttons"> <TBODY> <TR>
    <TD><INPUT onclick="validate(); return false;"
    type="button" value="Confirm"
    name="Submit"></TD></TR></TBODY></TABLE>

    Hello Jeremy,
    Can I access your page over the Internet? I tried to change
    in one of my XML one of the fields to onclick and modify the page
    to look similar to the example you posted here but I don't
    encounter any problem.
    Also please tell me the browser version to make sure I use
    the same configuration as you do.
    Regards,
    Cristian

  • DateChooser and XML

    this might be easy. I'm just not seeing the connection. I
    created a DateChooser in my mx Application. How do I use an XML
    file as it's data Provider (might not be the right word here). I
    want in my XML file for it to contain the dates to highlight, and
    when you roll over an active date the tool tip shows the text from
    the xml file. Lastly when you click a date it loads in .swf file in
    my HBox.
    Sounds easy - I just can't figure out where to go after
    creating the DateChooser control. I know how to add the tool tip
    but it displays the same text no matter which date you've selected.
    since I want each date in XML file to have some smal info..
    Can anyone please help me or point me to a tutorial. If you
    could just show me how to link and XML file to the DateChooser
    that'll be enough in it's self. Thanks guys/gals

    I'm not trying to customize the exiting DateChooser - I just
    want to knw how to use it with an XML file.
    the XML file needs to have a few values
    Tooltip Info
    Link to information about the event on that day
    On roll over it displays the tool tip from my XML file and
    onclick it loads in an external .swf file from my assets folder
    which contains the event info..
    That's pretty much it. Nothing too fancy just something
    updateable.
    thanks for any help. I need it ASAP..

Maybe you are looking for

  • Error message or "Can't find page"

    I've read the suggestions below, which have been given when a user's mac.com webiste cannot be found. This happens to me constantly. I tried entering "http://web.mac.com/rightnow" and I get the error message. If I use the longer form of my address ht

  • WUMC710 SETUP ISSUE / SOLUTION

    When settting up a new WUMC710 with a new WRT1900AC Router, I experienced problems when trying to connect to the Manual Wireless Configuration screen. After the usual diagnostics (Restore to Default, Firmware Upgrade, etc.) I eventually narrowed it d

  • Check current calls via edge server

    Is there a way to check what calls are currently happening via a Lync 2013 edge server.  What I mean here is we need to take down the director pool for some maintenance and this is the next hop from the edge hence before we do this would be good to s

  • IPhoto album slideshow runs backwards

    iPhoto album slideshow runs backwards. Anyone any suggestions?

  • Cannot run SimpleSearchServlet example

    Hi experts, I try to compile the SimpleSearchServlet example, but I have a classpath problem. The compiler cannot find the "km.shared.ui.released_api.jar". Where can I find this library containing the class "com.sapportals.wcm.control.released.search