HOW TO: Create a JSP Insert Record Form Using BC4J Data Tags

This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create insert/submit JSP pages. Here is a link:
http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Insert_Form.html

You can loop throgh query records whit an implicit cursor (which automatically manages the open cursor, fetch and next record):
  for rec in (select intime,outtime,barcode,attend_date from dail_att; )
  loop
       t_in :=rec.intime;
       t_out :=rec.outtime;
       t_code :=rec.barcode;
       t_date := attend_date;
         PUT YOUR CODE HERE ... (if ..then... elsif... logic)
         you can avoid setting variables 'cause you can directly use the implicit cursor variables: rec.intime etc.
  end loop;
END;Anyway, I suggest you to check the where condition of your block ... because if not all data are retrieved there should be a problem in your query ... so even the cursor (if based on very same query) will return less data than expected.
Luca

Similar Messages

  • HOW TO: Create a JSP Edit Record Form Using BC4J Data Tags

    This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create row edit/submit JSP pages. Here is the link:
    http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Edit_Form.html

    Are you using Java 1.4.* ?
    Use JFormattedTextField.
    import javax.swing.*;
    import java.text.*;
    import java.awt.*;
    import java.util.*;
    public class DateExample
        public static void main( String [] args )
          // Here's what you're interested in...
          DateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy" );
          JFormattedTextField field = new JFormattedTextField( dateFormat );
          field.setColumns( 11 );
          field.setText( dateFormat.format(new Date()) );
          JPanel panel = new JPanel();
          panel.add( field );
          panel.add( new JButton( "Hey" ) );
          JFrame f = new JFrame();
          f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          f.getContentPane().add( panel );
          f.pack();
          f.setVisible( true );
    }It also works with other types of Format objects (ex. Currency, Decimal, etc.)

  • Creating rows Using BC4J Data Tags

    Hi!
    I want to create rows using BC4J data tags.
    I have 2 jsp pages: one containig forms and one to insert data.
    Is it possible to insert new rows into 2 or more tables?
    How can I differ the attributes to one table and to another?
    How can I do this?
    Thanks!

    The path is:
    Select "File/New" in the menu.
    Select "BC4J JSP" in the gallery.
    Select "Browse & Edit Form" wizard.
    This is in JDeveloper 9.0.2.
    Charles.

  • How to create custom structure in smart forms & use them in interface

    hi experts....
    can anyone tell me how to use  custom structure in
    form interface (parameters) without creating any structure
    in the dictionary.

    Hi Shrama,
    If you want to use the structure in interface. You have to create structure in dictionary.
    if you create in form or in report ..they won't recongnize the local structures.
    Thanks,
    Sunil

  • How to create content based portlet in 10g using JCR Data Control.

    I have created a webecenter Application (portlet,content repository,jsf ) in jdeveloper 10.1.3.4.
    and created a DatacontrolRepository connection for conent server , so inside the data control pallette I get all the methods such as search, AdvancedSearch,getItems.
    Now I am trying to drop the getItems() method return value from JCR data control as a Table inside my JSR 168 standard portlet which i created.
    But I am not able to see any of the content in my portlet.
    If I drag the same method getItems() on to my jspx page ( inside my ViewController) its working as expected.
    Please guide me how can get the content on portlet.

    Hi,
    Thanks for your reply..but i already have this demo and it doesn't contain an example for a pie graph..if u know where i can find any example for a pie graph and how to pass data to it i would be so thankful
    Thanks again.
    Eyad Basheer

  • How to create reports online on the fly using meta-data.

    We have dataset and blank report. How can I create report design on the fly ? so that it will able to display report dataset.
    Can someone tell me it is possible or not ? or some reference links....

    Hello,
    This can be certainly done by executing a script written using Report Application Server (RAS) SDK.
    Please refer the link : [http://devlibrary.businessobjects.com|http://devlibrary.businessobjects.com] for detailed documentation on the usage of RAS SDK.
    Regards,
    Chinmay Athavale
    Edited by: Chinmay1009 on Jul 27, 2010 3:46 PM

  • Validate 2 E-mail address fields in insert record form

    Hello,
    I have used the Insert Record Form Wizard to create a form, including using the Validate Form Server Behavior to validate many fields.
    I can't figure out how to compare & validate 2 E-mail address fields.
    After the form was created I opened the existing Validate Form Server Behavior - Advanced tab and built the condition {sub_email2} != {sub_email} but this had no affect on submitting the form.
    The other thing I tried was creating a new Compare Transaction Field behavior with the same condition {sub_email2} != {sub_email}, this also seemed to have no affect.
    I am just a beginner, so I admit to not really knowing what I'm doing, for me ADDT has been a great aid.
    The other thing I noticed, when I tried both the items above, besides not affecting being able to submit the form with different E-mail addresses. The red asterisks indicating a required field, would disappear.
    Here is the form http://www.oescahealthregistry.org/forms/pedigree_submission.php this version of the form does NOT include either of my attempts to validate the E-mail fields.
    Thanks in advance for your help.
    Dennis

    Hi,
    A compare statement should work fine. As an example I made small form that inserts name and email (2 fields) using Insert record wizard.
    Name field is required, email field is required and checks that its a valid email structure ([email protected]). I then finish the wizard.
    <input type="text" name="email" id="email" value="<?php echo KT_escapeAttribute($row_rsemail['email']); ?>" size="32" />
    <?php echo $tNGs->displayFieldHint("email");?> <?php echo $tNGs->displayFieldError("email", "email"); ?>
    I then add the extra field to the form that the 2nd email will be entered into, this one I called email2, I then copied the display hint and fielderror code from the first email and placed it behind the 2nd email box and changed the text to reflect email2. Which probably doesnt matter but I put it there anyway.
    <input name="email2" type="text" id="email2" size="32" />
    <?php echo $tNGs->displayFieldHint("email2");?> <?php echo $tNGs->displayFieldError("email2", "email2"); ?>
    Now that I have both email fields in the form, I go to the developer tools under server behavior and select compare transactions fields under form validation.
    I hit the + to add a field I then choose email for field, then == for condition, then {POST.email2} for compare to. I enter in an error message and hit ok.
    Thats it the form is ready.
    The first email field will check against email validation and the 2nd email will check against the first email.
    I hope that helps.
    Take note that the database actually only has 2 fields to enter data. Then 2nd email field is only for validation.
    Message was edited by: Albert S.

  • How to write code to insert record in database programtically in Jdev rel

    Hi Experts,
    Please tell me how to write code to insert record in database programtically in Jdev rel .2.
    Thanks
    Shiv Naresh

    To insert the record programmatically i will provide you some sample below
    ViewObject vo = this.getVoXXXX();
    Row vor = vo.getCurrentRow();  // get the current row of the record
    ViewObject vo1 = this.getvoYYYY();
    Row vor1 = vo1.createNewRow(); //creating new row in the table
    vor1.setAttribute("aaaaa",vor.getAttribute("ttttt")) // In this we are getting the current row value of "ttttt" and inserting into "aaaaa"Hope this could help you!

  • Exist RFC Function or Bapi for insert Records form a external program?

    i create a Ztable same as tell me here:
    http://abaplovers.blogspot.com/2008/02/creating-table-in-sap.html
    5 String Fileds 2 Date Fields 2 Numeric Fields
    my question is exist a RFC Function or Bapi for insert Records form a external program (Delphi/Visual Basic)?
    Any advices?
    Thanks.

    hi madhurao123 thanks for answer.
    But Why block the Thread?
    This question is no so basic, yet never learn, the forum must be open to these questions maybe open a forum somewhere basic but must be able to do these basic questions.
    IT Toolbox commented the same thing, but if not here or ITtoolbox or where else can ask basic questions?
    Advise me, thank you.

  • How to create a global variable in forms 6i

    How to create a global variable in forms 6i

    :GLOBAL.my_var := 15; Well, this statement is not correct! Global variables
    stores a character string of up to 255 characters in
    length. Thus, valid statement for Khurram example
    is:
    :GLOBAL.my_var := TO_CHAR(15);
    or
    :GLOBAL.my_var := '15';
    But numeric values are implicitly converted by oracle so there's nothing in fact wrong with the statement...
    :GLOBAL.my_var := 15;
    ;)

  • How to create a Share with friend form

    Hi
    Anyone know how to create a "Share with friend" form? This is to share a simple html page not an e-commerce or blog page.
    FYI a link:
    http://i-communicate.com.au/new/media-handling.htm
    Cheers
    Micha

    I have access to web forms but that type of form doesn't exists.

  • How to create Lookup field in user form in OIM 11g - Urgent

    Hi Experts,
    How to create Lookup field in User Form - OIM 11g.
    Pls. provide your support on priority.
    Regards
    Karan

    Thanks all for your suggestion.
    Our requirement, is we need to have a user defined field similar to how its there in "Organisation".
    For example we need to create an user defined field like "Service Holding" which holds different services say like Service 1, Service 2, Service 3 etc.
    Under each service there are multiple roles....
    Eg:
    Service 1 - Role 1, Role 2, Role 3
    Service 2 - Role 4, Role 5
    Service 3 - Role 6, Role 7, Role 8
    Is there a way to store multi-valued attribute in OIM UDF? If so, pls. guide us
    If its not possible we would need to create a Lookup field (something similar to Organization or Manager). User clicks on the button (lens button), which should invoke an API wherein he can select specific Roles and save in User. Eg. like Service 1 - Role 1#Service 2 # Role 5 and store in the backend database.
    Is this possible. Pls. guide.
    Regards,
    Karan

  • How to create new page in adobe form.

    how to create new page in adobe form.

    Hi
    First Go To Layout.
    On Hicherchy Platte , rightclick on Subform and select option new body page.
    This way you can create body page for the particular subform.
    if you want to create master page , right click on page 1 and select New master page.
    Hope this will helpful to you.
    Rewards if useful.
    With Regards
    Nikunj Shah

  • Any clue how to add pagination to single record form?!

    Is there any1 who tried to create pagination to single record form?! i tried this but i have problem with navigating to the NEXT record.
    Regards;

    Hello guys?!!
    Is there any1 in this forum can help me in my issue?!! am desperate.

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

Maybe you are looking for