Remove text field from Array via for loop

Hi,
i have a problem to remove text fields added via for loop.
That im doing is, via for loop im dynamically creating menu with 10 buttons.
Each button contain, dynamically created, background (shape) and text field.
And everything is fine.
But when im try to remove text fields then i got this error:
- Im using button to remove text fields - lang_btn.addEventListener(MouseEvent.CLICK, clickHandler);
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
          at flash.display::DisplayObjectContainer/removeChild()
          at Loading_Img_fla::MainTimeline/xmlLoaded()
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flash.net::URLLoader/onComplete()
In the script bellow marked with red is what should remove text fields from an Array, instead giving me error.
Here is my script
// Create for loop
for (var i:int = 0; i < 10; i++)
          for each (xml in listItems)
                    if (i == xml.attribute("Id"))
                              // Add MovieClip to stage to hold the data
                              addChild(lmHolder);
                              lmHolder.x = 0;
                              lmHolder.y = 0;
                              // Create new MovieClip to hold buttons
                              lmButtonsMCArray[i] = new MovieClip();
                              lmButtonsMCArray[i].buttonMode = true;
                              lmButtonsMCArray[i].mouseChildren = false;
                              lmButtonsMCArray[i].x = 20;
                              lmButtonsMCArray[i].y = 20 + btCount * buttonSpace;
                              // Add each button MovieClip to lmHolder MovieClip
                              lmHolder.addChild(lmButtonsMCArray[i]);
                              // Create Background to buttons
                              lmButtonsArray[i] = new Shape();
                              lmButtonsArray[i].graphics.beginFill(lmBgColor0, 1);
                              lmButtonsArray[i].graphics.drawRect(0, 0, 230, 85);
                              lmButtonsArray[i].x = 0;
                              lmButtonsArray[i].y = 0;
                              // <<-- Add Background shape to the buttons MovieClips
                              lmButtonsMCArray[i].addChild(lmButtonsArray[i]);
                              // Create a new array to preserve data from XML List
                              lmNameArrayEG = new Array();
                              lmNameArrayUS = new Array();
                              // Create local variable to hold
                              var lmTxtFieldContentUS:String;
                              var lmTxtFieldContentEG:String;
                              var lmTxtContent:String;
                              // If clicked button is EG then make array with Arabic text
                              // If clicked button is US then make array with English text
                              if (footer.lang_btn.langState == "EG")
                                        for each (var leftMenuName:XML in egLanguageList)
                                                  lmNameArrayEG.push(leftMenuName);
                                        lmTxtFieldContentEG = lmNameArrayEG[i];
                                        lmTxtContent = lmTxtFieldContentEG;
                              else
                                        for each (var leftMenuNameUS:XML in usLanguageList)
                                                  lmNameArrayUS.push(leftMenuNameUS);
                                        lmTxtFieldContentUS = lmNameArrayUS[i];
                                        lmTxtContent = lmTxtFieldContentUS;
                              // Setup new text field each time script is executed
                              lmTxtFieldsArray[i] = new TextField();
                              lmTxtFieldsArray[i].width = 110;
                              lmTxtFieldsArray[i].border = false;
                              lmTxtFieldsArray[i].wordWrap = true;
                              lmTxtFieldsArray[i].multiline = true;
                              lmTxtFieldsArray[i].selectable = false;
                              lmTxtFieldsArray[i].embedFonts = true;
                              lmTxtFieldsArray[i].antiAliasType = AntiAliasType.ADVANCED;
                              lmTxtFieldsArray[i].autoSize = TextFieldAutoSize.CENTER;
                              lmTxtFieldsArray[i].text = lmTxtContent.toUpperCase();
                              lmTxtFieldsArray[i].x = 10;
                              lmTxtFieldsArray[i].name = "lmTxtFieldName" + i;
                              // <<-- Add Text fields to the Movie Clip
                              lmButtonsMCArray[i].addChild(lmTxtFieldsArray[i]);
                              // If clicked button is EG then set Arabic text format, and make array with Arabic text fields
                              // If clicked button is US then set English text format, and make array with Egnlish text fields
                              if (footer.lang_btn.langState == "EG")
                                        lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_eg);
                                        // Make array from text fields;
                                        pushEgTFintoArray.push(lmTxtFieldsArray[i]);
                              else
                                        lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_us);
                                        // Make array from text fields;
                                        pushUsTFintoArray.push(lmTxtFieldsArray[i]);
                              // If clicked button is EG then loop thrue the for loop and remove English text fields from array
                              // If clicked button is EG then loop thrue the for loop and remove Arabic text fields from array
                              if (footer.lang_btn.langState == "EG")
                                        for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                  //remove the text field array from the display
                                   removeChild(pushUsTFintoArray[rNr_us]);
                                        //clear the array
                                        pushUsTFintoArray = [];
                              else
                                        for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                  //remove the text field array from the display
                                   removeChild(pushEgTFintoArray[rNr_eg]);
                                        //clear the array
                                        pushEgTFintoArray = [];
          btCount++;

it looks like those tf's are children of  lmButtonsMCArray[i], not the current scope.  use:
if (footer.lang_btn.langState == "EG")
                                        for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                  //remove the text field array from the display
                                    lmButtonsMCArray[rNr_us].removeChild(pushUsTFintoArray[rNr_us]);
                                        //clear the array
                                        pushUsTFintoArray = [];
                              else
                                        for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                  //remove the text field array from the display
                                    lmButtonsMCArray[rNr_eg].removeChild(pushEgTFintoArray[rNr_eg]);
                                        //clear the array
                                        pushEgTFintoArray = [];

Similar Messages

  • Removing text field from po

    hi gurus
    i want to keep
    in header texts
    1) header note
    2) delivery note
    3) payment terms
    in item text only item text
    all other texts in header and item level i want to remove can i do it so
    so that other texts get supress
    plz help

    If you want to remove from the transaction screen use the following path
    (generally not advisable to delete the standard configuration delivered for text types)
    SPRO->Materials Management->Purchasing->Purchase Order->Texts for Purchase Orders->Define Text Types for Purchase Order Texts.
    In this you can keep the texts you want and delete the rest. Similarly, you can do the same for item texts.
    If your requirement is to delete from the print layout, do the following:
    SPRO->Materials Management->Purchasing->Messages->Texts for Messages->Define Texts for Purchase Orders. In this place, you configure only the text types which are needed for your print.

  • How to remove the automatically generated text fields from the InfoSet

    I followed the procedure by SAP help.
    Automatically generated text fields are marked with a 'T' on the icon in the InfoSet. You can remove the automatically generated text fields from the InfoSet in the initial screen of the InfoSet maintenance under Further Functions -> Delete Text Fields. Cancel the DataSource creation on the next screen and delete the text fields in the InfoSet maintenance transaction.
    I know that there is an option "No automatic text recognition" when I create a new InfoSet, however, I couldn't find out how to change an existed InfoSet. I checked menu Goto->Global Properties, but that option is disabled. Is there a way to remove text fields from an existed InfoSet?

    Hi,
    In the initial screen (when you enter transaction code SQ02) type your infoset name and goto menu: Infoset -> More functions -> Delete text fields. this will delete all text fields.
    I hope this helps to resolve the issue.
    Ram

  • Populating Multirecord text fields from Tlists value's combinations

    I have a UI wherein there are two T lists, one on the Left and other on the Right. The left one contains
    From values and the Right one contains To values. There's one Button which when Pressed should populate
    a Data Block which has multi record text fields just below the button with all the possible combinations of
    the T lists elements. The Text fields have the values From, To, Time, Unit. When populated From and Two will
    get the values from the combinations and the user will enter the values in other fields i.e. Time and Unit,
    Then the user can save the Records.
    e.g. If the Left T list contains Red, Blue and the Right T List contains Green, Black. Then on pressing
    the button below the T lists, the text fields From and Two of a data block displayed in the same window
    should get populated with all the possible combinations as:
    From || To || Unit || Time
    Red Green
    Red Black
    Blue Green
    Blue Black
    Now the user can enter the values for Unit as well as Time and when he does save the Records should be inserted
    for the Data Blocks DML Source that's some table.
    What I'm trying is:
    On pressing the Button i'm writing code that will have Two PL/SQL Tables(Index by binary_integer). One will have
    all the values of the left T List and the other with all the values of right T List.
    I do it as in the WHEN BUTTON PRESSED as:
    DECLARE
    TYPE varchar_table IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
    from varchar_table;
    to varchar_table;
    v_count1 NUMBER;
    v_count2 NUMBER;
    v_count3 NUMBER;
    v_count4 NUMBER;
    BEGIN
    v_count1 := Get_List_Element_Count('CONTROL.FROM_TYPE');
         FOR i IN 1..v_count1 LOOP
              from(i) := Get_List_Element_Value('CONTROL.FROM_TYPE', i);
         END LOOP;
    v_count2 := Get_List_Element_Count('CONTROL.TO_TYPE');
         FOR i IN 1..v_count2 LOOP
              to(i) := Get_List_Element_Value('CONTROL.TO_TYPE', i);
         END LOOP;
    END;
    Now how will I populate the text fields with the values in the tables that i got with the piece of code above.
    Any help would be appreciated. Any other method other than the one i'm trying is also welcome. Please note that
    i'm not using any table to store the elements in the T Lists. The lists get values at runtime by
    user's selection.
    Thanks,
    Abhishek.

    Try and stay civil in your postings. The solotion should be to simply issue a GO_BLOCK, followed by a CREATE_RECORD followed by setting the approriate values :block.value = <value from list>

  • Is there arrays or FOR loops in ABAP?

    Hi everyone!
    Is there an array and FOR loops in ABAP similar to the C Language?
    If there is, please give example. _
    Thanks a lot!

    Hi,
    There is no array concept in ABAP but there are field-symbols which are same as pointers in C.As for the FOR loop there is no such command in SAP/ABAP but we do have the do..while and loop...endloop commands.There is also CASE statements and if..endif commands.
    Thanks,
    Sandeep.

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How to validate an text field item using javascript for numbers only.

    hi,
    how to validate an text field item using javascript for numbers only.please help me on this urgent
    please mail me solun if posible on [email protected]

    Hi,
    Page HTML header
    <script>
    function onlyNum(evt) {
      // Usage: onKeyPress="return onlyNum(event)"
      evt = (evt) ? evt : window.event;
      var charCode = (evt.which) ? evt.which : evt.keyCode;
      if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        var status = 'This field accepts numbers only!';
        alert(status);
        return false;
      var status = '';
      return true;
    </script>Item HTML Form Element Attributes
    onKeyPress="return onlyNum(event)"Br,Jari

  • [svn] 4694: Don't remove text lines from the container if it isn' t the container the lines were added to.

    Revision: 4694
    Author: [email protected]
    Date: 2009-01-27 14:35:21 -0800 (Tue, 27 Jan 2009)
    Log Message:
    Don't remove text lines from the container if it isn't the container the lines were added to. When there is a state change the displayObject can be switched out from under the TextGraphic and TextBox.
    QE Notes: need to add tests - will attach my test program to bug
    Doc Notes:
    Bugs: SDK-18923
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18923
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextBlockCompose r.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextFlowComposer .as

    Yup, you guys pointed me in the right direction.
    I changed my adjustmentListener to the following:
    JScrollBar scrollBar = (JScrollBar) e.getSource();
    int endLoc = document.getLength();
    try {
        Rectangle end = outputArea.modelToView(endLoc);
        if (end != null) {
            int n = scrollBar.getValue() + scrollBar.getVisibleAmount();
            boolean locked = (end.y >= n && n <= (end.y + end.height));
    } catch (BadLocationException ex) {
    }By comparing scrollbar position with the visible rectangle of the end of the document, I can now easily tell if the user has moved the tracker back or not.
    To go to the next step of automatically pausing scrolling whenever the user is moving the slider back, I also had to disable the automatic scrolling performed by DefaultCaret. Because there was no way to tell if the user was scrolling or if the output was adjusting from the adjustmentListener, I also had to flag whenever I was autoscrolling.
    The end result is a JTextPane that can be appended to at all, and locked by the user by using the slider. If new data arrives, the window is not scrolled, and any text selection the user has is not cleared. Perfect!

  • Disable or Remove some field from User Profile in Personalize iView

    Hi All,
    I have a requirement  to Disable one field and Remove one field  from User Profile in Personalize iView.
    i want to disable Activate Accessibility Feature field and Remove Language field.
    How to archive this.
    Thanks and Regards
    Trilochan

    Hi,
    You can use [Personalization|http://help.sap.com/saphelp_nw70/helpdata/en/42/ed3ce7f8593eebe10000000a1553f7/frameset.htm] to do this :
    1. logon as an admin and navigate to Portal Content > Portal Users > Standard Portal Users and open Every User Core Role
    2. right click on User Profile and select edit
    3. click on the Preview button then right click + CTRL on the iView and personalize the User Profile iView
    That's it.
    Regards,
    Pierre

  • Javascript to fill text field from other PDF form

    I am trying to figure out if it is possible to add javascript to a text field that when initiated pulls text from another field in a closed pdf in the same directory.
    For example I have a NAME field in the pdf form I am working in....
    When I initiate the script the NAME field is filled in with the same data from another PDF that is closed.

    I have looked up the 'disclosed' property and it looks like that is what I want to do..
    I have "this.disclosed = true" in a PDF with the name field. On the other PDF that I want the information replicated I am going to add a javascript to an action somewhere on the document, my problem is which script do I use to get this data from the other pdf?  Is the pdf that is now accessible via javascript (disclosed) a data object?

  • Pre-Populating Text fields from a Data drop down list using SQL Server

    I'm currently trying to update some of our internal forms which are word based or a basic PDF form you fill in by yourself.
    I'm connecting to our SQL server as there are databases stored there for an internal bit of software that hold information
    I can use to fill in parts the form.
    I have a data drop down list that is dynamically linked to the SQL databass and allows you to select a Project Number from that database, what
    I want to do after this is selected is to automatically populate some text fields with the Project name, Account handler and other fields held in the
    database.
    I've had a look online to see if there is a solution but haven't really found anythig that is similar (although I am new to LC so may have seen it
    and not realised) and my Java is non existant.
    Has anyone tried this and able to point me in the right directions?
    I'm using LiveCycle ES2 version 9.0.0.2 from Creative Suit 5.5 on Windows 7
    Cheers

    Hi,
    Actually this error does not cause any harm except a presentation inconvenience. In my multi-select prompt I am using variable expression with dynamic repository variable. Dashboard results are correct. Just variable's value does not appear on page (error Error Codes: G689FFB3:SDKE4UTF
    Expression: @{biServer.variables['CUR_CAL_PER_MONTH_NAME']}). Pushing "GO" button on the prompt fixing the error but it's actually second execution of the dashboard.
    Any ideas ??

  • Remove Value Field from Operating Concern

    Hi all,
    I created a new value field in DEV and assigned it to the corresponding Operating Concern.
    Now, after some discussions, it is not necessary this value field.
    I want to "un-assign" from the Operating Concern they use.
    No data is being posted to this value field and nothing has been transported to QA yet.
    Is this possible? Any ideas?
    Thanks and Regards,
    Flower.

    I guess you can delete the value field as it was not transported to QA and PRD.
    Here is some information given by SAP.
    Deleting characteristics/value fields from an operating concern
    You can delete characteristics and value fields retrospectively from an operating concern that you have already activated. However, you should only use this deletion function for operating concerns that have not yet been used productively. You should also note that some database systems require the operating concern tables to be converted (database conversion) after the deletion has taken place if data had already been posted to the operating concern. Depending on the data volumes involved, the database conversion can take a matter of seconds or indeed several hours. Moreover, you cannot post data or run reports during the conversion. Due to integration, other applications are also affected when data is postedwith an assignment to profitability segments (such as settlement and direct assignment from FI/MM). If the operating concern has been transported to another system (such as the productive system), then the database conversion must also occur in that target system.
    Depending on the fields that were deleted, the following tables need to be converted (where xxxx = operating concern):
    Characteristics: CE1xxxx, CE2xxxx, CE4xxxx, CE4xxxx_ACCT, CE4xxxx_FLAG, and CE4xxxx_KENC
    Amount fields: CE1xxxx, CE2xxxx and CE3xxxx
    Quantity fields: CE1xxxx, CE2xxxx, CE3xxxx, CE4xxxx, CE4xxxx_ACCT, CE4xxxx_ACCT, CE4xxxx_FLAG, and CE4xxxx_KENC
    Before deleting fields from an operating concern with a large data volume (more that 10 000 records in a table), you should refer to the section "The Database Utility" in the ABAP dictionary documentation. This section describes the database conversion process.
    For database systems that do not require conversion (such as DB2 for AS/400, Informix, MSSQL), it can still take a considerable amount of time for the operating concern to be activated.
    To delete characteristics or value fields, perform the following activities:
    1. Delete the corresponding characteristics and value fields from Customizing in all clients (this includes forms, reports, planning layouts, and so forth). To locate characteristics and value fields, use the appropriate where-used list in the Customizing Monitor. You can access it by choosing Tools -> Analysis -> Check Customizing Settings. You can jump directly from the where-used list to the relevant Customizing transaction and then delete the appropriate field there.
    2. Switch to the screen for maintaining the data structure of an operating concern (Maintain operating concern).
    3. If you need to effect other changes to the datastucture for the operating concern before making any deletions, effect those changes and save the data structure.
    4. In order to be able to select the fields of the data structure, choose Extras -> Characteristics (or Value fields) -> Unlock.
    5. Select the characteristics and value fields to be deleted and remove them from the data structure with the "Reset fields" function.
    6. Reactivate the operating concern. The system starts by checking whether the operating concern contains any data and whether the fields to be deleted are still being used in any Customizing settings.
    7. If none of the fields are still in use, the system then starts the re-activation. If the operating concern does not contain any data or does not require the database system to be converted, the tables are activated. You are then able to activate the environment for the operating concern. In this case, the following activities no longer apply.
    If the operating concern already contains data, a system message tells you that the database needs to be converted. If you proceed, an activation log appears (at the top of the list).
    8. Analyze the activation log. If it only contains error messages telling you to convert the tables, proceed with the next activity.
    You must otherwise remove the cause of the errors before the tables can be converted. In this case, you should answer "No" to the next prompt, which asks whether the conversion transaction should start.
    9. If you still only receive error messages telling you to convert the tables, choose "Back" and start the conversion.
    10. Plan a job for the conversion. A list of the tables to be converted is shown for this. If the tables only contain a small amount of data (less than 10 000 records), then all the tables can be converted in one job. In that case, you can select all the tables.
    For larger tables, conversion should take place in several jobs. However, you should ensure that table CE4xxxx (where xxxx = operating concern) is the last table to be converted.
    Warning. No other changes can be made to the operating concern during the conversion.
    A copy of the table is generated during the conversion. The database system should have sufficient memory available for this copy.
    To schedule conversion as a job, use the "Schedule selections" function. You can display the current status of the conversion by selecting the "Refresh" icon. Tables disappear from the list once they have been converted sucessfully. If a conversion is taking a while, it is also possible to leave the transaction. You can then continue the conversion using DB requests -> Mass processing in one of the following ways:
    With the job overview. You access this by choosing System -> Services -> Jobs.
    Using the database utility transaction. You access this by choosing Utilities -> Database Utility in the ABAP Dictionary menu.
    You can use the status function to call up the status of the operating concern during operating concern maintenance. You need to activate all tables after conversion.
    11. To analyze errors that have occurred during the conversion, you can use the database utility transaction by choosing Extras -> Logs. The log has the same name as the conversion job: TBATG-date. You can also restart the conversion with this transaction.
    For more information on the database utility, choose Help -> Application help while still in the above transaction.
    12. Once you have activated all the tables in the operating concern, generate the operating concern environment from within operating concern maintenance.
    You can then use the operating concern again.
    If you want to transport the operating concern into a different system, see the section "Notes on transport"
    Note
    Hope this helps
    Thanks,
    Reddy
    Edited by: reddy  sap on Sep 11, 2009 6:58 PM
    Edited by: reddy  sap on Sep 11, 2009 7:00 PM

  • How do I remove the field from textbox?

    Hi,
    I have a JSP with some text fields. In those fields one of the text field is inter value. It is showing initially '0' after i update with another value the updated value is showing. but i want to remove the value make it be empty. but it's not showing empty value. It is always showing some value. Here is my code.
    public static String renderFieldAdv( AhsPageWebBean ahsPage, String k, Opportunity opp, String formName, String className, String specialFmt, int specialFmtParam1, int specialFmtParam2 )
        StringBuffer buf = new StringBuffer();
        if ( k.equals("") )                              return " ";
        else if ( k.equals("OPP_NAME") )
          buf.append( "<input type=text name=OPP_NAME class=\""+className+"\" value=\""+opp.getName()+"\" size=36>" );
          buf.append( "<input type=hidden name=__OPP_NAME value=Y>" );
          return buf.toString();
        else if ( k.equals("OPP_NUM") )
          ProfileValue profFreezeNum = new ProfileValue( ahsPage, "SLS_OPP_FREEZE_NUM" );
          if ( profFreezeNum.getValue(ahsPage).equals("Y") )
            buf.append( ""+opp.getOppNumber() );
          else
            buf.append( "<input type=text name=OPP_NUM class=\""+className+"\" value=\""+opp.getOppNumber()+"\" size=24 >" );
            buf.append( "<input type=hidden name=__OPP_NUM value=Y>" );
          return buf.toString();
        else if ( k.equals("CUSTOMER") )
          if ( opp.getCustomer().getCustomerType().equals("COMPANY") )
            Customer c = new Customer( ahsPage, opp.getCustomerId() );
            return c.uiDataProviderGetData( ahsPage, "DISPLAY_NAME");
          else
               Contact c = new Contact( ahsPage, opp.getCustomerId() );
            return c.uiDataProviderGetData( ahsPage, "DISPLAY_NAME");
        else if ( k.equals("CUSTOMER_SNAPSHOT") )
          if ( opp.getCustomer().getCustomerType().equals("COMPANY") )
               Customer c = new Customer( ahsPage, opp.getCustomerId() );
               return c.renderSnapshot(ahsPage,100);
          else
               Contact c = new Contact( ahsPage, opp.getCustomerId() );
               return c.renderSnapshot(ahsPage,100);
        else if ( k.equals("CUSTOMER") )
          if ( opp.getCustomer().getCustomerType().equals("COMPANY") )
            Customer c = new Customer( ahsPage, opp.getCustomerId() );
            return c.uiDataProviderGetData( ahsPage, "DISPLAY_NAME");
          else
               Contact c = new Contact( ahsPage, opp.getCustomerId() );
            return c.uiDataProviderGetData( ahsPage, "DISPLAY_NAME");
        else if ( k.equals("CUSTOMER_UPDATABLE") )
          SlsCustomerEO c = opp.getCustomer();
          buf.append( "<input readonly class=textInput size=32 value='"+c.getDisplayName()+"' name='oppCustomerName'>" );
          buf.append( "<a href=\"JavaScript:openCompanyPopup('updateOpp', 'oppCustomerId', 'oppCustomerName');\"><img src=\"graphics/ozicongoorg.gif\" border=0 align=ABSMIDDLE></a>" );
          buf.append( "<a href=\"JavaScript:openContactPopup('updateOpp', 'oppCustomerId', 'oppCustomerName');\"><img src=\"graphics/ozicongopsn.gif\" border=0 align=ABSMIDDLE></a>" );
          buf.append( "<input type=hidden name=oppCustomerId value="+c.getID()+">" );
          return buf.toString();
        else if ( k.equals("ALL_CONTACTS") )
          return opp.uiDataProviderGetData( ahsPage, "ALL_CONTACTS");
        else if ( k.equals("PRIMARY_CONTACTS") )
          return opp.uiDataProviderGetData( ahsPage, "PRIMARY_CONTACTS");
        else if ( k.equals("STATUS") )
          buf.append( "<select name=STATUS class=selInput>" );
          buf.append(    OptionMenu.render( ahsPage, "SLS_OPP_STATUS", opp.getOppStatus(), true ) );
          buf.append( "</select>" );
          buf.append( "<input type=hidden name=__STATUS value=Y>" );
          return buf.toString();
        else if ( k.equals("STAGE") )
          // the sales stage can be either a popup, or a dropdown.
          ProfileValue profStagePopup = new ProfileValue( ahsPage, "SLS_OPP_STAGE_POPUP" );
          if ( profStagePopup.getValue(ahsPage).equals("Y") )
            OptionMenu omStage = new OptionMenu(ahsPage, "SLS_OPP_SALES_STAGE");
            String oppStageDisp = omStage.getPrompt(ahsPage, opp.getOppStage(), opp.getOppStage());
            buf.append( "<input readonly class=\""+className+"\" size=30 value='"+oppStageDisp+"' name=STAGE_DISP>" );
            buf.append( "<a href=\"JavaScript:openStagePopup();\"><img src=\"graphics/ahsicongo.gif\" border=0 align=ABSMIDDLE></a> ");
            buf.append( "<input type=hidden name='STAGE' value='"+opp.getOppStage()+"'>" );
          else
            buf.append( "<select name=STAGE class=\"selInput\" onChange=\"changeOppStage('"+formName+"')\"> " );
            buf.append(   OptionMenu.render( ahsPage, "SLS_OPP_SALES_STAGE", opp.getOppStage(), true ) );
            buf.append( "</select>" );
          buf.append( "<input type=hidden name=__STAGE value=Y>" );
          return buf.toString();
        else if ( k.equals("CURRENCY") )
          buf.append( "<select name=CURRENCY class=selInput>" );
          buf.append(    OptionMenu.render( ahsPage, "SLS_OPP_CURRENCY", opp.getOppCurrency(), true ) );
          buf.append( "</select>" );
          buf.append( "<input type=hidden name=__CURRENCY value=Y>" );
          return buf.toString();
        else if ( k.equals("AMOUNT") )
          return opp.renderOppAmountAdv(ahsPage);
        else if ( k.equals("EXT_VIEWABLE") )
          buf.append( "<input type=checkbox name=EXT_VIEWABLE value=Y " );
          if ( opp!=null && opp.isExtViewable() ) buf.append( "checked" );
          buf.append( ">" );
          buf.append( "<input type=hidden name=__EXT_VIEWABLE value=Y>" );
          return buf.toString();
        else if ( k.equals("CLOSE_DATE") )
          buf.append( HtmlRenderer.drawDatePicker( ahsPage, "CLOSE_DATE", (new BaseCalTime(ahsPage, opp.getOppCloseDate(), BaseCalTime.DAYKEY_OPP)).renderDayKey(ahsPage) ) );
          buf.append( "<input type=hidden name=__CLOSE_DATE value=Y>" );
          return buf.toString();
    <b>  else if ( k.equals("WIN_PROB") )           // This is the field i have to update
          if ( opp!=null ) buf.append( "<input type=text name=WIN_PROB class=\""+className+"\" value=\""+opp.getOppWinprob()+"\" size=16 >" );
          else             buf.append( "<input type=text name=WIN_PROB class=\""+className+"\" value=\"\" size=16 >" );
          buf.append( "<input type=hidden name=__WIN_PROB value=Y>" );
          return buf.toString();
        } </b>                                                 
        else if ( k.equals("OPP_DESC") )
          if ( opp!=null ) buf.append( "<textarea name=OPP_DESC rows=3 cols=36 class=\""+className+"\">"+opp.getOppDesc()+"</textarea>" );
          else             buf.append( "<textarea name=OPP_DESC rows=3 cols=36 class=\""+className+"\"></textarea>" );
          buf.append( "<input type=hidden name=__OPP_DESC value=Y>" );
          return buf.toString();
        else if ( k.equals("CHANNEL_CODE") )
          buf.append( "<select name=CHANNEL_CODE class=selInput>" );
          if ( opp!=null ) buf.append(    OptionMenu.render( ahsPage, "SLS_OPP_CHANNEL", opp.getOppChannelCode(), true ) );
          else             buf.append(    OptionMenu.render( ahsPage, "SLS_OPP_CHANNEL", "", true ) );
          buf.append( "</select>" );
          buf.append( "<input type=hidden name=__CHANNEL_CODE value=Y>" );
          return buf.toString();
        else if ( k.equals("CHANNEL_DETAIL") )
          if ( opp!=null ) buf.append( "<input type=text name=CHANNEL_DETAIL class=\""+className+"\" value=\""+opp.getOppChannelDetail()+"\" size=24 >" );
          else             buf.append( "<input type=text name=CHANNEL_DETAIL class=\""+className+"\" value=\"\" size=24 >" );
          buf.append( "<input type=hidden name=__CHANNEL_DETAIL value=Y>" );
          return buf.toString();
        else if ( k.equals("COMPETITOR") )
          if ( opp!=null ) buf.append( "<input type=text name=COMPETITOR class=\""+className+"\" value=\""+opp.getKeyCompetitor()+"\" size=48 >" );
          else             buf.append( "<input type=text name=COMPETITOR class=\""+className+"\" value=\"\" size=48 >" );
          buf.append( "<input type=hidden name=__COMPETITOR value=Y>" );
          return buf.toString();
        else if ( k.startsWith("CF_") )
          FlexSetup flexSetup = (FlexSetup) ahsPage.getPageHash().get( "FlexSetup_Opp" );
          if ( flexSetup == null )
            if ( opp != null ) flexSetup = new FlexSetup( ahsPage, "SLS_OPPORTUNITY", "OPPORTUNITY", opp.getID() );
            else               flexSetup = new FlexSetup( ahsPage, "SLS_OPPORTUNITY", "OPPORTUNITY", -1 );
            if ( !flexSetup.initialized() ) return " ";
            ahsPage.getPageHash().put( "FlexSetup_Opp", flexSetup );
          int ki = -1;
          try { ki = Integer.parseInt( k.substring(3) ); } catch (Exception e) { ki = -1; };
          Vector vSetup = flexSetup.getSetup();
          Vector vFlex  = flexSetup.getData();
          for (int i=0; i<vSetup.size(); i++)
            FwkCustomfieldSetupEO setup = (FwkCustomfieldSetupEO) vSetup.get(i);
            if ( setup.getID() != ki )
              continue;
            String cfDataID    = AhsFwUtil.getValue( vFlex, i , "CF_DATA_ID" );
            String cfDataValue = AhsFwUtil.getValue( vFlex, i , "CF_DATA_VALUE" );
            if ( specialFmt != null && specialFmt.equals("TEXTINPUTLIMITLEN") )
              buf.append( HtmlRenderer.drawSimpleTextInput( ahsPage, k, cfDataValue, className, "size="+specialFmtParam1) );
            else if ( specialFmt != null && specialFmt.equals("TEXTAREALIMITLEN") )
              buf.append( HtmlRenderer.drawSimpleTextArea( ahsPage, k, cfDataValue, className, "rows="+specialFmtParam1+" cols="+specialFmtParam2 ) );
            else
              if ( opp!=null ) buf.append( FlexSetup.renderCustomFieldValue( ahsPage, setup, k, cfDataValue, "textInput", formName, opp.getID() ) );
              else             buf.append( FlexSetup.renderCustomFieldValue( ahsPage, setup, k, cfDataValue, "textInput", formName, -1 ) );
            buf.append( "<input type=hidden name="+k+"_id value=\""+cfDataID+"\">" );
            buf.append( "<input type=hidden name=__"+k+" value=Y>" );
            return buf.toString();
          return " ";
        else if ( opp!=null && k.equals("EXTERNAL_URL") )     return opp.getExternalTrackingURL(ahsPage);
        else if ( opp!=null && k.equals("CREATION_DATE") )    return opp.getCreationDateStr(ahsPage);
        else if ( opp!=null && k.equals("LAST_UPDATE_DATE") ) return opp.getLastUpdateDateStr(ahsPage);
        else if ( opp!=null && k.equals("CREATED_BY") )       return opp.getCreatedBy(ahsPage);
        else if ( opp!=null && k.equals("LAST_UPDATED_BY") )  return opp.getLastUpdatedBy(ahsPage);
        else if ( opp!=null && k.equals("IMP_SESSION") )      return opp.uiDataProviderGetData(ahsPage,"IMP_SESSION");
        else if ( opp!=null && k.startsWith("TMPL_") )        return renderFieldRO( ahsPage, k, opp );
        return " ";
      }thanks in advance...
    Edited by: Adusumalli1982 on Sep 11, 2008 10:28 AM

    Actually In the above code: this is the text field i have to change:
         else if ( k.equals("WIN_PROB") )
          if ( opp!=null ) buf.append( "<input type=text name=WIN_PROB class=\""+className+"\" value=\""+opp.getOppWinprob()+"\" size=16 >" );
          else             buf.append( "<input type=text name=WIN_PROB class=\""+className+"\" value=\"\" size=16 >" );
          buf.append( "<input type=hidden name=__WIN_PROB value=Y>" );
          return buf.toString();
        }thanks

  • Quick qn on displaying text fields from region.

    My doubt is that i have a page where
    there are 2 Regions..top and bottom Regions
    we can enter a person's details on the bottom region and hit submit..then that person get stored in the database and visible on the top region
    i have a situation where i need to grab these people from the top region and display in side email message
    my text field in the bottom region is not constant..so i am not able to capture them..
    Its like this:
    TOP REGION:
    tommy lee Male address 1
    kanan jones Male address 1
    babu lee Male address 1
    Note: Sometimes there may be only one person..sometimes more than 1 like 2 or 3
    Bottom Region:
    text fields to enter (we can enter for only one at a time)
    ..I am able to grab it from the table in the DBase..But how can i get it to the email message..
    Appreciate your help
    thanks
    kp

    You can select the entire field and use the cold fusion left
    function. However, it would be more efficient to simply select
    select the 1st 20 characters in your query. How you do this depends
    on the db you are using.

  • Autofill form text fields from database

    I have made a form in asp code with text fields. Behind this page is a database (access).
    This database contains static information and does not need to be updated. It is only for output.
    In this form, there are some text fields to be filled in.
    Reference
    First name
    Last name
    E-mail address
    Telephone number
    This information is in the database.
    What I try to do is that when the first text field "Reference" is filled, the related information is selected from the database and automatically put in the other corresponding text fields.
    Anybody any idea how to do this?

    I don't use ASP, but the simple way to approach this problem is to have two pages. The first page contains a form with a text field for Reference and a submit button. Set the form's method to GET, and the action to the page that contains the full form.
    In the page that contains the full form, create a recordset to select the details from the database, using the URL parameter for Reference as a filter. You can then bind the results from the recordset to the value attributes of the remaining form fields.

Maybe you are looking for

  • Report to show Vendor Master Change

    Hello Experts, Is there any SAP standard report which can show the new vendor details  created and the changes that are made to vendor master data. I know about <b>S_ALR_87012089</b>. But, it is showing only the changes made to the vendor master with

  • Hyperion Smart View Fusion Failed to create Smart View Extension Activator

    Receving error with Office 2007, SP2 XP with SP3. We have done a few installs and there seems to be a problem here and there which i was able to resolve but not this one? exact error is upon launch of Excel , word 2007. Failed to create Smart View Ex

  • Safari will not quit. Message are you sure you want to send a form again?

    I am running an imac with OSX 10.5.8 with Safari Veriosn 5.06(5533.22.3). I have an RV web Site up and cannot quit Safari. The RV web site does not show the x at the top left but only the - and the +. There is a Message saying "Are tyou sure you want

  • CR10 Exported MS word doc file not print out

    My application (CR10, VB6, Oracle10.2) exports MS word doc file to disk, But when I try to print out, not print out at some printer and print out legal size (8.5x14) at some printer. It set up as Letter (8.5x11) I think in CR, page footer is wrong pl

  • Novice Question - When to use WAR files

    Sorry I'm so thick, I just don't seem to grasp the concept of how to structure my web pages in tomcat (or any j2ee server I suppose). Any help, as always, is greatly appreciated. Let's say I want to build a personal website that would have a default