Help needed in loop in forms

Hi all
shayan here
First of all sory for my last post in which i posted a lot of code...actuallly i want to describe my problem in details because it is really unknown to me......
Now i will desdcrible it in simple.Hope fully all of you can understand and give me a idea to overcome this problem......
My problem is that i had generated a record in tabluler form through Select statement......means i have made a coursor of select statement and via loop i added it to tabuler form element like this
Registration Enrollment
12321 312312
231312 23123
1232 123123
Now i had added another display item in which ihave to calculate another thing like this
Registration Enrollment CGPA
12321 312312 2.14
231312 23123 1.23
1232 123123
I have done it but problem is that it is showing the cgpa in front of only one item...
not on all
i dont know why??????
also i want to insert this into another table like this....if this CGPA is final then insert it into final_CGPA table else it will update table with this CGPA.....
I had written the Insert and update statement on when button pressed button but it is not updateing or inserting.....
any help regarding this is highly appreciated
Thanks in advance
Shayan
[email protected]

Hello,
Forms always creates the first record in each block, but if you want to add manually some more records, you have to use the Create_Record built-in for each new record you want to create in the block.
Francois

Similar Messages

  • Looping through a table Help needed ....Forms 10g..... When Button Pressed

    Hye craig, hamid, christian and all ...........
    i have a user access interface which i create where there are two fields username and password and a button,
    i have also created a table USERS for users which have username and password fields ..... On useraccess interface i coded on WHEN BUTTON PRESSED like this
    declare
    go_block('users');
    execute_query;
    declare
    begin
         if :useraccess.username=:users.username and
              :useraccess.password=:users.password then
              go_block('MAINPAGE');
              else
              go_block('USERACCESS');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              end if;
    end;
    This code works for a single user in USERS table but for multiple users there has to be some looping system
    which matches the USERACCESS and USERS tables fields thoroughly ....

    Hi Majid,
    I can suggest you a workaround for this. raise a ON-LOGON trigger and you can use the LOGON_SCREEN builtin to flash the logon screen at runtime. And then try capturing the username and password.
    DECLARE
      connected BOOLEAN := FALSE;
      tries     NUMBER  := 3;
      un        VARCHAR2(30);
      pw        VARCHAR2(30);
      cs        VARCHAR2(30);
    BEGIN
      SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'DEFAULT');
      WHILE connected = FALSE and tries > 0
      LOOP
        LOGON_SCREEN;
        un := GET_APPLICATION_PROPERTY( USERNAME );
        pw := GET_APPLICATION_PROPERTY( PASSWORD );
        cs := GET_APPLICATION_PROPERTY( CONNECT_STRING );
        LOGON( un, pw || '@' || cs, FALSE );
        IF FORM_SUCCESS
        THEN
          connected := TRUE ;
        END IF;
        tries := tries - 1;
      END LOOP;
      IF NOT CONNECTED THEN
        MESSAGE('Too many tries!');
        RAISE FORM_TRIGGER_FAILURE ;
      END IF;
    END ;   a sample piece of coding to help you out.
    Regards,
    Manoj Chakravarthy

  • Help needed in printing   interactive form

    Hi Friends
    I just developed an application  which access  ECC
    can any one guide me to print  the output pdfform
    i have opened result interactive form and placed a print button ...next which script i should use? formcalc  or
    java script..since my application is a java webdynpro .
    can  you give me the piece of code for that..formcalc
    already got the script..but  i dont know the exact java script for  printing.
    plz help me in this issue
    vivek chandra

    Hi Raja
    Thanks for that stuff..very helpful
    i  have 3 inputfields on one of my interactive form
    i was asked to fill those fileds  with predefined data
    so that once the app is run, input form fields should
    dispaly the predefiend values.in wdinit method i could
    do that using wdContext.currentelement.setName("xxx");
    i have 3 fields..three are text fields.from the third field need to eneter the date,its a PO Bapi..i did context binding ..i could drag the input  fields..
    but when iam trying to set predefiend date for the
    3rd field..its not accepting it..since it is of type
    date.. do i need to create any data type for the 3rd field in javadictionary????plz guide me in this issue
    regards
    vivek chandra

  • Help needed in distributing the form

    Hello All ,
    I have a LiveCycle form which has 6-8 Pages.The completed document needs to be protected after distributing so that it cannot be reproduced, but allow us to add, change, edit delete contents as required and especially to populate what is now marked as protected. How to do this in the best way. One thing I have very less idea about distributing a form. Can anybody please help regarding this ?
    Thanks.
    Bibhu.

    You can use JavaScript to protect all form fields.
    Bundled with a password you can design a workflow wich allows you to remove the rotection when needed.
    Here's an example:
    http://thelivecycle.blogspot.com/2010/02/mail-xfa-forms-as-protected-uneditable.html

  • Help needed for dynamic update form

    I could really use some advice - I've been asked to build a time tracking application (basically a timesheet) and I have a fair bit done but the part I am really struggling with is the best way to accommodate some of the specifications. I am NOT a programmer (I have some coldfusion experience but nothing really advanced) so I have not managed to sucessfully integrate the various methods I've found on the web so far. The database is created and so are all the queries, and I have also written a cfc to handle the drop-down menu logic needed but I don't really know how to integrate it with the form.
    Our production server has ColdFusion MX7 so all the great functionality in the CF8 examples I can't use.
    The issue is the user should ideally be able to add/edit/delete multiple rows at once- I like CFGRID, and the HTML version seems best. The main issue with the Flash version is the scrolling to get to the insert/delete buttons- I couldn't see how to get rid of that. A separate add and edit form could be ok depending on how easy it is to use.
    One problem I have is that I can't work out how to have default values with the grid (the userID which is a session variable, and the date which is constantly changing- there is a cfcalendar for the user to change date).
    The biggest hurdle is the related select drop-downs I need- it's not quite as simple as the city,state,postcode examples. For the first drop down the pick an option- and for only 2 of those options there is a second drop-down. Anything else and it stops there. For the second drop-down, there are 2 options, and depending on which one of these they pick the 3rd drop-down pulls a query from one or another table in the database (2 entirely different things). The three  options have different database tables. The main timesheet table just stores the id number from those tables (so I also need to display the names on the drop-down from the options tables not the number).
    I played with simple and complicated javascript and coldfusion solutions as well, but because it's a form to update records and also because of the above specs I just couldn't get anything to work right. I tried binding with the cfc and nothing would bind, plus I don't know how to make all happen without a page reload.
    Does anyone have any advice for the best approach to this? As I mentioned I've got tables, queries and even a cfc but I'm not too clear on how to put it all together properly within the constraints of MX7.
    PS I also can't post a lot of code because of where I work- I know that's not helpful but am looking for the best approach to this, then I can work on the details. Right now I am jumping from solution to solution and not getting anywhere.

    Well, a lot of code has come and gone because I couldn't make it work, where I'm currently at is:
    <cfform name="updateform" id="updateform" action="#CurrentPage#?#CGI.QUERY_STRING#">
      <cfgrid name="MainData" height="400" insertbutton="add" deletebutton="remove" query="getMainData" insert="yes" delete="yes" rowheight="20"  selectmode="edit" format="html">
      <cfgridcolumn name="id" display="no">
    <cfgridcolumn name="userID" display="no">
    <cfgridcolumn name="entrydate" display="no">
    <cfgridcolumn name="activityID" >
    <cfgridcolumn name="typeID">
    <cfgridcolumn name="projectID" values="#ValueList(getProjects.id)#" valuesdisplay="#ValueList(getProjects.name)#">
    <cfgridcolumn name="time" width="10">
    <cfgridcolumn name="comment" width="150">
    </cfgrid>
    <cfinput type="hidden" name="entrydate" value="#Session.username#">
    <cfinput type="hidden" name="entrydate" value="#editdate#">
    <cfinput name="update" type="Submit" value="Update">
    </cfform>
    ** for some reason getProjects.name doesn't work and causes an error. I haven't worked out how to get the default inputs for the date and user ID to work either. I also tried binding and a flash form somewhere along the way.
    ** the CFC is below, #ds# didn't work and I had to put in the actual DSN name, not sure why, but anyway this is the logic of the thing. Ideally I would like to use this logic with the cfgrid, but I'm not sure if that is possible? It seems like it would be the most user friendly approach.
    The CFC so far is:
    <cfcomponent>
       <cffunction name="getActivities" access="remote" returnType="query">
            <cfquery name="getActivities" datasource="#ds#">
    SELECT * FROM timesheet_activities
    </cfquery>
            <cfreturn getActivities>
        </cffunction>
        <cffunction name="getTypes" access="remote" returnType="query">
        <cfargument name="Activity" type="any" required="true">
        <cfif ARGUMENTS.Activity EQ "">
            <cfset getType = "">
        <cfelse>
            <cfquery name="getTypes" datasource="#ds#">
            SELECT * FROM timesheet_type
            </cfquery>
        </cfif>
        <cfreturn getTypes>
        </cffunction>
        <cffunction name="GetProjects" access="remote" returnType="query">
        <cfargument name="Activity" type="any" required="true">
        <cfargument name="Type" type="any" required="true">
        <cfif ARGUMENTS.Activity EQ "" OR ARGUMENTS.Type EQ "">
            <cfset LstProjects = "">
        <cfelseif ARGUMENTS.Activity EQ "1" OR "3">
        <cfquery name="getProjects" datasource="#ds#">
    SELECT id,name FROM projectsa
    WHERE completed = 'false'
    </cfquery>
    <cfelse>
    <cfquery name="getEProjects" datasource="#dse#">
    SELECT id,name FROM projectsb
    WHERE statusID = '6'
    </cfquery>
        </cfif>
        <cfreturn getProjects>
        </cffunction>
    </cfcomponent>
    Any attempts to actually use the cfc didn't work. I tried to use it with a normal html update form and got the message- failed to bind, Activity didn't exist. I also tried to bind it to a flash grid. The argument for Activity needs to come from the drop-down Activity type selected. Maybe I'm missing something.
    ETA:
    just moved everything to the live MX7 server (because my dev server is Coldfusion8) and I get the following:
    Attribute validation error for tag CFGRID. The tag does not allow the attribute(s) BINDONLOAD,BIND.
    Does this mean I definitely can't use the CFC with the cfgrid on MX7? Or is there a way to do it?
    Any advice would be greatly appreciated.

  • Help needed with PCR Interactive Forms.

    Hello,
    We are trying to get a prototype system going to show HR some WebDynpro and Adobe Forms technology. I'm focusing on our PCR's right now. I have fixed one problem by configuring the ABAP WAS in the java visual admin http destinations. I now want to take our ISR's and map them to adobe forms in QISRSCENARIO. I am looking at the available forms and wish to configure.
    - Transfer an Employee out of my Org - ISR_FORM_SPTR - The inactive SPTR form displays the following "The creation of this form has not yet been completed. Therefore, you cannot use the form at this time. The finished form will be available with the next release.SAP AG "
    - Move an Employee to a Vacancy in My Org - ISR_FORM_???? - This may be some old custom development on our part because I'm seeing nothing close in ISR forms.
    - Change an Employee in Current Position - ISR_FORM_SPPD - Displays form after a popup shows soem formcalc errors.
    - Separate an Employee - ISR_FORM_SPSD - Displays form
    - Change Working Time of an Employee - ISR_FORM_SPWT - Displays form after a popup shows soem formcalc errors.
    This is just a prototype so I'm not lookign to mesh all out pcr customizations. I do have some questions though.
    I can't seem to find anything telling me what adobe forms are delivered for a particular version of SAP. We are on ECC5.0.
    Is a form marked inactive simply not delivered? If not how do I activate?
    Basically we'll want to be using adobe forms wherever delivered for ECC50. Any pointers to documentation on what's delivered vs. what I'm seeing in QISRSCENARION would be greatly appreciated as well as any general docs on working with, modifying forms.
    Thanks,
    Doug

    Where to start with scripting:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    In first doc, check the last chapter for the most illustrative examples.
    You need to be able to get the value of the radio (var help = this.rawValue), use the condition (if (){} else {} )and set the value (this.rawValue = "").
    Otto

  • Help Needed with Adobe Interactive Forms scripts

    Hi Gurus,
    I have an Interactive form in which I have 5 radio buttons. Upon selecting any one of the radio buttons, some values (Ex : If user selects the first radi button 20 should be displayed in the text box. If he selects the second 21 should be displayed in the textbox.). In my script, I need to capture the checked value of the radio buttons ( They  are grouped) and how I should reference radio button on the form/subform
    Regards,
    Srini

    Where to start with scripting:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    In first doc, check the last chapter for the most illustrative examples.
    You need to be able to get the value of the radio (var help = this.rawValue), use the condition (if (){} else {} )and set the value (this.rawValue = "").
    Otto

  • Help needed in Master Detail Form - 2 level of details

    Hi,
    I have a form with 2 levels of Master Detail and a Find window
    The Datablocks are
    - Batch
    - Headers
    - Lines
    - Manual datablock for Find Wndow
    I have created relation between Bacthes and Headers with Batch Id
    I have created relation between Headers and Lines using HeaderId.
    The issue is that,
    If I search with '%' in Batch block, by default it will show results in 'Headers' and 'Lines' block.but if i navigate to the next record in batch block , only Headers block shows results but Lines block does not show result.
    If I search from Find window also, only Batch and Headers block shows results but Lines block will be empty.
    In the 'Batch' block if I search with specific data , the screen shows results in 'Headers' and 'Lines' block.
    Can you please help me solve it.
    I have written a PRE-QUERY on Batches block to set where clause from Find window.
    I have written a PRE-QUERY in Headers block to set where clause from Find window
    Thanks,
    Kamath.
    Thanks,
    Gowtam

    Hi,
    When you execute normal not by searching through ENTER_QUERY mode. Then data is coming in all blocks
    - Yes. Once I go to the Form if I search using '%' in batch block or search for a particlaur record i Batch block, the results shows up in Headers and Lines block.
    Ex: say there are 2 records in Batch block(A and B) and I search by %, by default i get 1 batth record (A) and corresponsding headers and lines
    now when i use down arrow key in the batch block, second record(B) will be showed in batch block. relevant Headers block records will be shown but Lines block does not get queried.
    Similarly if coem to the Form from search window then also, Batch and Header blcoks wil be shown but not Lines block
    PREQUERY at Batch Level_*
    V_WHERE := 'WHERE 1 = 1';
    IF :XXYH_ICAN_CALC_WB_FIND.PERIOD IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND PERIOD = '''||:XXYH_ICAN_CALC_WB_FIND.PERIOD||'''';
    END IF;               
    IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
    END IF;
    IF      V_WHERE IS NOT NULL THEN
         set_block_property('XXYH_ICAN_WB_BATCHES',DEFAULT_WHERE,V_WHERE );                          
    END IF;     
    PRE-QUERY at Header Level_
    IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
    END IF;
    IF      V_WHERE IS NOT NULL THEN
    set_block_property('XXYH_ICAN_WB_TRX_HEADERS',DEFAULT_WHERE,V_WHERE );
    END IF;     
    Thanks,
    kamath.

  • Help needed (New to Interactive form Integration for PDF)

    hi all,
    I am new to this intractive form integration.
    I just want to know from where i can get the basic infomration about my current setup that i have and if there is a need to upgrade then from where i can get the installables.
    1 How can i see my current installation is running on which support pack?
    2 Where i can get the Adobe life cycle disigner I mean it comes with some NWS version or you have to buy seperately if so then from where and what does it cost
    3 From where i can get the Installable to install the ACF on my machine ? Is it also cost something or freely available.

    1. With your Java stack running, call the Engine homepage at http://<server>:<port>/index.html, and click on System Information. (You can also go there directly: http://<server>:<port>/sap/monitoring/SystemInfo.)
    The information is on the top right under Software Components. You can also use the link All components to get more details, i.e. the ADS version.
    2. Go to the SAP Service Marketplace at http://service.sap.com/download and search for 'Designer'. Choose version 7.1 if you're higher than NW 2004s SPS5, otherwise take 7.0.
    3. All ACF information is in SAP Note 766191.
    Cheers,
    Markus Meisl
    SAP NetWeaver Product Management

  • Help needed creating a fillable form and emailing it.

    I'm new to all this and have no clue where to start.  If there is a document that lays out how to do this, a link to it would work.  I need to create 2 fillable forms.  1 will need a submit button and once you click submit, it automatically sends the form.  The 2nd one will need to allow the end user to select to whom the document is to go to.  I think it will have to open an email message to do this, but I'm not sure.  Please advise.

    It's probably the fields highlight color of the application, which you can change via Edit - Preferences - Forms.

  • Help needed with looping a function

    Hello experts,
    I am in a bit of a mess of ideas,
    I have a form with various search fields.
    based on the values i am passing, i am returning some values back to my form
    below is my function
    CREATE OR REPLACE function LOTTO_EROUTES.f_forecast(p_ret_num        in varchar2,
                                                        p_item_id        in number,
                                                        p_curr_date      in date,
                                                        p_expected_stock out number ,
                                                        p_actual_stock   out number,
                                                        p_inst_settled   out number,
                                                        p_prev_date      out date  ,
                                                        p_range          out number,
                                                        l_settled_avg    out number,
                                                        p_coefficient    out number                                                 
    return number is
    l_forecast_num number;
    l_curr_cdc  varchar2(6);
    l_prev_cdc varchar2(6);
    l_forecast_err varchar2(50) := 0;
    l_game_id number;
    begin
      select game_id,STOCK_COEFF_LEVEL_DAYS,IPS_SETTLED_RANGE_DAYS
      into l_game_id,p_coefficient,p_range
      from items
      where item_id =p_item_id;
    l_curr_cdc  := ltrim(rtrim(to_char(f_get_cdc_num(p_curr_date),999999)));
    l_prev_cdc := (l_curr_cdc - p_range);
    p_prev_date := f_get_cdc_date(l_prev_cdc);
    select count(serial_number)
    into p_inst_settled
    from LOTTO_INSTANT_TRACK
    where game_id = l_game_id
    and retailer_num = p_ret_num
    and status = 'Settled'
    and cdc between l_prev_cdc and l_curr_cdc ;
    l_settled_avg := ceil(p_inst_settled / p_range);
    p_expected_stock := ceil(l_settled_avg * p_coefficient);
    select count(serial_number)
    into p_actual_stock
    from LOTTO_INSTANT_track
    where game_id = l_game_id
    and retailer_num = p_ret_num
    and status like 'Confirmed';
    l_forecast_num := ceil((p_expected_stock - p_actual_stock));
    return l_forecast_num;
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    return l_forecast_err;
    end;
    /Now in my function i am passing 1 single value for p_ret_num(retailer number), i value for p_item_id and p-curr_date which is default sysdate.
    now i should be able to pass all retailer number and return those values accordingly.
    I am thinking of having an LOV that will have "ALL" option whereby the user will select and it should return all its corresponding values.
    I know i should be having a loop but don't know how to do that. Can anyone guide me plz.
    Thanks

    not using cursor for performance issues. well from what i've learnt.
    yes, exactly. each and everytime its just replacing the values in the first row itself.
    unhandled exception error
    f_forecast function
    CREATE OR REPLACE function LOTTO_EROUTES.f_forecast(p_ret_num        in varchar2,
                                                        p_item_id        in number,
                                                        p_curr_date      in date,
                                                        p_salesperson    out varchar2,
                                                        p_expected_stock out number,
                                                        p_actual_stock   out number,
                                                        p_inst_settled   out number,
                                                        p_prev_date      out date  ,
                                                        p_range          out number,
                                                        l_settled_avg    out number,
                                                        p_coefficient    out number                                                 
    return number is
    l_forecast_num number;
    l_curr_cdc  varchar2(6);
    l_prev_cdc varchar2(6);
    l_forecast_err varchar2(50) := 0;
    l_game_id number;
    begin
      select game_id,STOCK_COEFF_LEVEL_DAYS,IPS_SETTLED_RANGE_DAYS
      into l_game_id,p_coefficient,p_range
      from items
      where item_id =p_item_id;
    select salesperson
    into p_salesperson
    from lotto_retailers
    where retailer_num = p_ret_num;
    l_curr_cdc  := ltrim(rtrim(to_char(f_get_cdc_num(p_curr_date),999999)));
    l_prev_cdc := (l_curr_cdc - p_range);
    p_prev_date := f_get_cdc_date(l_prev_cdc);
    select count(serial_number)
    into p_inst_settled
    from LOTTO_INSTANT_TRACK
    where game_id = l_game_id
    and retailer_num = p_ret_num
    and status = 'Settled'
    and cdc between l_prev_cdc and l_curr_cdc ;
    l_settled_avg := ceil(p_inst_settled / p_range);
    p_expected_stock := ceil(l_settled_avg * p_coefficient);
    select count(serial_number)
    into p_actual_stock
    from LOTTO_INSTANT_track
    where game_id = l_game_id
    and retailer_num = p_ret_num
    and status like 'Confirmed';
    l_forecast_num := ceil((p_expected_stock - p_actual_stock));
    return l_forecast_num;
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    return l_forecast_err;
    end;
    /calling in my button
    declare
         default_date date := :oe_header.order_date;
    begin
         :oe_lines.order_date_disp := default_date;
    go_block('OE_LINES');
         FOR Get_Ret IN (select retailer_num
                            from lotto_retailers
                            where agent_status_id = 2
                            AND retailer_num = DECODE(:criteria.retailer_num,0,retailer_num,:criteria.retailer_num))
              LOOP
              :OE_LINES.retailer_num := Get_Ret.retailer_num;
              :OE_LINES.FORECAST_CNT := f_forecast(
                      :OE_LINES.retailer_num ,
                                  :criteria.item_id,
                                  :OE_LINES.order_date_disp,
                                  :OE_LINES.salesperson,
                                  :OE_LINES.expected_stock,
                                  :OE_LINES.current_retailer_stock,
                                  :OE_LINES.avg_calculated_amt,
                                  :OE_LINES.from_date,
                                  :OE_LINES.calc_stock_coefficient,
                                  :OE_LINES.avg_daily_sales,
                                  :OE_LINES.stock_coefficient_used
              :OE_LINES.AVG_WEEKLY_SALES := (     :OE_LINES.avg_daily_sales * 7 );
              next_record;
         END LOOP;
    END;

  • Ipad form ....help needed please.  Clear form after email as read only and sequential numbering

    Hi
    i am a complete novice at this however this is what I want to achieve.
    i Have a paper duplicate report sheet that I want to get electronically, I want to be able to add sequential numbers to each report and be able to email the report to the client from a email field in the form
    so far I have so I have created the pdf form, I have a button that runs a JavaScript that will hide the submit button and then send to the clients email and to bcc myself so I have a copy of the report also. This has been tested and works
    i Am struggling with sequential numbering and once the form has been emailed it's un-ditable as the JavaScript has converted it to read only for emailing which is good as it can't be edited. But Is there a way on my submit button to email the report as read only and then clear all form fields in the report ready for filling with the next sequential number?
    I Have had a good look sound for a resolution to this but am struggling
    many thanks in advance for any feedback
    paul

    Hi Paul,
    I presume that you are using the desktop version of Acrobat Pro to author the form.
    I will move this discussion to the PDF Forms forum so that the experts in the forum can answer your question.
    Please note that the Reader/Acrobat DC mobile apps (for iOS, Android, Windows Phone, etc.) have limited JavaScript support.
    JavaScript for Reader Mobile API Reference (iOS)
    You may be able to make the form work as you want in the desktop version of Adobe Reader/Acrobat Reader DC.  However, some functionality (e.g adding a sequence number to each PDF) will not work in the mobile apps due to the limited JavaScript support.  Sorry for the inconvenience.

  • Help Needed in AD Connection form Java Code

    Hi,
    I want to connect to AD target form my java program.
    We are doing this as we don't want to use the OOTB Connectors.
    How can any one connect to AD target from Java program?
    After connecting,
    How to Create a User in AD? Is there any API? Which one?
    Regards,
    SK

    You'll want to do a search on JNDI and Java code. There are lots of sample code available on the web and tutorials. Here's a list of the classes you'll probably be using:
    import javax.naming.CommunicationException;
    import javax.naming.Context;
    import javax.naming.NameNotFoundException;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.OperationNotSupportedException;
    import javax.naming.directory.Attribute;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.BasicAttribute;
    import javax.naming.directory.BasicAttributes;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.ModificationItem;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    -Kevin

  • Help needed to display my form,very urgent

    i have a Main.java to display my tabs, then a PlayerTab.java which contains all the buttons, Create, Update, Delete and View and a CreatePanel.java which contain the form for adding new members.
    The flow is like this when user click on the PlayerTab it will show the 4 buttons.Then when user click on the Create button, i want to show the create panel which contains the form which is inside CreatePanel.java.Then click on other buttons will show other forms. Please teach me how to hide the forms too thanks.
    Main.java
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Image;
    import java.awt.Graphics;
    import java.awt.Toolkit;
    import javax.swing.BorderFactory;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    public class Main extends JFrame {
         // Constructor
         public Main(){
              setSize(800,600);
              setTitle("S-League Management System");
              setResizable(false);
              setVisible(true);
              Container frame=getContentPane();
              //centralise the screen
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension frameSize = frame.getSize();
              frame.setLocation((screenSize.width - frameSize.width) / 2,
                   (screenSize.height - frameSize.height) / 2);
              // create new tabbedPane object
              JTabbedPane tabbedPane = new JTabbedPane(){
                   ImageIcon imageIcon = new ImageIcon("");
                   Image image = imageIcon.getImage();
                   public void paintComponent (Graphics g) {
                        g.setColor(new Color(220,220,220));
                        g.fillRect(0,0,800,74);
                        g.drawImage(image, 0, 4, this);
                        super.paintComponent(g);
              //tabbedPane.addTab(" Team Management ", null, new TeamTab());
              tabbedPane.addTab(" Player Registration ",null, new PlayerTab());
              //tabbedPane.setSelectedIndex(1);
              tabbedPane.setBorder(BorderFactory.createEmptyBorder(78,0,0,0));
              frame.add(tabbedPane);
         public static void main(String[] args) {
              Main main = new Main();
              main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              main.toFront();
              main.show();     
    PlayerTab.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class PlayerTab extends JPanel implements ActionListener{
         //JPanel mainPanel = new JPanel();
         JButton createbutton = new JButton("Create");
         JButton updateButton = new JButton("Update");
         JButton deleteButton = new JButton("Delete");
         JButton viewButton = new JButton("View");
         public PlayerTab() {
              this.setLayout(null);
              createbutton.setBounds(new Rectangle(10, 16, 79, 27));
              updateButton.setBounds(new Rectangle(10, 64, 79, 27));
              deleteButton.setBounds(new Rectangle(10, 113, 79, 27));
              viewButton.setBounds(new Rectangle(10, 161, 79, 27));
              this.add(createbutton, null);
              createbutton.addActionListener(this);
              this.add(updateButton, null);
              updateButton.addActionListener(this);
              this.add(deleteButton, null);
              deleteButton.addActionListener(this);
              this.add(viewButton, null);
              viewButton.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              String cmd = e.getActionCommand();     
              if ("Create".equals(cmd))     
                   JPanel createPanel = new CreatePanel();
                   createPanel.show();
              }//close of if
         }//close of action perform
    CreatePanel.java
    import java.awt.*;
    import javax.swing.*;
    public class CreatePanel extends JPanel {
         JPanel createPanel = new JPanel();
         JLabel jLabel1 = new JLabel();
         JLabel jLabel2 = new JLabel();
         JLabel jLabel3 = new JLabel();
         JLabel jLabel4 = new JLabel();
         JLabel jLabel5 = new JLabel();
         JLabel jLabel6 = new JLabel();
         JLabel jLabel7 = new JLabel();
         JLabel jLabel8 = new JLabel();
         JLabel jLabel9 = new JLabel();
         JTextField nricNo = new JTextField();
         JTextField name = new JTextField();
         JRadioButton singleRadio = new JRadioButton();
         JRadioButton marriedRadio = new JRadioButton();
         JRadioButton divorcedRadio = new JRadioButton();
         JComboBox position = new JComboBox();
         JComboBox team = new JComboBox();
         JTextField address = new JTextField();
         JTextField salary = new JTextField();
         JTextField contactNo = new JTextField();
         JTextField dob = new JTextField();
         JButton submitButton = new JButton();
         JButton clearButton = new JButton();
         JButton retrieveButton = new JButton();
         public CreatePanel() {
              createPanel.setBounds(new Rectangle(108, 10, 690, 472));
              createPanel.setLayout(null);
              jLabel1.setText("NRIC:");
              jLabel1.setBounds(new Rectangle(14, 6, 41, 17));
              jLabel2.setText("Name:");
              jLabel2.setBounds(new Rectangle(14, 48, 41, 17));
              jLabel3.setText("Address:");
              jLabel3.setBounds(new Rectangle(14, 90, 57, 17));
              jLabel4.setText("Salary:");
              jLabel4.setBounds(new Rectangle(14, 132, 41, 17));
              jLabel5.setText("Contact No:");
              jLabel5.setBounds(new Rectangle(14, 174, 68, 17));
              jLabel6.setText("Marital Status:");
              jLabel6.setBounds(new Rectangle(14, 216, 83, 17));
              jLabel7.setText("Position:");
              jLabel7.setBounds(new Rectangle(14, 258, 58, 17));
              jLabel8.setText("D.O.B:");
              jLabel8.setBounds(new Rectangle(14, 300, 41, 17));
              jLabel9.setText("Team:");
              jLabel9.setBounds(new Rectangle(14, 342, 41, 17));
              nricNo.setText("jTextField1");
              nricNo.setBounds(new Rectangle(101, 3, 63, 21));
              name.setText("jTextField2");
              name.setBounds(new Rectangle(101, 44, 63, 21));
              singleRadio.setSelected(true);
              singleRadio.setText("Single");
              singleRadio.setBounds(new Rectangle(102, 210, 103, 25));
              marriedRadio.setText("Married");
              marriedRadio.setBounds(new Rectangle(221, 210, 103, 25));
              divorcedRadio.setText("Divorced");
              divorcedRadio.setBounds(new Rectangle(340, 210, 103, 25));
              position.setBounds(new Rectangle(102, 256, 128, 24));
              team.setBounds(new Rectangle(102, 337, 128, 24));
              address.setText("jTextField3");
              address.setBounds(new Rectangle(101, 87, 63, 21));
              salary.setText("jTextField4");
              salary.setBounds(new Rectangle(101, 130, 63, 21));
              contactNo.setText("jTextField5");
              contactNo.setBounds(new Rectangle(101, 171, 63, 21));
              dob.setText("jTextField6");
              dob.setBounds(new Rectangle(103, 299, 63, 21));
              submitButton.setText("Submit");
              submitButton.setBounds(new Rectangle(114, 409, 79, 27));
              clearButton.setText("Clear");
              clearButton.setBounds(new Rectangle(332, 409, 79, 27));
              retrieveButton.setText("Retrieve");
              retrieveButton.setBounds(new Rectangle(356, 0, 105, 27));
              createPanel.add(clearButton, null);
              createPanel.add(submitButton, null);
              createPanel.add(jLabel1, null);
              createPanel.add(nricNo, null);
              createPanel.add(jLabel2, null);
              createPanel.add(name, null);
              createPanel.add(jLabel3, null);
              createPanel.add(address, null);
              createPanel.add(jLabel4, null);
              createPanel.add(salary, null);
              createPanel.add(jLabel5, null);
              createPanel.add(contactNo, null);
              createPanel.add(jLabel6, null);
              createPanel.add(singleRadio, null);
              createPanel.add(marriedRadio, null);
              createPanel.add(divorcedRadio, null);
              createPanel.add(jLabel7, null);
              createPanel.add(position, null);
              createPanel.add(jLabel8, null);
              createPanel.add(dob, null);
              createPanel.add(jLabel9, null);
              createPanel.add(team, null);
              createPanel.add(retrieveButton, null);
              add(createPanel);

    1. make createPanel an instance variable
    public class PlayerTab extends JPanel implements
    ActionListener{JPanel createPanel = null;
    2. consistent with how you are coding, add the panel,
    public void actionPerformed(ActionEvent e)
    String cmd = e.getActionCommand();
    if ("Create".equals(cmd))
    {if( null == createPanel ) {
    createPanel = new CreatePanel();
    createPanel.setBounds( 20, 16, 300, 300 );
    add( createPanel, null );
    createPanel.show();
    }//close of ifyou can also search for the specific panel, remove and then add a new instance rather then reusing the same createPanel once it is instantiated.

  • Help needed passing parameters to forms

    Hi guys a quick run down of my issues and what i am struggling to achieve.
    I have a tree based form with a list of values in the tree. When you double click one of the values it opens a new form and passes in a parameter list containing the value in the tree. On one of the triggers i then check the parameter and query the form based on that parameter. This works perfectly at present.
    The problem comes when you double click the value in the tree but the form is already open.
    I currently check if already open and if the form is already open use GO_FORM rather than OPEN_FORM.
    The problem comes that i can then not pass in my parameter list using GO_FORM and therefore the form does not have the parameter in place to query the records.
    Any idea how i can get this to work?
    I thought about globals but multiple people maybe accessing the form at the same time and this could cause problems if two people using this at the same time. Any other ideas?

    I thought about globals but multiple people maybe accessing the form at the same time and this could cause problems if two people using this at the same time. Any other ideas?You mean that if many peoples/sessions will use the same form from there side then GLOBAL values will be replaced are you sure for this or did u try? I don't think because GLOBAL variable will contain separate value in the separate session.
    -Ammad

Maybe you are looking for

  • How do you determine what is causing a reoccurring kernel panic?

    I need help trying to determine what is causing a reoccurring kernel panic. Mon Oct 27 14:59:57 2014 panic(cpu 0 caller 0x235410): "zalloc: \"kalloc.8192\" (209 elements) retry fail 3, kfree_nop_count: 0"@/SourceCache/xnu/xnu-1504.15.3/osfmk/kern/zal

  • Cant install itunes (file security error) PLEASE HELP

    I uninstalled itunes because i could not update it. now when i try to install it it comes up with this  "error getting file security: C:\programdata\Apple\Apple Application Support\kdrl\GetLastError:5" Can you please help me. Thanks

  • Convert SAPSCRIPT forms to PDF

    We need to do a report that can generate several pdfs from a payment run (SAP-FI), so we need to have one pdf  for each payment in the run (they are in SAPSCRIPT form). The program that we use is copy of "J_1AF012" and the we use "SX_OBJECT_CONVERT_O

  • Transaction Launcher for WebUI

    Hi, hope anybody can help. Is it possible to open a external WebPage in a WebUI assignment block by using the transaction launcher? We need to add a custom assignment block to the appointment WebUI which show informations from a other system. This ot

  • Working with Canon 5D standard definition video

    I'm facing an odd situation. Just started editing a documentary shot with a Canon 5D camera. The picture looks great. The only thing is, the cameraman decided that this is a video and he didn't need to shoot HD! I don't know why he thought that, sinc