How to initialize form items?

Hi,
I need to create popup window with several forms. As it's popup I don't add it to any component - just create it with "new" operator. The problem is that all popup window's childern are null until I add window to some component. I found out that there is initialize() function that should create all window's children and it does but only childern that are not form's childern.
In exaple below saveButton and cancelButton will be created after window.initialize() but addPhotosButton not.
<s:Panel>
     <s:VGroup>
          <mx:Form>
               <mx:FormItem >
                    <s:Button id="addPhotosButton" />
               </mx:FormItem>
            </mx:Form>
          <s:Button id="saveButton" />
          <s:Button id="cancelButton" />
     </s:VGroup>
</s:Panel>
I need to have all window's children created without adding it but dunno how...
Could anyone help me, please?

Since you use MXML file for implementing your form, Flex compiler generates AS3 code which follows normal component lifecyle rules: that is all components are created in createChildren() method when you add the component to the display list. One way to get around this is to implement your form in pure AS3 and create all stuff in the constructor.
The better approach would be to create isntance of the component, add event listener for CREATION_COMPLETE (you could also use INITIALIZE) event, add your component to the display list. When you receive the event, it is safe to do whatever you need with that component and its children.

Similar Messages

  • How to update form item in IR with value when it is null when pressing Go?

    Hello,
    in an IR i have created a Date Picker Item. This item i want when user enters page to have a default value. Also when the user clears this field i want the corresponding item to get a default value. i have achieved the 1st but not the 2nd. I need this replacement in the item value because it its needed in a between where date expression in the report query and i want to have the bind variables only, not NVL them in order to avoid scanning all partitions of table. Thi item is used as an extra search field in the Report and it is included in the Page Items to Submit | Advanced Report Attributes.
    How can i do this ?
    What i have set up atm:
    Source Used
    Always, replacing any existing value in session state
    Source Type
    PL/SQL Expression or Function PL/SQL
    Source value or expression
    TRUNC(SYSDATE)
    and also in Default :
    Default value
    RETURN TO_DATE('01/01/1980','DD/MM/RRRR')
    Default Value Type
    PL/SQL Function Body
    TIA

    Dionyssis ,
    Normally you could, but IRRs are a little different. You can use the page rendering options, but page submit options will not fire when the report is being redrawn.
    To get you started, add this to the item's HTML Form Element Attributes:
    onblur="this.value = $v('PX_HIDDEN_DATE_ITEM')"Then just create a hidden date item and give it a default value. This will keep you from having to get into JavaScript date formatting which is terrible when compared to Oracle.
    Regards,
    Dan
    http://danielmcghan.us
    http://www.skillbuilders.com
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Access form item in menu item Sql

    Pls friends can you tell me How to access Forms item in Menus startup and Menu item SQL.
    Thanx in advance

    use:
    DECLARE
      myvar VARCHAR2(2000);
    BEGIN
      myvar:=NAME_IN('BLOCK.ITEM');
      COPY(myvar, 'BLOCK.ITEM');
    END;

  • How to Initialize Items on Form

    Hi Everyone,
    I have created a form in screen painter with 2 items as editBox. Form is able to load but I want to initialize one item by current Date and other item from data table i.e. field prid should have a document no and field prdate should display current date OR user should enter '-t' then current date should display.
    How to achieve this functionality. (SBO 2005B)
    Regards
    OP Sharma

    Hi Lakshman / Mongi,
    It is still not working. Maybe I missing something. Here is the code I am using:
            LoadFromXML("Purchase_requistion.srf")  ' Form load successfully
            oForm = SBO_Application.Forms.Item("opsPR")   'Form UID
            'Initialize the Item on the form : uid="reqDt" ,type = it_edit 
            oForm.Items.Item("reqDt").Specific.String = DateTime.Now.Date.ToString()
            oForm.Visible = True
    It is still displaying blank item i.e. Request Date. (I want it exactly as displaying in all SBO form like Sales Order etc, default is today date and format should be mm/dd/yyyy as per format defined in SBO)
    Please help.
    Regards
    OP Sharma

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • How to validate htmldb_item form item

    I have a multiple row form item using htmldb_item.text ( so that a user can enter a quantity for that row item ).
    How is validation best handled to ensure that a value is entered for that row?
    note: there is also a htmldb_item.checkbox on the row that the user checks to flag that an operation should be done.
    Thanks as usual
    Bill

    for what this is worth:
    as scott said, only checked values are passed through from htmldb_item.checkbox'es over to the htmldb_application.g_fNN arrays. that's just how conventional web checkboxes work. if you want to keep your checkboxes in your form, just do their processing in a separate loop. if you're having a hard time keeping the values of your checkbox array matched up with the other htmldb_item values from their corresponding rows, just make sure your checkboxes return values you can use to identify your checked rows. so if you were going against the emp table, i'd suggest having your checked values return EMPNO's...
    select htmldb_item.checkbox(1,empno) c from emp
    ...that way you could more easily match those empno's up with your other htmldb_application.g_fNN values during your page processing.
    hope this helps,
    raj

  • How to remove these items from Infopath ribbon in web enable form?

    Hi All,
    I am using custom list form customized in infopath 2013, I want to remove these items from ribbon :
    I tried with Infopath  "form Options" like:
    But still showing "Picture-1" options. How to remove those items from ribbob?

    Hi,
    I understand that in the list view web part, you wanted to remove the ribbon of InfoPath form.
    There are to mothed to achieve it:
    Open the list, click new item, edit page, edit web part, unclick the ‘Show InfoPath Ribbon or toolbar’ box, the new item page will remove the riibon.  Then when you open the page which has the list view web part, the ribbon of InfoPath form will also
    be removed.
    Open the page which has the list view web part, edit page, edit the list view web part, unclick the ‘Show InfoPath Ribbon or toolbar’ box, the ribbon of InfoPath form in the web part will be removed. Then when you open the list, the ribbon of InfoPath form
    will also be removed.
    The two method edit the same page newifs.aspx, so the list and the webpart will be modified in the same time.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to update a report  from a form on the same page when form item changes

    I have a portal form from a table and a portal SQL report with a bind variable on a page. I want the report to get updated with details based upon what was selected from a form item. The form item is a selection from a dynamic LOV. Whenever the form item gets changed, the report should get updated to reflect the change. Can this be done using a javascript ONCHANGE event?
    Oracle Portal Version is 10.1.2.2.0.

    Your applet can open an URLConnection and read directly a document from your webserver.
    public String readText() {
      java.net.HttpURLConnection conn = (java.net.HttpURLConnection)myURL.openConnection(); ...
    }So using JavaScript on your page, you might call readText() to fill that textarea.
    The interesting link you gave, handled the JavaScript/Applet interaction. Test that with just return "Hello";.
    The real programming is more interesting.

  • How to save formula items in oracle forms?

    Dear All........
    I am nw in this forrum, can anybody plz tell me how to save forumula items in database, I also make that fields as a database field but it is not save in database. plz tell me. thx.

    Dear!
    Steps to take formula column value into database field, follow following steps:
    1. Draw a text field named "Formula_Cell"and set its properties which you want for formula. Now, goto its "Database" property set to "No".
    Now, goto its "Canvas" Property set to "Null".
    2. Now, in Pre-Insert or Pre-Update trigger use following code:
    Suppose database field name is AMOUNT then:
    :AMOUNT := :FORMULA_CELL;
    If you want to mension block names with this then you may do.
    Remeber, Formula Column's property of Database must be set to No.
    Now, try to save I hope you will got a good solution...

  • How to initialize an adf component before a page loads

    Hi all
    I use JDeveloper 11.1.2.2.0
    I have two pages:
    first page has a link to a second page
    <af:document title="first.jspx" id="d1">
      <af:form id="f1">
        <af:commandLink text="Page 2" id="cl1" action="goToSecondPage" actionListener="#{Bean.handleLinkActionEvent}"/>
      </af:form>
    </af:document>and the second page has an inputText component:
    <af:document title="second.jspx" id="d1">
      <af:form id="f1">
        <af:inputText label="Text" id="it1" binding="#{Bean.inputText}" readOnly="true"/>
      </af:form>
    </af:document>First I load first.jspx and than I click the link. This event is handled in handleLinkActionEvent() method, in which I want to set a value to the inputText component of the second page. But I can't do it, because as expected I get NullPointerException.
    So the question is how to initialize an adf component before a page loads?
    Evgeny Michuk
    Edited by: Evgeny Michuk on Oct 4, 2012 11:30 PM

    Thanks a lot for your replies and links, it gives me some new knowledges.
    I got your approach and achieved the aim for the described situation with tag <f:setPropertyActionListener>:
    <af:commandLink text="Page 2" id="cl1" action="goToSecondPage"
                           actionListener="#{Bean.handleLinkActionEvent}" binding="#{Bean.firstPageLink}">
      <f:setPropertyActionListener target="#{pageFlowScope.text}" value="Hello, World!"/>
    </af:commandLink>and for the inputText component I set the value:
    <af:inputText label="Text" id="it1"  binding="#{Bean.inputText}"
                                  readOnly="true" value="#{pageFlowScope.text}"/>I used request scoped managed bean and it is shared for both pages.
    I understand that I can set a value of some attribute for managed bean
    and use it to set a value for inputText component of the second page,
    but as I understand it is almost the same way as usage of tag <f:setPropertyActionListener>.
    In my real situation on the second page I have a dynamic table, and it's field is read only.
    Structure of this table depends on a link clicked on the first page.
    So I define components for table columns in runtime, it may be outputText, inputDate, goLink and some others.
    And I have to get table through the UIComponent binding to set columns.
    Certainly I can define all needed components for all columns
    and render it according to the column types
    <af:table value="#{Bean.collectionModel}" var="row" id="t1" binding="#{Bean.mainTable}">
       <af:forEach items="#{Bean.columnDescriptionList}" var="column">
          <af:column headerText="#{column.caption}" id="c1">
             <af:outputText value="#{row[column.fieldName]}" id="ot1" rendered="#{column.type == '1'}"/>
             <af:inputDate value="#{row[column.fieldName]}" id="ot2" rendered="#{column.type == '2'}"/>
             <af:selectBooleanCheckbox id="sbc1" selected="#{row[column.fieldName] == '1'}" rendered="#{column.type == 'n'}"/>
          </af:column>
       </af:forEach>
    </af:table>but I think it is not very good.
    Have you any idea?
    P.S. I hope I clearly explained my situation =)
    Evgeny Michuk

  • Javabean for colorpicker to select color for form item

    1- copy the colorpicker.jar in your /forms/java directory
    2 - update the archive and archive_jini tags of your /forms/server/formsweb.cfg file:
    archive_jini=frmall_jinit.jar,colorpicker.jar
    archive=frmall.jar,colorpicker.jar
    3 - in your form, add a Bean Area in a block - bean name = 'bean'
    4 - initialize the bean in a When-New-Form-Instance trigger:
    FBean.Register_Bean('block.bean',1,'oracle.forms.demos.beans.ColorPicker');
    5 - pick the color anywhere you want:
    PROCEDURE PickColor(pvcTarget in VARCHAR2) IS
    vcColor VARCHAR2(11 char);
    BEGIN
    -- now display the picker with that color as an initial value
    vcColor := FBean.Invoke_char('block.bean',1,'showColorPicker','Select color','');
    END;
    I will follow these steps and colorpicker is shown but i want to select the color for form item such as text item , canvas etc.
    I want when i select the color from colorpicker that color is assign to that item. such as changing the background color and foreground color of text item.
    I need help about this.
    How i solve this problem.
    need code.

    Hello,
    Once you get the color, you can apply it to the item with the Set_Item_Property() built-in (see the online doc).
    Francois

  • Cycle form item

    hello every one,
    i've a problem. I load my form ( created by screen scraper)  after the click of a button created by me.
    But when i open it  once when i click the button. I want to open this form every time I click the button. How can I make it? thanks
    If pVal.ItemUID = "button1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True Then
                CreateForm()
    end if
    Private Sub CreateForm()
            '//load form created by Screen Painter
            Dim oXmlDoc As MSXML2.DOMDocument
            oXmlDoc = New MSXML2.DOMDocument
            If Not (oXmlDoc.load("C:\Documents and Settings\neos\Desktop\Demo\primo_form.srf")) Then
                MsgBox("Error Loading xml")
            End If
            SBO_Application.LoadBatchActions(oXmlDoc.xml)
            oForm = SBO_Application.Forms.ActiveForm
            '//support Settings feature for grid/matrix
            '//Add condition to the CFL bound to the button
        End Sub

    You cannot load the exact same XML file over and over, since it has the same unique ID.
    You will need to modify the unique ID property of the form, before you load it.
    Here's the function i've written to open XML forms:
      Function SBO_Load_XML_Form(ByVal FileName As String, ByVal Title As String) As SAPbouiCOM.Form
        Dim XmlDoc As New Xml.XmlDocument
        Dim Form As SAPbouiCOM.Form
        Dim Form_UID As String = Settings("FormsUniqueIDPrefix").ToString & Settings("Form_Counter").ToString
        Try
          XmlDoc.Load(FileName) ' Get the XML code from the .xml file specified
          XmlDoc.SelectSingleNode("Application/forms/action/form/@uid").Value = Form_UID
          XmlDoc.SelectSingleNode("Application/forms/action/form/@title").Value = Title
          SBO_UI.LoadBatchActions(XmlDoc.InnerXml) ' Load the form to the SBO application
          Form = SBO_UI.Forms.Item(Form_UID) ' Get the form's object by its unique ID
    selected
          Form.Left = (SBO_UI.Desktop.Width - Form.Width)  2
          Form.Top = (SBO_UI.Desktop.Height - Form.Height)  2
        Catch ex As Exception
          Msg(ex.Message)
          Form = Nothing
        Finally
          Settings("Form_Counter") = CInt(Settings("Form_Counter")) + 1 ' Increase the form counter, to support the forms' unique ID
        End Try
        Return Form
      End Function
    For the smooth handling of the unique form IDs (and for other stuff) I use a 'settings' hashtable, defined like this:
      ' Hash for keeping general settings
      Public Settings As New System.Collections.Hashtable
    ' somewhere in the code, in the initialization functions, i've put the code below.
    ' this code makes the form unique ID to prevail even if some forms load badly
    ' and even if you stopped your addon and restarted it while some of your forms
    ' are still loaded
          Hash.Add("FormsUniqueIDPrefix", "myNameSpace_")
          ' Calculate the form counter, so new forms will be created with correct ordered numbers
          Dim Form_Counter As Integer = 0
          For i As Integer = 0 To SBO_UI.Forms.Count - 1
            Dim FormUID As String = SBO_UI.Forms.Item(i).UniqueID
            If FormUID.StartsWith(Settings("FormsUniqueIDPrefix").ToString) Then
              Dim tmp As Integer = CInt(FormUID.Substring(Settings("FormsUniqueIDPrefix").ToString.Length))
              If tmp > Form_Counter Then Form_Counter = tmp
            End If
          Next
          Form_Counter += 1
          Hash.Add("Form_Counter", Form_Counter)

  • In GP how to get work items in outlook inbox

    Hi,
    Any one can explain me how to send work items to Outlook Mail. This option is there in ABAP work flow. I need solution in GP.
    Please give any sloution.
    Thanks,
    Sunil

    Hi Jonathon,
    in our last project, we faced the same problem and resolved it with a standard notification CO:
    - we put a notification CO (+ action) in front of the action you mentioned (that one that generates the UWL's workitem and provides the CO for manual processing)
    - the notification's addressee will be the current processor, who is also the guy to do the manual processing
    - the notification email contains a link to the process' current workitem, which is the action you mentioned (e.g. a webdynpro form or whatever the manual processing is)
    The result is, that there will be an automatically sent notification, followed by the normal manual processing. And our client was happy to be able to customize every single email.
    See this link for email administration: http://help.sap.com/saphelp_nw04s/helpdata/en/43/f9097d1b607061e10000000a1553f6/frameset.htm
    Best regards
    Daniel

  • Please tell me how to handle list item in this concern

    please tell me how to handle list item in this concern
    My problem is:
    i have a category table with column categoryname(varchar type)
    I want to display the records of categoryname in a drop down list (i.e., list item )
    So ..please tell me how to do it
    Thanks in advance..

    This code is just a sample from the Help documentation. It won't work until you modify it for your form.
    Why do you have "steps" in your code? You are suppose to do what the steps tell you. You don't place the steps in your code. The steps must be removed from your code.
    Step 1 code goes in a program unit, not in a trigger.
    Step 2 and 3 code usually goes in a trigger.
    You will have to replace the names of the items and record group with your own names as you have defined them in your form.
    step 1: create a procedure in your application
    procedure load_list(itm in VARCHAR2, rg in VARCHAR2) is
    group_id RecordGroup := Find_Group(rg);
    list_id Item := Find_Item(itm);
    Begin
    if Populate_Group(group_id)<>0 then
    Message('Unable to populate record group');
    Raise Form_Trigger_Failure;
    end if;
    Clear_List(list_id);
    Populate_list(list_id, group_id);
    end;
    step 2: create a record group named rg_cat and assign Record Group Query to something like "select categoryname from category"
    step 3: call this procedure as
    load_list('categoryname','rg_cat');

Maybe you are looking for

  • IPod classic will not sync...

    I plug in my iPod, it starts downloading the songs, says "synching iPod, do not disconnect..." Then it just stops synching, and the computer says "attempting to copy to the disk Kirstin's iPod has failed. unknown error, error (-53)". Then says "iPod

  • Intalling qlogic on solaris 10 x86

    Hi, Does anyone knows where could I find the drivers for SAN Foundation for X86 enviroment? I only have been able to find the Sparc ones. Regards JJ

  • Function Module to read Info cube data

    Hi Guys,           Is there any function module which is used to read the data in the info cube and collect the data to an internal table? Thanks Kumar

  • Problems installing lightroom 4 on mac running leopard osx 10.5.8

    When I insert disc, I can open the disc, showing the lightroom 4 package, and the readme file. When I double click the package, nothing happens. When I open the installer, and click on the disc for lightroom 4, nothing happens. Help?

  • Error on new macbook pro: requested resource not found

    hey everyone, i just purchased a new macbook pro yesterday. im trying to download movies for a flight, but i can't even sign in (or authorize) my new comp with the apple store. when i try to do either i get an error message, +"we could not complete y