GithubHelp home page GithubHelp logo

Comments (12)

Dani3lSun avatar Dani3lSun commented on June 1, 2024

Hi @ehabwagdy
you can find a demo app with some proper configuration here:
https://github.com/Dani3lSun/apex-plugin-apexsignature/releases/tag/v1.1
This shows how to set the static_id of your buttons and display the signatures in a report...

For saving into your own table I would suggest you to use the events that comes with this plugin.
Create a new Dynamic Action with Event "Signature saved to DB", that executes PL/SQL code which selects the APEX collection into your table, this could look like this:

DECLARE
  --
  CURSOR l_cur_signature IS
    SELECT c001    AS filename,
           c002    AS mime_type,
           d001    AS date_created,
           blob001 AS img_content
      FROM apex_collections
     WHERE collection_name = 'APEX_SIGNATURE';
  --
  l_rec_signature l_cur_signature%ROWTYPE;
  --
BEGIN
  -- get original collection from plugin
  OPEN l_cur_signature;
  FETCH l_cur_signature
    INTO l_rec_signature;
  CLOSE l_cur_signature;
  -- insert into own table
  INSERT INTO cc.ibs_emp_signature
    (ibs_no,
     emp_signature,
     bosta_id)
  VALUES
    (44433,
     l_rec_signature.img_content,
     4455);
  -- delete original collection
  apex_collection.delete_collection(p_collection_name => 'APEX_SIGNATURE');
  --
END;

So you don´t have to touch and change the original pl/sql code of the plugin...

Hope that helps!

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

thanks a lot for your support and your effective plugin

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

Dear Daniel

thanks to advise me if i want take some value from some text item in insert statement ?
how i can do that ?

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

FYI
i changed your code to insert direct in my table

DECLARE
  --
  l_collection_name VARCHAR2(100);
  l_clob            CLOB;
  l_blob            BLOB;
  l_filename        VARCHAR2(100);
  l_mime_type       VARCHAR2(100);
  l_token           VARCHAR2(32000);
  --
BEGIN
  -- get defaults
  l_filename  := 'signature_' ||
                 to_char(SYSDATE,
                         'YYYYMMDDHH24MISS') || '.png';
  l_mime_type := 'image/png';
  -- build CLOB from f01 30k Array
  dbms_lob.createtemporary(l_clob,
                           FALSE,
                           dbms_lob.session);

  FOR i IN 1 .. apex_application.g_f01.count LOOP
    l_token := wwv_flow.g_f01(i);

    IF length(l_token) > 0 THEN
      dbms_lob.writeappend(l_clob,
                           length(l_token),
                           l_token);
    END IF;
  END LOOP;
  --
  -- convert base64 CLOB to BLOB (mimetype: image/png)
  l_blob := apex_web_service.clobbase642blob(p_clob => l_clob);

  INSERT INTO cc.ibs_emp_signature
    (ibs_no,
     emp_signature,
     bosta_id)
  VALUES
    (6655,
     l_blob,
     4455);
END;

`

from apex-plugin-apexsignature.

Dani3lSun avatar Dani3lSun commented on June 1, 2024

Hi @ehabwagdy

yeah also possible, therefore I commented "create own collection (here starts custom part (for example a Insert statement))" in the code!:)
So you can remove all apex collection stuff and only the insert statement persists...Important is the code that builds the base64 clob and then converts to blob, after that you can do whatever you want with this blob...

Can I close this issue then?

Best wishes
Daniel

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

Dear Daniel

thanks for your effort and support

but i did that but i want to get value from field item in other region ?
how i can do that ?

thanks

On Wed, Sep 28, 2016 at 3:26 PM, Daniel Hochleitner <
[email protected]> wrote:

Hi @ehabwagdy https://github.com/ehabwagdy

yeah also possible, therefore I commented "create own collection (here
starts custom part (for example a Insert statement))" in the code!:)
So you can remove all apex collection stuff and only the insert statement
persists...Important ist the code that builds the base64 clob and then
converts to blob, after that you can do whatever you want with this blob...

Can I close this issue then?

Best wishes
Daniel


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALhgaIJq3ykwkNWUYBkSOiHz-e7ELu4Jks5qumsRgaJpZM4KIEmk
.

from apex-plugin-apexsignature.

Dani3lSun avatar Dani3lSun commented on June 1, 2024

Therefore I wrote in my first post over the Event "Signature saved to DB" Method. There you can specify "Page Items to Submit" just beyond the PL/SQL Code area. And then you can use these items in you PL/SQL code...
If you choose this method, I would let the original plsql code from the plugin stay untouched, and do it like I wrote in the first post...

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

Dear Daniel

in the first sorry for sending many times

in the following my code

DECLARE

l_collection_name VARCHAR2(100);
l_clob CLOB;
l_blob BLOB;
l_filename VARCHAR2(100);
l_mime_type VARCHAR2(100);
l_token VARCHAR2(32000);

BEGIN
-- get defaults
l_filename := 'signature_' ||
to_char(SYSDATE,
'YYYYMMDDHH24MISS') || '.png';
l_mime_type := 'image/png';
-- build CLOB from f01 30k Array
dbms_lob.createtemporary(l_clob,
FALSE,
dbms_lob.session);

FOR i IN 1 .. apex_application.g_f01.count LOOP
l_token := wwv_flow.g_f01(i);

IF length(l_token) > 0 THEN
  dbms_lob.writeappend(l_clob,
                       length(l_token),
                       l_token);
END IF;

END LOOP;

-- convert base64 CLOB to BLOB (mimetype: image/png)
l_blob := apex_web_service.clobbase642blob(p_clob => l_clob);

INSERT INTO cc.ibs_emp_signature
(ibs_no,
emp_signature,
bosta_id)
VALUES

  • (:P9_NEW,*
    l_blob,--l_rec_signature.img_content,
    4455);
    -- delete original collection
    -- apex_collection.delete_collection(p_collection_name =>
    'APEX_SIGNATURE');

END;

after insert the "ibs_no" column be empty are is a wrong way to get the
item value ?

thanks for your support and waiting your feedback

On Thu, Sep 29, 2016 at 9:50 AM, Daniel Hochleitner <
[email protected]> wrote:

Therefore I wrote in my first post over the Event "Signature saved to DB"
Method. There you can specify "Page Items to Submit" just beyond the PL/SQL
Code area. And then you can use these items in you PL/SQL code...
If you choose this method, I would let the original plsql code from the
plugin stay untouched, and do it like I wrote in the first post...


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALhgaKXEYEMk-ZlAuVNIU1eBc9_wS2Zhks5qu22-gaJpZM4KIEmk
.

from apex-plugin-apexsignature.

Dani3lSun avatar Dani3lSun commented on June 1, 2024

This only works if the value of P9_NEW does not change at runtime (and has already a value at page load), if this item changes you have to go the other way with a separate DA with Event "Signature saved to DB" as described above...

Hope this helps!;)

from apex-plugin-apexsignature.

ehabwagdy avatar ehabwagdy commented on June 1, 2024

many thanks it's working

sorry for send many mails to you. you are supported me very well.

On Thu, Sep 29, 2016 at 3:19 PM, Daniel Hochleitner <
[email protected]> wrote:

This only works if the value of P9_NEW does not change at runtime (and has
already a value at page load), if this item changes you have to go the
other way with a separate DA with Event "Signature saved to DB" as
described above...

Hope this helps!;)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALhgaOyOAE8Nkr3DBdvkberkyjVZBUkaks5qu7r_gaJpZM4KIEmk
.

from apex-plugin-apexsignature.

rv8470 avatar rv8470 commented on June 1, 2024

Hello,
Is it possible to make the plug-in optional? It is now mandatory
Thanks

from apex-plugin-apexsignature.

nigah35 avatar nigah35 commented on June 1, 2024

Hi Daniel,

Hope you are doing good.

I am using your apex signature plugin and it's been really helpful. Thanks for being a person for making this world a better place by sharing knowledge.

I was looking into how we can modify the plugin or its settings so the images stored in the table are jpg and not png? I'll appreciate your help and have my gratitude in advance.

Thanks!

from apex-plugin-apexsignature.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.