Create form based on existing row : advice from specialists

hello,
i've coded a "create form" based on a row selected by the user.
this create form displays the same information as the selected row (except for the primary key which is a sequence trigger-calculated) the user can then modify any field and then commit the creation. It's quicker for tables with many columns since the user will override only several fields instead of setting every field one by one.
I've done it this way :
1) creation of a createCustomMethod() in my ViewObject implementation class and published it in the client interface.
2) drag and drop the method as a command button on the selection list page
3) set the action of the command button to the navigation case value to open the create form when the button is clicked.
the code of the createCustomMethod() is the following
public void createCustomMethod() {       
Row currentRow = this.getCurrentRow();
Row newRow = this.createRow();
newRow.setAttribute("Attribute1",currentRow.getAttribute("Attribute1"));
newRow.setAttribute("Attribute2",currentRow.getAttribute("Attribute2"));
/* more initialization code here */
this.insertRow(newRow);
this.setCurrentRow(newRow);
it works fine but as i'm knew to ADF BC is this a good solution ? are there any drawbacks to it ?
thanks
-regards

what's the advantage of exposing it in the application module rather than in the view object ?
Message was edited by:
user562278
i've tried implementing the method in the application module (i had to call the findViewObject() now) but the "Row currentRow = vo.getCurrentRow();" instruction throws a NPE.

Similar Messages

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Creating Form Based Authentication

    Hi,
    When i am creating Form Based Authentication then i am giving in the action field of the login and the scheme as "webgate.dll" but when i am using it then i am getting 403 error for any user.
    Can anybody help me

    There is a metalink note on how to configure form based auth. Pretty straightforward.
    COREid 7.0.4: SettingUp Authentication Scheme in a NutShell
         Doc ID:      Note:401944.1

  • APEX  How do I create a Form based on a Database Table from other schema

    My APEX schema is WISEXP. I have a database table that resides in WISDW schema on the same database. I want to create Tabular form based on this table.
    I am not able to create a FORM based on the table from WISDW schema. I am able to create a FORM based on SQL though from this table in WISDW schema - but it does not do any action on Update/Insert rows.
    Appropriate Synonyms and grants are created. Is there a limitation or am I missing something? Please advise.
    thanks
    Rupen

    If Rupen is using 2.2 or 2.2.1, it is likely he is running into the bug described here: Re: Workspace to Schema Assignments
    In that case, it may be a necessary and sufficient workaround to assign the foreign schema to the workspace.
    Scott
    Message was edited by:
    sspadafo

  • Creating form based on table with non-sequence pk.

    How to you create a form based on a varchar2 column and not a sequenced assigned pk. So the pk would be entered at the time a new
    row is added. It would be entered just like the other fields from the form and not a sequence.
    How do you do this as when using the wizard it prompts you to select one of 3 ways to define the pk.
    Sequence, trigger or pl/sql code.
    If the answer is pl/sql code, what do I need to create in the code?

    If the primary key is created by the user themselves (which is not recommended, you should have another ID which the user sees which would be the varchar2 and keep the primary key as is, the user really shouldn't ever edit the primary key) then all you need to do is make sure that the table is not populated with a primary key in the wizard and then make sure that you cannot insert a null into your varchar primary key text field.
    IF you're doing it this way I would make a validation on the page which would run off a SQL Exists validation, something along the lines of
    SELECT <primary key column>
    FROM <your table>
    WHERE upper(<primary key column>) = upper(<text field containing user input>);
    and if it already exists, fire the validation claiming that it already exists and to come up with a new primary key.
    Like I said if you really should have a primary key which the database refers to each individual record itself and then have an almost pseudo-primary key that the user can use. For example in the table it would look like this:
    TABLE1
    table_id (this is the primary key which you should NOT change)
    user_table_id (this is the pretend primary key which the user can change)
    other_columns
    etc
    etc
    hope this helps in some way

  • Error creating form based on a table

    This is wierd. I am running WebDB2.2
    and up until now it has been no problem
    creating forms from tables. But now in
    this schema called SUMI I am unable to
    create a form based on a table. I get
    the error below. I have assigned SUMI
    almost every possible permission
    (DBA, WebDeveloper) so I
    don't think it is a permissions issue.
    Any ideas? Thanks in advance. Marvin.
    ---Error Message--
    14/Aug/2001:13:12:28
    ORA-06550: line 5, column 7:
    PLS-00302: component 'FORM_NOTWORK' must be declared
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 7:
    PLS-00302: component 'FORM_NOTWORK' must be declared
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    VARIABLES IN FORM NOT IN PROCEDURE:
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    null

    I am bumping this up. Can anybody help or
    at least point me in the right direction?
    Thanks!

  • How to create Form based on a table to display multiple record

    Hello All,
    Would somebody please tell me how to create a Form based on a single table ,
    to view and insert multi record based on a single table.In other words I would like
    to have a form as shown below ,where the users can Insert,update,delete,query and so on
    Item Id PArt Number List Price
    100 Item-1 $120.oo
    200 Item-2 $150.00
    300 Item-3 $50.00
    I know I can do it as Single Record block using Tabular Format,but multiple record ?????
    Thanks in Anticipation
    Babu

    Try this method,
    1. Creat a Master Detail Form (Custom Layout and not tabular)
    and in the master block select one field.
    2. In the HTML layout for master remove the reference for
    that field(so that nothing will appear in the master block
    of the form).
    3. Before the update (in the Pl/SQL event handler select the 'Save' event and write the following code to avoid updating master block).
    p_session.set_value(p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'MASTER_ACTION',
    p_value => 'None');
    doSave;
    For eg, let's say
    Master is from 'Dept' table and Detail is from 'Emp' table(with join condition Dept.dept_id = Emp.dept_id). In the master remove everything except dept_id field and in the HTML layout for master remove the reference of the dept_id field(you cannot remove this field physically from the master layout). Now the form will look like multirow form rather than master detail form but only problem with this workaround is 'Detail Action' will be present in the detail block.
    I hope this will help you.
    Thanks
    -Krishnamurthy

  • Create form based applications using javafx in NetBeans 6.5

    Hi Friends,
    I am a beginner in javafx and want to create a form based application using javafx. I saw in some of the tutorials that forms were created using frames. But when i started developing this, there is no package for frame. Can anyone help me out from this problem.Code for a simple login application can get me out of this.I am using NetBeans 6.5 version.
    Thanks in advance
    Sherlyn

    See an example for the PasswordField component.

  • ORA-04020 Deadlock when trying to create form based on stored proceure

    Hi,
    I'm trying to create a form based on a stored procedure, and I'm getting " Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.WARRENP (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300) " when I try to generate the form. I have created a new database provider (warrenp), and I've given it the same privs as the PORTAL_DEMO provider.
    GRANT EXECUTE ON PORTAL.WWCTX_API TO WARRENP;
    GRANT EXECUTE ON WWPRO_API_PARAMETERS TO WARRENP;
    GRANT EXECUTE ON WWPRO_API_INVALIDATION TO WARRENP;
    GRANT SELECT ON WWV_USER_CORNERS TO WARRENP;
    GRANT EXECUTE ON WWPOB_PAGE_UTIL TO WARRENP;
    I create a stored procedure
    CREATE OR REPLACE PROCEDURE sp_test (foo IN number) AS
    BEGIN
    NULL;
    END;
    GRANT EXECUTE ON sp_test TO PUBLIC;
    Then I try to create a form based on this procedure and it fails with the above error. I can create this procedure in the PORTAL_DEMO schema without problems. I can also create a form in the WARRENP provider based on PORTAL_DEMO.GIVE_RAISE and that works also.
    I'm on Portal 10G (9.0.4) on Linux, infrastructure database is 9.0.1.5.0.
    Can anyone tell me what I've missed in my setup?
    Thanks

    I've been informed that this is caused by database bug 2651669.

  • Creating a Tabular Form based on Input Parameters passed from another page?

    Hello,
    APEX version 3.2
    DB version 9.2
    Internet Explorer 6
    I created a tabular form, but do not want to return all the records from the table.
    Is it possible to create a parameter page for the user to enter a string of values that will be submitted to create a tabular form, only displaying those records from the table?
    Thanks.

    Why not use an instr with your data in a bind variable in your where clause for the select?? Page 1 sets an item called P2_Parameter with your value string slightly modified ('12345','345632','645534534','3434344')
    Select a,b,c,d,e from some_table where INSTR(TO_CHAR(Lookup_column,'099999999'),:P2_Parameter)
    Maybe that will work? Its off the top of my head, but should get you what you want.. (But to agree with one of the other posters, it is a BAD Design..) I would try like an interactive report to allow them to enter in acct #'s or whatever these are and let them access the rows that way..
    Thank you,
    Tony Miller
    Webster, TX

  • 7.0 Create forms based on Access data -David O'Hanlon are you there?

    Hi - Using a pdf created using LiveCycle 7.0<br /><br />I'm trying to create xFDFs using data from an Access database.  The xFDF should then be e-mailed to users who fill out the forms and return xml files by e-mail.  I then parse out the xml in to SQL Server using VBScript.<br /><br />The problem is that setting the value isn't working.  The real form is based on an XML schema & is more complicated, so Here's the xfdf I'm trying to create for a simple test:<br /><br />================================================================<br /><?xml version="1.0" encoding="UTF-8"?><br /><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><br />     <fields><br />          <field name="Identifier"><br />               <value>CRAP</value><br />          </field><br />     </fields><br />     <f href="C:\Documents and Settings\kirkenda\My Documents\ReviewerForm\form.pdf"/><br /></xfdf><br />===============================================================<br />The pdf form only has one field, Identifier.  The xfdf will open in reader, but the value isn't set to CRAP.  This type of thing works in forms created using Acrobat 6.0, but I can't get it to work with the forms I've created using LiveCycle Designer 7.0 that comes with Acrobat 7.0.     I'm thinking of uninstalling 7.0 and reinstalling 6.0, as I've hit a wall at every turn to try to pre-populate a form.<br /><br />Has anyone been able to do this in 7.0?<br /><br />Any comments at all - ANYTHING! would be welcome.<br /><br />Thanks -- Ginger<br />(posted to the Acrobat forum by mistake)

    I have a vital form that clients fill out, which is passed to many people in the company along the workflow. The form is a Planner and we have in the following PDF, Word Doc..
    Well before, the Planner.pdf was originally created in Word, since most people have access to Word.. but evolved to a PDF form created from the Word Doc via Adobe LiveCycle Designer 8.0 w/ User Rights enabled so that the form could be filled out and saved using Adobe Reader.. which was a step better than Word.. being that it is free. But this needed to be easier and more to the point b/c some clients don't particularly like installing the latest version of Reader, even if you provide them the link. Nor do they like saving the form, filling the form, and attaching the form to send back.
    My goal is to have the client fill an HTML version of the form, submit and be done with it, but everyone in the workflow be able to easily receive the filled Planner as a PDF form.
    So some months ago I ran into this post Chris Trip, "Populate Livecycle PDF from mySQL database using PHP" #8, 22 Sep 2007 4:37 pm
    which uses the command line Win32 pdftk.exe to merge an FDF file into an existing PDF on the remote server, and serve this to whoever.
    My problem was with shared hosting and having the ability to use the Win32 pdftk.exe along with PHP which is predominantly used on Linux boxes. And we used a Linux box.
    so i created the following unorthodox method, which a client fills the HTML version of the Planner, all field values are INSERTED into a table in MySQL DB, I and all filled planners that have been filled by clients to date can be viewed from a repository page where an XML file is served up of the corresponding client, but someone would have to have Acrobat Professional, to import the form data from the XML file into a blank form.. altoughh this is simple for me.. I have the PHP file already created so that when a Planner is filled and client submits. >> the an email is sent to me with a table row from the repository of the client name, #, email, and a link to d-load the XML file,
    But I also have the PHP files created so that the Planner can be sent to by email to various people in the workflow with certain fileds ommitted they they do not need to see, but instead of the XML file beiong served up i need the filled PDF Planner to be served.
    I can do this locally with ease on a testing server, but I am currently trying to use another host that uses cross-platform compatibility so i can use PHP and the pdftk.exe to achieve this, as that is why I am having to serve up an XML file b/c we use a Linux server for our website, and cant execute the exe.
    Now that I am testing the other server (cross-platform host), just to use them to do the PDF handling (and it's only $5 per month) I am having problems with getting READ, WRITE, EXECUTE permissions..
    Si guess a good question to ask is can PHP do the same procedure as the pdftk.exe, and i can eleminate it.
    or how in the heck can i get this data from the DB into a blank PDF form, like i have described??
    here are some link to reference
    Populating a LiveCycle PDF with PHP and MySQL
    http://www.andrewheiss.com/Tutorials?page=LiveCycle_PDFs_and_MySQL
    HTML form that passed data into a PDF
    http://www.mactech.com/articles/mactech/Vol.20/20.11/FillOnlinePDFFormsUsingHTML/index.htm l
    and an example
    http://accesspdf.com/html_pdf_form/

  • Acrobat SDK to create form fields on existing pdf

    I am trying to implement a browser based editor for my company's application. This requires to fetch an already created pdf document, add form fields on it and display on a browser.
    Does it look feasible? Does Acrobat SDK allow to create a fillable pdf from an existing file?
    Vishal

    Vishal:
    Take a look at the FormFieldSampleService in the Datalogics PDF Java Toolkit. The toolkit was developed by Adobe and, as you'll see in the sample, provides an API to add fields to a PDF file.
    FormFieldServiceSample | Datalogics Developer Resources

  • Is it possible to embed a newly created form into an existing PDF?

    Hi,
    I have an exisiting pdf (3 pages of text and images) that I need to add a form to on the last page. I've created a form but don't know how to embed it, and I have a feeling there's a better way to do it.
    The idea is that we can then email this PDF to people and they'll be able to fill it in.
    I'm a new user and can't find out how to do this- I'm sorry if i've missed something obvious!
    Thank you in advance.

    Hi;
    You can do it with Adobe Acrobat...
    First: Create your form in FormsCentral and from the Distribute tab "Save Submission-Enabled PDF"
    Second: Open your existing PDF with text and images in Adobe Acrobat and in Acrobat go to Help - Find and type "Insert Page from File" (under Tools depending on the version of Acrobat you are using) and add the FormsCentral PDF to the existing PDF and save
    The resulting PDF file would include the FormsCentral form and submitters data would be collected on FormsCentral servers for you to view/download in the View Responses tab.  You can also set up Email Notifications and Submission Reciepts that would all work with this PDF form.
    Thanks,
    Josh

  • Constraint based on existing rows in table

    I have the following situation:
    a table something like:
    create table allow_only_one_in_set
    (item_number number,
    set_number number,
    special_case number(1));
    I want to write a constraint that will not allow you to add a row with special_case set to 1 if there already exists a special_case = 1 in that set.
    I think a check constraint cannot work because it would require a sub-query. Correct?
    Would the way to do this be to use a trigger, and if so how best to pass a message back to the user (already have a special case in this set)?
    Thanks,
    Jon

    You'd want to create a conditional unique constraint.
    For this example i've assumed that set number can only have 1 special case with a value of 1, you can change the unique index as needed....
    ME_XE?create table allow_only_one_in_set
      2  (
      3     item_number    number,
      4     set_number     number,
      5     special_case   number(1)
      6  )
      7  ;
    Table created.
    Elapsed: 00:00:00.01
    ME_XE?
    ME_XE?create unique index allow_only_one_in_set_U_01 on allow_only_one_in_set
      2  (
      3     case when special_case = 1 then set_number else null end
      4  );
    Index created.
    Elapsed: 00:00:00.00
    ME_XE?insert into allow_only_one_in_set values (1, 1, 1);
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?insert into allow_only_one_in_set values (1, 1, 0);
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?insert into allow_only_one_in_set values (1, 1, 1);
    insert into allow_only_one_in_set values (1, 1, 1)
    ERROR at line 1:
    ORA-00001: unique constraint (TFORSYTH.ALLOW_ONLY_ONE_IN_SET_U_01) violated
    Elapsed: 00:00:00.04
    ME_XE?insert into allow_only_one_in_set values (1, 1, 0);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?

  • Enhancement request : Create object based upon existing

    It would be useful to be able to create a new object based upon the definition of an existing one (e.g. a GUI version of CTAS).
    (for those browsing the forums who haven't come accross the acronym before, CTAS = "Create table as select")

    Hmmm .... ok, you got me !
    But, I would say .... can we have a tickbox there for "metadata only" i.e. CTAS table with no data.

Maybe you are looking for

  • InContext Editing service interruption September 10, 2009

    Hi On September 10, 2009, starting 1:56 AM PST InContext Editing service is down for unscheduled maintenance. We are working on resolving the issue and will be back, the current estimate is a few hours. We appreciate your patience and apologize for a

  • IMovie where are you?

    Recently I had to completely "erase and install" my OSX Leopard. My Mac came with Leopard pre-installed with iLife '08. However now that I have re-installed the OS both iMovie and iWeb are missing. The apps are not in the folders nor on the install d

  • Skype crashes when starting up

    I am running skype 7 on win 8.1 and have used skype for many years. Just started having this problem overnight. Very odd, but on starting up skype it crashes "skype has stopped working". Have tried resetting by deleting the DbTemp folder. No change.

  • HT1364 is this the way,my window media player to i tunes

    What is the best way, tranfer from windows media player to i tunes

  • Why did Apple choose new size for iPhone 5?

    I am a bit worried that the new physical size of the iPhone 5 will make a great number of existing accessories useless. A own a Tomtom GPS car holder as well as an advanced iPhone holder for my bike, and they are not exactly cheap to buy? How come Ap