How to create unique object for dynamically created jTextFields

Hello to all forum members
According to my requirement , i have created a number of jpanels(containing textfield,comboboxes etc) and added them to a jScrollPane.
But my requirement is after adding the jPanels to the JScrollPanel, i want to add some logic to that jpanels; like
1) i want to sort the panels according to some condition when a sort button is clicked
2)and the text field which are in the panel should be sorted according to the integer value inside the text field.
3) and after a buton clicked the value what are in the jText field should store in the data base etc.....
For the above logic to apply i need the instance variable(i.e object reference ) should be difference, so that when i want to get a value from any component ( text from jtextfield ) i can get the value through its instance variable name.for example
JTextField textField1=new JTextField("aaa");
JTextField textField2=new JTextField("cccc");
JTextField textField3=new JTextField("eee");then
textField1.getText();
textField2.getText();
textField3.getText();But the problem is when i am creating the number of panels the name of the instance variables (of all the components i.e textfield ,panels)are same so i can't add the logic to any particular component.
I have tried to solve this problem , but not getting any idea .Please help me to find out the solution. I hope i explained my problem clearly if not
tell me i will explain it again.
I have given here with the code in which i have created 100 jpanels , each jpanels consisting of 1label and 1text field but the instance variable for each component is same.
Plese help me to solve this problem,Thanks in advance.
import javax.swing.*;
public class NestedPanels extends JFrame
  private static final int NO_OF_NESTED_PANELS = 100;
  public NestedPanels()
    super("Nested Panels");
    setSize(200, 200);
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
     for ( int i=1; i<=NO_OF_NESTED_PANELS; i++)
         mainPanel.add(createChildPanel(i));
     javax.swing.JScrollPane jScrollPane = new javax.swing.JScrollPane();
     jScrollPane.setViewportView(mainPanel);
    getContentPane().add(jScrollPane);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setVisible(true);
  private JPanel createChildPanel(int intChildPanelNumber)
    JPanel childPanel = new JPanel();
    childPanel.setLayout(new BoxLayout(childPanel, BoxLayout.X_AXIS));
    childPanel.add(new JLabel("" + intChildPanelNumber));
    childPanel.add(new JTextField());
    return childPanel;
  public static void main(String[] argv)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
      public void run()
        NestedPanels example = new NestedPanels();
}Thanks & Regards
Mahendra

Hi to all forum members,
Thanks for all your help.
JayDS, as you have told i have tried with
return Integer.valueOf( getText() ).compareTo( Integer.valueOf( mp.getText() ) );but it is giving
java.lang .NumberFormatException.forInputString(unknown source)
sorry i could not get what is SSCE?
I am sending the code here with my requirement.
My requirement is to sort the panels.
i.e.
when I will click on to the sortC1 button , the whole panels should be sorted according to the integer value inside the textfield1 (but here in my code it is sorting string wise,if u enter 1,2 ,1111111,3 ,222 the output should be 1,2,3, ,222 ,1111111 but it is actually giving the output as 1, 1111111,2,222,3 which is wrong )
Arrays.sort(NestedPanelSorting); => this method is used for sorting
return getText().compareTo(mp.getText());=> method is used for the text comparision in the example ( NestedPanelSorting.java)
sortC2 also same.
When I will click sortC3 ,the panel will be sorted according to the string values in the dropdown of combo boxes. Here how to access the instance of combobox to sort or the panel or through array of objects how can i sort?
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import javax.swing.*;
public class NestedPanelSorting extends JFrame
    private static final int NO_OF_NESTED_PANELS = 10;
    private MyPanel[] NestedPanelSorting = new MyPanel[NO_OF_NESTED_PANELS];
    //MyPanel[] is a array of MyPanel objects declared below
     private JPanel mainPanel;
    private JScrollPane jScrollPane;
     public NestedPanelSorting()
        super("Nested Panels Sorting");
        setSize(400, 200);
        mainPanel = new JPanel();
        mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
        //in the for loop below MyPanel(i) is called through NestedPanelSorting[i]
          for (int i = 0; i < NestedPanelSorting.length; i++)
            NestedPanelSorting[i] = new MyPanel(i);
            mainPanel.add(NestedPanelSorting);
jScrollPane = new javax.swing.JScrollPane();
jScrollPane.setViewportView(mainPanel);
getContentPane().add(jScrollPane, BorderLayout.CENTER);
JButton myBtn1 = new JButton("sortC1");
          JButton myBtn2 = new JButton("sortC2");
          JButton myBtn3 = new JButton("sortC3");
getContentPane().add(myBtn1, BorderLayout.EAST);
getContentPane().add(myBtn2, BorderLayout.WEST);
getContentPane().add(myBtn3, BorderLayout.SOUTH);
          myBtn1.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent arg0)
myButtonAction(arg0);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setVisible(true);
private void myButtonAction(ActionEvent arg0)
          //this Array.sort() method is for sorting the array -
          // accordig to string value but i need to sort integer value wise
Arrays.sort(NestedPanelSorting);
          mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel,
BoxLayout.Y_AXIS));
for (int i = 0; i < NestedPanelSorting.length; i++)
mainPanel.add(NestedPanelSorting[i]);
jScrollPane.setViewportView(mainPanel);
     public static void main(String[] argv)
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
new NestedPanelSorting();
//declaring of MyPanel class where textfield1,txtField2,comboBox1 are added
     class MyPanel extends JPanel implements Comparable<MyPanel>
private int number;
private JTextField txtField1;
          private JTextField txtField2;
private JComboBox comboBox1;
public MyPanel(int number)
               super();
this.number = number;
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(new JLabel(String.valueOf(number)));
txtField1 = new JTextField();
add(txtField1);
               txtField2 = new JTextField();
add(txtField2);
               comboBox1=new JComboBox();
               comboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ITEM  1 ", "ITEM  2 ", "ITEM  3 ", "ITEM  4 ","ITEM  5 " }));
               add(comboBox1);
public int getNumber()
return number;
          public String getText()
               if (txtField1.getText() == null)
return "";
               return txtField1.getText();
     public int compareTo(MyPanel mp)
          return getText().compareTo(mp.getText());
          //return Integer.valueOf( getText() ).compareTo( Integer.valueOf( mp.getText() ) );

Similar Messages

  • How to create custom BOL object for dynamic query in CRM 7.0

    Hi,
    Could anyone please explain me with steps that how to create the custom BOL object for dynamic query in CRM 7.0, I did it in previous version but its throwing exception when i try to create the object of my dynamic query class. I just defined the entry of my in crmv_obj_btil to create the dynamic query BOL object. do i need to do any other thing also to make it work?
    Regards,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Jul 6, 2009 5:12 PM

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • How to create unique objects in class and store

    Hi, I have a class that opens a text file and reads in the
    lines. each line holds an ip address. i need to create x amount of
    objects, and each object is assigned a unique ip address from the file.
    and here i am stuck. the class reads in the file, then i think it should create an object for each line read in and assign that object the ip address. i want to store the objects in some sort of array or collection, and i guess each object will need a unique name, but i dont know how many objects until i read in the file and count the number of lines. can anyone give me any pointers as to how i should create/store the objects
    many thanx
    ness

    You could use your own object:
    public class Test {
      public class IPNumber {
        public int ip;
        public IPNumber(int ip) {
          this.ip = ip;
      public Test() {
        int numberOfIPs = 5; // this is your number of lines
        IPNumber[] ips = new IPNumber[numberOfIPs];
        for (int i = 0; i < numberOfIPs; i++) ips[i] = new IPNumber(i); // assign ip address from file
      public static void main(String args[]){
        new Test();
    }or you could store the ips as strings:
    public class Test {
      public Test() {
        final int numberOfIPs = 5; // this is your number of lines
        final java.util.ArrayList al = new java.util.ArrayList(numberOfIPs);
        for (int i = 0; i < numberOfIPs; i++) al.add(""+i); // assign ip address from file   
      public static void main(String args[]){
        new Test();
    }p.s Objects don't have names

  • How to create a object for IPageItemControlData?

    how to create a object for IPageItemControlData?

    From the header comment you'll see that IPageItemControlData is an Interface of PageItemWidget. That must've been an InDesign 1.0 or 1.5 feature predating kPageItemBoss, because except for the same comment even in InDesign 2.0 SDK the only further reference is a copy in the comment of its sibbling IFrameControlData which was removed with InDesign CS.
    The IID and kPageItemControlDataImpl are probably only around because deep under the hood there must be some kind of conversion provider waiting to do its job on a very old document.
    I guess the closest in today's functionality will be IHierarchy.
    Dirk

  • How to create Activex object for my Visual C++ object

    Hi,
    I am working on development on Acrobat 9.0 SDK. I am facing problem is that I can compiled Visual C++ source code to an api. I can test functions on this api on Acrobat 9.0 windows, but I could not test it on IE web browser, because I don't know how to create Activex object from my Visual C++ source code or its api.
    I read Acrobat 9 SDK document and found under C:\Acrobat 9 SDK\Version 1\PluginSupport\Tools\Visual Studio App Wizard has two files: Acro9PIWizInstaller.msi and setup.exe. I am not very sure those file are the key to help me to create Activex objects for my api.  Are they the one I need to create Activex object? If not, could you please advise me how to create Activex object for my api or C++ codes.
    Thanks a lot for any of your comments or advices.
    Thai

    Hi lrosenth,
    Thanks a lot for your information.
    My question is, on Javascript how do I call a function from .api. Below is my very simple test.
    I got a function on BasicPlugin.cpp under C:\Acrobat 9 SDK\Version 1\PluginSupport\Samples\BasicPlugin. See below.
    I added BasicPlugin.api on C:\Program Files\Adobe\Acrobat 9.0\Acrobat\plug_ins
         ACCB1 int ACCB2 MyPluginCommand() {
              int num = 5;
              return num;
    On my HTML file, I create an <Object> below:
        <OBJECT id="acrobatapp"
                classid="clsid:85DE1C45-2C66-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT id="acrobatpdf"
                classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"   >
            <Param name="SRC" value="http://www.adobe.com/devnet/acrobat/pdfs/acrobat_digital_signature_appearances_v9.pdf">
       </OBJECT>
    On my Javascript. I call function MyPluginCommand() as below, but it is not working. How do I call function MyPluginCommand() on Javascript?
         var acrobatapp= document.getElementById("acrobatapp");
         var num= acrobatapp.MyPluginCommand();
         alert(num);
    Thanks for your support,
    Thai

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • How to create subproject & Object for LSMW

    How to create subproject & Object for LSMW

    Rahul,
    ??? enter their names, select 'Create'.  If you do not have the 'Create' button displayed, you are not authorized.  See your local authorization person.
    Best Regards,
    DB49

  • How  to create  authorisation object for  report

    hi
    experts..
    hw  can u  create authorisation object for  the  custom report.
    Thanks&  Regards
    Spandana

    Hi,
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Sy-SUBRC values
    4              User has no authorization in the SAP System for
                   such an action. If necessary, change the user
                   master record.
    8              Too many parameters (fields, values). Maximum
                   allowed is 10.
    12             Specified object not maintained in the user
                   master record.
    16             No profile entered in the user master record.
    24             The field names of the check call do not match
                   those of an authorization. Either the
                   authorization or the call is incorrect.
    28             Incorrect structure for user master record.
    32             Incorrect structure for user master record.
    36             Incorrect structure for user master record.
    http://www.sap.ittoolbox.com/groups/technical-functional/sap-basis/please-how-to-create-an-authorization-object-386391 - 78k -
    http://www.sap-abaprogram.blogspot.com/2007/11/what-is-use-of-
    authorization-checks-to.html - 75k -
    www.sapworld.hpg.ig.com.br/download/ab4query.pdf
    with thanks,
    Abaper.

  • Creating Activity object for a Service Request object...

    <b>[This thread was migrated from the On Demand Developer Forum in the old Siebel Community] </b>
    drangineni
    New Contributor
    Ho do we use Activity object of a Service Request object. I am trying to
    create an Activity object for a existing Service Request object.
    I am looking for some sample code.
    I greatly appreciate your help.
    Product: CRM OnDemand
    11-26-2006 12:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, What programming language are you using?
    BS
    12-04-2006 10:56 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Hi, I am using C# .
    12-04-2006 07:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, assuming you know the service requestid or externalId of the
    Sr you are dealin gwith you would first set that value.
    ServiceRequest1[] objSRList =new ServiceRequest1[1];
    objSRList[0] = new ServiceRequest1();
    objSRList[0].ServiceRequestId = <YourSRId>;
    Then you create an array of activities and initialize the first one:
    objSRList[0].ListOfActivity = new Activity[1];
    objSRList[0].ListOfActivity[0] = new Activity();
    Now set the data fields
    objSRList[0].ListOfActivity[0].Subject ="My Subject";
    objSRList[0].ListOfActivity[0].Description ="My Description";
    objSRList[0].ListOfActivity[0].Display = "Task"; //valid values are either
    "Task" or "Appointment"
    Then call the ServiceREquestInsertOrUpdate method on the ServiceRequest
    WebService and pass in the above variable.
    BS
    12-06-2006 12:36 PM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-09-2006 09:53 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-10-2006 08:49 AM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    Ah yes, I forgot you also need to specify a unquie Id for the activity.
    It's kinda strange.
    Try adding this:
    ServiceRequest[0].ListOfActivity[ActivityLength].ActivityId = "DummyId";
    //OD will overwrite this with a real Id
    Or if you have a unquie ID for your Activities you can use:
    ServiceRequest[0].ListOfActivity[ActivityLength].ExternalSystemId = <Your
    Unique Value>;
    Hope that helps,
    BS
    12-11-2006 10:52 AM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Hi all,
    I have a similar problem, but mine is returning a message that field
    "Display" is required. Looking at this post and the documentation it is
    obvious that Display is a required field, but my WSDL did not include a
    field called "Display", so my proxy did not generate one.
    I tried adding a field called Display to the WSDL and the proxy class, but
    I get a different error... I figure I maybe cannot add it manually like
    that - but I think the bigger problem is it is not part of the WSDL that
    Siebel OD generates for me in my admin account.
    On top of that Display is not shown in the list of fields for Activity
    through the admin interface.. is it possible my account is bugged? Am I
    missing something simple here? BigSlick, I see you mention a .Display in
    your code sample so I thought you might understand what is wrong. Here is
    my code (I am trying to add a activity to a lead).
    Thanks for any insight into this!
    private void InsertLeadActivity(Session session, NameValueCollection data,
    string leadID)
    try
    if (blnDebug)
    Response.Write("Setting up Activity<br>";
    // instantiate the proxy service
    Activity_Service.Activity activityProxy = new Activity_Service.Activity();
    // set up the target URL
    activityProxy.Url = session.GetURL();
    activityProxy.CookieContainer = session.GetCookieContainer();
    // set up input argument
    ActivityNWS_Activity_Insert_Input input = new
    ActivityNWS_Activity_Insert_Input();
    input.ListOfActivity = new Activity1[1];
    input.ListOfActivity[0] = new Activity1();
    if (blnDebug)
    Response.Write("Getting Data<br>";
    // dg note: name value
    // input.ListOfActivity[0].MrMrs = data["MrMrs"];
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    //input.ListOfActivity[0].Display = "Task";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    activityProxy.Activity_Insert(input);
    catch (Exception exInsertActivity1)
    if (blnDebug)
    Response.Write("<br>Error inserting activity.<br><br>" +
    exInsertActivity1.ToString() + "<br>";
    01-06-2007 05:05 PM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Figured it out.. the field "Display" is also known as "Activity"........
    Here are some notes for other people.. good luck and feel free to write me
    at raskawa-at-gmail-com if you want a code sample.
    Some unpublished nice to knows for Siebel On Demand Activities....
    In summary:
    - .Activity is also known as Display in documentation and on the error
    messages coming back from the WS. Also, it appears based on these boards
    some people actually have a .Display field. Maybe different accounts
    generate different WSDL's.... buggy.
    - If a error message is thrown saying "Description is required" it really
    means "Subject is required" (make sure .Subject has a value)
    - If a error message is thrown complaining that ActionType is not right..
    that is really .Type.. make sure it's lookup value is valid for the
    dropdown values in your CRM OD system.
    My code/values that worked..
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    //input.ListOfActivity[0].Display = "Task"; //doesn't work
    input.ListOfActivity[0].Activity = "Task"; //does work.
    01-06-2007 05:17 PM
    Re: Creating Activity object for a Service Request object...
    raskawa
    First Time Contributor
    Hi,
    This is surgientweb (under my own login now..)
    Anyway, I wanted to add that I figured out that there are two ways to add
    a Activity to a Lead. Via the Lead object (by getting a ListOfActivities)
    OR by creating a Activity directly and just adding your "LeadID" to it (or
    you can also add a "ContactID" to relate the activity to a Contact.)
    Feel free to email me for a code example (raskawa....at....gmail)
    -David
    01-09-2007 02:58 PM

    Hi Stephane,
    You can definitely read the categories using Tables in CRM. The logic is a bit complicated though.
    Use the following steps to retrieve Categories using Std. CRM Tables:
    1. Pass transaction GUID in field GUID of table CRMV_REPORT_SUBJ and get KATALOGART, CODEGRUPPE and CODE field values in lv_catalog, lv_codegrp and lv_code.
    2. Now you need to concatenate these 3 fields values carefully like this:
    CONCATENATE lv_catelog lv_codegrp '    ' lv_code into lv_category1.
    Remember there are 4 spaces between lv_codegrp and lv_code.
    3. Now pass this lv_category1 in field OBJEXT in table CRMC_ERMS_CAT_OK and get OBJGUID in field lv_objguid.
    4. Pass this lv_objguid in field OBJ_GUID and LNK_TYPE = 'IS_CODE' in table CRMC_ERMS_CAT_LN and get value of CAT_GUID in lv_cat_guid.
    5. Pass this lv_cat_guid in field CAT_GUID in table CRMC_ERMS_CAT_CA and get value of CAT_ID in field lv_cat_text.
    Remember this lv_cat_text is the text value of your last level of category of transaction.
    6. To get its upper cateogry level value, simply use table CRMC_ERMS_CAT_HI and get parent guid value and pass this as CAT_GUID again in table CRMC_ERMS_CAT_CA to get its text.
    Alternatively, you can also use class method cl_crm_ml_category_util=>get_parse_all to get all levels of categories.
    Hope this helps.
    Thanks
    Vishal

  • TestStand create different object for singleton class

    Hi all,
    we have a singleton class which has some functions used to do testing a harware.
    Our main Exe will create an object for that singleton class(which opens Com1 port and communicate with hardware). so the Exe will do basic communication test with hardware it is working well. We are using Teststand operator interface to do various testing by using sequence files. Main exe will use teststand usercontrols to execute tests when the user clicks Testbutton. after that, teststand try to create an object for that singleton but it returns new object not the existing one which is created by EXE. So it throwing me exeception "Com1 port access denied." (since we created object for signleton class @ very first in EXE)
    My question is Since that teststand runs in a separate Appdoamin will the singltonclass create separate object for different appdomain? if so is there any solution to reslove this?
    Hope i clearly explained my probs.
    Thanks in advance
    Srini 

    Hi Srini,
    How are you calling the executable?  From a Call Executable step?  Or are you using another means of calling it?   Also, why is TestStand trying to recreate the object?  As long as you have the correct handle to the object I don't think it matters what app domain you are in.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Unable to create Entity objects for tables in TimesTen database using ADF

    Hi,
    I am not able to create Entity and View objects for tables in TimesTen database using ADF. I have installed TimesTen client on my machine.
    I have created a database connection by using connection type as "Generic JDBC" and giving driver class and JDBC URL. I am attaching screen shot of the same.
    I am right clicking on Model project and selecting New option after that I am selecting ADF Business components and in it I am selecting Business components from tables and there I am querying for tables.I am getting list of tables and when I am trying to create a Entity object from the table after clicking finish Jdev is closing by itself giving an error.
    Can anyone please help me how to create Entity objects for tables using TimesTen as database.I might be missing some jars or the way I am creating connection might be wrong or any plugins required to connect to TimesTen.

    What is the actual error being given by Jdev? Are you sure that the JDBC connection is using the TimesTen JDBC driver JAR and not some other JDBC driver or the Generic JDBC/ODBC bridge?
    Is ADF even supported with TimesTen?
    Chris

  • Creating unique passwords for a PDF document

    I'm going to be selling a PDF eBook on the Internet. 
    I would like to know if there is a way to create a unique PDF password for each customer
    rather than having every customer have the same password that was created in Adobe Pro. 
    I purchased a $20 eBook that requires you to enter a unique alpha-numeric
    password (given only to me) before the Adobe file shows the eBook contents. 
    I was given a password upon purchasing and when I downloaded and double clicked
    on the PDF file, it had the standard message
    "this PDF is protected. Please enter a Document Open Password."
    They company selling that product must have found a way to create unique passwords
    for each customer with their PDF document. 
    Any help or comments would be appreciated.

    George - what I will be selling is a 650-page PDF eBook.  Given the amount of content (especially the quality of the content), it's worth protecting it.  LockLizard and such products are too high for a startup like mine.  They are geared more for the enterprise business level. 
    Dave Merchant - I right clicked on the PDF eBook I mentioned in my original post that seems to have a unique password for each customer.  On the 'general' tab, it says at the bottom:
    "Security:  This file came from another computer and might be blocked to help protect this computer." 
    I'm not sure if that tells you anything. 
    What's interesting is that after I cancelled the order for that $20 eBook product, the password still works - so the company using that password system either does not have the capability to revoke access or they simply forgot to revoke access to the eBook for me personally. 
    BTW, I found out that e-junkie.com has a PDF stamping option that will stamp each buyer's PDF with their name, email address, and transaction number.  That would help.  But I would still like to have the customer have to login with a unique password or key code to access the eBook contents.  Having tenchology that revokes access to the eBook would also be ideal, but that might be too expensive to implement.
    thanks

  • Why objects are  dynamically created in java

    Why objects are dynamically created in java even if dynamically created object requires more space & more memory references as compared to static object?

    I don't even know where to start...
    KAMAL.MUKI wrote:
    Why objects are dynamically created in javaWhat is the alternative?
    even if dynamically created object requires more space & more memory referencesCan you prove that?
    as compared to static object?Can you define "static object"?
    I vote "troll".

  • How to Find Business Objects for any Tranaction .

    Hi Abapers,
                        How to find Business objects for any transcation.....  and how to connect the Work flow to  any  Trancation  so that for example any body changes the date of Birth ...... so that the work flow should trigger .
    Thanks & Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    For finding business object,you can try transaction SWO4 and by checking the documentation in it you can find your required business object.
    Another method is:
    1) Go to Trx SWE4 and switch on the event trace.
    2) Run your transaction which you want to use for triggering your workflow.
    3) Run transaction SWEL and find your Business Object and related event in it.
    For connnecting your WF to your transaction you have to create a start event in your WF in SWDD,where in you specify the Business Object and start event which you find using above method.
    Eg.You want your WF to be triggered whenever you have an error in your idoc.For this your BO will be IDOCAPPL and your event will be (inputErrorOccurred).This you will give in header data in SWDD.
    Neerja

  • How to find Info objects for particular filed??

    Hi
    I hav doubt Can anyone tel me???
    My Query s <b>How to find Info objects for particular filed??</b>
    For example i hav some table fileds, how to find Info objects for that fields??
    Pls explain me detaily
    Points wil be given for all answers.
    Thanks
    Senthil

    Hi Senthil ,
    You have your field description along with your Field right.
    For example:MATNR - Material Number
    Now take this description and go to your BW side Tcode:RSA1
    1)Search in Modelling >> Infoobjects >> Material Number
    Then you get few hits (matches)  which have description matched.
    For Example: 0material  - Material Number
    Check for the Length and type match.
    You will understand once you get those hits as to which is related to yours.
    2)Go to BI content and search in the infoobjects this has all active and inactive objects but this takes a little time (not much  though).
    3) You have meta data search / simple search also where you can search for the objects with field description as matching criteria.
    Hope your doubt is cleared atleast to some extent.
    Assign Points if helpful.
    Thanks,
    Priyanka

Maybe you are looking for

  • Publish iweb from another computer what am I doing wrong?

    I am really struggling here, can someone please explain my problem to me.... I have two mac laptops with iweb. I asked about publishing my backed up blog on the 2nd mac in case number 1 mac crashes. here was my question... how does the new computer k

  • Restoring iPhone after trying to install 3.0

    First off, let me just say I would have posted this topic in the dev forums if they worked. After trying to restore my iPhone 3G with the new 3.0 GM Seed using Xcode I get the error message "ERROR: Connected to device: Unable to open file" Now my iPh

  • End date difference between Outlook and mobile

    When I use Outlook to create an all day event from 20 June to 22 June, then use Nokia PC Suite to Synchronise with my mobile, the mobile shows a memo in the Calendar from 20 June to 21 June :-( This 'one day less in the Nokia Memo' stays when I edit

  • SAPINST Un-Attended mode installation

    Hello All, I am using SAPinst, version 701, make variant 700_REL, build 967243 for an un-attended mode setup, I managed to play around with several things but not getting through with PREREQUISITE checker it is throwing error when it reached on that

  • Sum values to display total (running total)

    I apologize for posting such a rudimentary question but I haven't been able to find an answer by searching the forum. Basically, I have several sensor inputs that are all factored into an equation that yeilds heat output (btu/hour). I need to take th