ADF and JQuery: How can I get the data back to server listener.

Jdeveloper 11g Version 11.1.1.2.0
I use Jquery to draw the signature. How can I get the svgOutput back to my server listener.???
e.getSource give me the error e.getSource is not function.
Both of function saveSignatureCapture(which calling from ADF button) and $('#save-output').click(function (event) can not send the the data back to my server listener.
Thanks.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="dSignature" title="Signature Capture">
      <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
      <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
      <af:resource type="javascript">
        var svgOutput = '';
        function saveSignatureCapture(e) {
            var signatureText = $('#drawbox-data').val();
            var source = e.getSource();
            var type = 'saveSignatureCapture_ServerListener';
            var immediate = true;
            var params = {
                signatureText : signatureText
            AdfCustomEvent.queue(source, type, params, immediate);
        function beginSignatureCapture(e) {
            $('#drawbox').drawbox( {
                caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
            $('#view-output').click(function () {
                svgOutput = window.open('data:image/svg+xml,' + $('#drawbox-data').val());
                svgOutput.document.close();
                return false;
            $('#save-output').click(function (event) {
                var signatureText = $('#drawbox-data').val();
                var source = $(document);
                var type = "saveSignatureCapture_ServerListener";
                var immediate = true;
                var params = {
                    signatureText : signatureText
                AdfCustomEvent.queue(source, type, params, immediate);
                return false;
        $(document).ready(beginSignatureCapture);
      </af:resource>
      <af:panelStretchLayout id="psSignature">
        <f:facet name="bottom"/>
        <f:facet name="center">
          <af:panelGroupLayout id="pgSignature" layout="vertical">
            <f:verbatim>
              <div id="divSignature">
                <canvas id="drawbox" width="600" height="200">
                  <p>Your browser does not support &lt;canvas&gt;</p>
                </canvas>
              </div>
              <br/>
              <br/>
              <a href="#" id="view-output">View Rendered SVG Output</a>
              <br/>
              <br/>
              <a href="#" id="save-output">Save Signature</a>
            </f:verbatim>
            <af:spacer width="10" height="10" id="s10"/>
            <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
              <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                <af:clientListener method="saveSignatureCapture" type="click"/>
                <af:serverListener type="saveSignatureCapture_ServerListener"
                                   method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
              </af:commandButton>
            </af:panelGroupLayout>
          </af:panelGroupLayout>
        </f:facet>
        <f:facet name="start"/>
        <f:facet name="end"/>
        <f:facet name="top"/>
      </af:panelStretchLayout>
    </af:document>
  </f:view>
</jsp:root>Edited by: user553450 on Sep 17, 2010 4:02 PM
Edited by: user553450 on Sep 17, 2010 4:13 PM

Hi Frank,
Thank you so much for your advice, I got lot of knowledge from your book and articles since I am in transition from forms to JDeveloper.
By surrounding <af:panelStretchLayout id="psSignature"> with <af:form id="f1">
Now the following code is work on Firefox, everything fine, I can get the data back and call my server listener as I expected.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1" title="Signature Capture">
      <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
      <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
      <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
      <af:resource type="javascript">
        function saveSignatureCapture(e) {
            var signatureText = $('#drawbox-data').val();
            alert(signatureText);
            var source = e.getSource();
            var type = 'saveSignatureCapture_ServerListener';
            var immediate = true;
            var params = {
                signatureText : signatureText
            AdfCustomEvent.queue(source, type, params, immediate);
        function beginSignatureCapture(e) {
            var cmd = "$('#drawbox').drawbox({lineWidth:3,lineCap:'round',lineJoin:'round',colorSelector:true});";
            if (navigator.userAgent.indexOf('MSIE') !=  - 1) {
                setTimeout(cmd, 1000);
            else {
                $('#drawbox').drawbox( {
                    caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
      </af:resource>
      <af:form id="f1">
        <af:panelStretchLayout id="psSignature">
          <f:facet name="bottom"/>
          <f:facet name="center">
            <af:panelGroupLayout id="pgSignature" layout="vertical">
              <f:verbatim>
                <canvas id="drawbox" width="600" height="200">
                  <p>Your browser does not support &lt;canvas&gt;</p>
                </canvas>
              </f:verbatim>
              <af:spacer width="10" height="10" id="s10"/>
              <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
                <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                  <af:clientListener method="saveSignatureCapture" type="click"/>
                  <af:serverListener type="saveSignatureCapture_ServerListener"
                                     method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
                </af:commandButton>
              </af:panelGroupLayout>
            </af:panelGroupLayout>
          </f:facet>
          <f:facet name="start"/>
          <f:facet name="end"/>
          <f:facet name="top"/>
        </af:panelStretchLayout>
      </af:form>
      <af:clientListener method="beginSignatureCapture" type="load"/>
    </af:document>
  </f:view>
</jsp:root> However, I got the error following error when I run the page from IE8.
Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichCommandButton[oracle.adf.RichCommandButton] id=cbSaveSignatureButtonId StackTrace:function(x217)[AdfRichCommandButton[oracle.adf.RichCommandButtonId]..........
FYI, the following simple testing code has the similar error in IE8 too (not for Firefox).
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1">
      <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
      <af:form id="f1">
        <f:verbatim>
          <canvas id="drawbox" width="600" height="200">
            <p>Your browser does not support &lt;canvas&gt;</p>
          </canvas>
        </f:verbatim>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>The error is: Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichDialog[oracle.adf.RichDialog] id:::msgDlg StackTrace function(x217).......
Your advice is very much appreciated.

Similar Messages

  • How can I get the data back from my game

    How can I get the data back from minecraft if I deleted the app and bought with a different Apple ID

    No, they are tied to the ID that purchased them, and cannot be transferred to anyone else.

  • HT1414 i backed up tha data on my iphone before i unlocked and restored as "new." how can i get the data back onto my iphone?i backed up tha data on my iphone before i unlocked and restored as "new." how can i get the data back onto my iphone?

    Hi,
    I wanted to unlock my at&t iphone 3gs that i had for 3  years.  i was told to back up the data on my phone and then restore it as new.  now i don't have any data i had before it was restored. how can i get that data back onto my iphone 3gs?  can i put that data on my ipad?

    Is it an iTunes backup or an iCloud backup? If iTunes, connect the iPhone, right click on the name of the iPhone under the DEVICES section in iTunes. Click on Restore from Backup.
    If iCloud, on the iPhone go to Settings > General > Reset > Erase All Content and Settings. When the device powers back on, you will see the original setup screens you saw when your iPhone was fresh out of the box. One of these screen asks you if you want to restore. Choose Restore from iCloud backup.

  • I deleted a calendar tab. How can I get the data back?

    I accidently deleted the calendar tab of my wife and deleted all her apoointments on her iphone and the iMac. I am in ****. How can I get the calendar data back=?

    Sync is only oneway, from PC to your device. Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software. A good Free one is called Sharepod which you can download from Download.com here:
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

  • How can I get the data back in my Date Book on Palm Desktop

    No device
    I have an old Tungsten E2 and jut lost everything out of the Datebook.  Only the data on Datebook and it's still on my Handheld.  How do I get the backup file for Datebook?  Or how do I sinc from Handheld to the Palm Desktop?

    Your post is unclear, but I think it says that your handheld has the data that disappeared from your desktop. Before syncing the data back to your des,top, I suggest changing the Datebook hotsync conduit to Handheld Overwrites Desktop.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • HT1766 After restoring yesterdays icloud back up one of my Apps has lost all its data.  How can I get the data back as its important to me.

    I accidentally added a passcode to my ipad mini after yesterdays IOS7 update.   I then promptly forgot the passcode (I think apple secretly changed it really).
    Its taken me 2.5hours to figure out how to reset my ipad after discovering there was no other way of getting into my ipad around the passcode.
    Luckily my ipad backs up every evening to icloud so i had a new back up sat waiting for me.
    Annoyingly, itunes wouldnt let me restore the factory settings as the "find my phone" thing was switched on.  The only way to turn it off appeared to be via my ipad which I was unable to get into.
    I eventually figured out how to restore it without this problem, by pressing the home button as I turned it on and then getting itunes to recognise it as a new ipad and restoring its settings that way.
    Following this it was relatively simple to restore my icloud back up.
    Everything appears to be here, my calander, my contacts etc.  All my apps have been restored and Im yet to find any app that has missing data except for one (naturally the one that is most important to me).
    This one app appears to have been returned to my ipad but it no longer has any data attached to it.  I have lost everything.  Payment info, Client info etc.
    Is there any way of recovering the data.  I presume its floating around the ether somewhere given I automatically back up to icloud every night.
    Cheers

    There's one other variable, although it shouldn't really come in to play but worth checking anyway.  Is it possible that the backup was made using a higher version of iOS than the one you are running now?  For example, if you were running the iOS 7 beta, then restored to version 6.1.3, the backup would not be listed as you cannot restore to a backup made on a device running a higher version of iOS.  If that's the case, you would have to update to the same or higher version of iOS in order to access your backup.
    Also, you can redownload apps and certain other purchased media (in most countries) as discussed here: http://support.apple.com/kb/ht2519.

  • My battery died and then when i charged the phone it is asking me to connect to itunes and restore. if i restore how can i get my data back

    My iphone battery died and on charging the phone it asked me to connect to itunes and restore the phone.
    If i restore the phone how can i get my data back and how can i check when i last backed up my phone

    If you have been syncing regularly as the iphone is designed, then you can sync the data back.
    Regardless you will have to restore the iphone.

  • My iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    my iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    If you don't have a backup then the only possible solution is to go back to the store and see if they can get your old phone and create a backup of that. I know very often that Apple employees will wipe the returned iPhones clean before shipping them back to wherever they ship them.
    When you say your old phone was "broken" does this mean it is dead and won't turn on?
    Do you have a Time Machine backup of your computer, or a clone that might have this info on it?
    Other than that I hate to say you may be out of luck. Time Machine and/or a cloning program performed regularily will inevitably save your a** in situations like this.
    Good luck
    PM

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • I have a Mac Pro OS 10.7.5 and have a DVD+R disc with files on it, but it ejects the disk after about 10 seconds--what to do?  How can I get the data off this disc?  I can see it has been already burned, so files are on there?

    I have a Mac Pro OS 10.7.5 and have a DVD+R disc with files on it, but it ejects the disk after about 10 seconds--what to do?  How can I get the data off this disc?  I can see it has been already burned, so files are on there?

    Try cleaning the lens and see if that will restore functionality to the DVD drive.  Use a DVD lens cleaning disk, if you have a can of compressed air, shoot some into the slot or wrap a fine microfiber cloth (eyeglasses cleaning cloth)  around a business card and insert it gently inside the slot.
    If no success, make an appointment at an Apple store genius bar and get a free diagnosis from them.
    Ciao.

  • I downloaded 4.0.1 and lost all my Yahoo toolbar apps but still have the Yahoo search bar. How can I get the apps back? Refreshing the "gear" does nothing.

    I have Windows XP and downloaded Firefox 4.0.1. After it was installed 5/7/11, I noticed all my Yahoo search bar apps were missing. Rebooting did not help. Neither did the "gear" on the toolbar next to the yellow Yahoo search box. Internet Explorer browser still shows them. How can I get the apps back in Firefox?

    I have Windows 7, the Yahoo toolbar has been working fine until today now all my apps are missing.
    Refreshing the toolbar does nothing.

  • The apps I created from "add to homescreen" have turned white and have a few lines and circles in it. How can I get the picture back on them?

    The apps I created from "add to homescreen" have turned white and have a few lines and circles in it. How can I get the picture back on them?

    Those aren't apps; they're bookmarks to websites. Have you tried resetting your device by pressing and holding the Home button and power button until the silver apple appears? If all else fails, you can just re-do the shortcuts.

  • How can I get the date and time and display it on the report main page?

    Gurus,
    How can I get the date and time and display it on the report main page?
    Thanks!

    Hello,
    You can create a Formula Colum returning a date :
    function CF_1Formula return Date is
    begin
    RETURN(SYSDATE);
    end;
    Put a Field in the Layout having this formula column as source .
    Regards

  • I down loaded a rental movie and stopped part way through . i turned the computer on and off and when i went back on itunes it didnt show up on the rental playlist and movie playlist.how can i get the movie back?

    i down loaded a rental movie and stopped part way through . i turned the computer on and off and when i went back on itunes it didnt show up on the rental playlist and movie playlist.how can i get the movie back?

    Unless it has recently changed you can only watch rentals on the device or mac you rent them on.

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

Maybe you are looking for

  • Smart form: Spool to PDF Conversion more than 100 pages.

    Hi folks, I have an issue with Function Module (FM) CONVERT_ABAPSPOOLJOB_2_PDF when the report to be converted has more than 100 pages.....i have explained this scenario as below We have been using the FM CONVERT_ABAPSPOOLJOB_2_PDF to convert ABAP re

  • Reset pagination solution

    I've always had problems with users being confused by the "Reset Pagination" error message ("Invalid set of rows..."). But I have several situations where I don't want to force a reset pagination all the time. Is there any way that I could only reset

  • IMAP Error - All attachments showing as MIME - can't open

    I am using IMAP with VPN to access our cos email server on an iPhone 3G. Everything looks good and appears to be working well -- one weird thing is happening and one error. 1. Every message is showing an attachment (i.e., paperclip) - when I scroll d

  • 3D visualization of spatial data

    Hi, I am just wondering if anybody has managed to do 3d visualization of spatial data on web either vrml or x3d ? also any help on loading 3d data in oracle spaital would be really appriciated as well. Regards Vikesh

  • Adobe Captivate Voices for Text to Speach

    Hello all, I am searching for more voices to use with Adobe Captivate Text to speech. Currently I have already the below voices: Paul James    (US English) Kate       (US English) Julie Bridget   (UK English) Chloe     (Canadian-French) Yumi Microsof