How to create a text item dynamically

Greetings to All Expert,
Could anyone please tell me how i create a text item with code.The scenario is like this....
Suppose there is a text item corresponding to department_id=10 and i dont know how many employees r there in this department.Now if the query returns 10 employee then how do i display these 10 employees name.....it may be 20 employees also...i dont know the actual number before executing the query..
Regards,
Wel
Edited by: 787312 on Aug 15, 2010 1:03 AM
Edited by: 787312 on Aug 15, 2010 4:19 AM

Hi,
You can create two blocks for this. One is an unbound block which consist of a text box with a command button. Other block is a bound block from your table(multiple rows block). In hierarchical, unbound block should above above bound block, which makes the focus control goes first to the text box. When the user type the dept code and click on the button it goes to bound block and execute the query.
you can write code in the command block as below
set_block_property('<boundblockname>',default_where,'deptno = '||:ti_DEPTNO);
go_block('<boundblockname>');
execute_query;Best Regards
MP

Similar Messages

  • How to create a Text Input Dynamically

    hi,
    I have to create a text input dynamically.
    I have use follwing code but its nt working
    OAMessageTextInputBean oamessage=new OAMessageTextInputBean();
    oamessage.setLabel("Table Name");
    oamessage.setMaximumLength(30);
    oamessage.setID("TableId");
    Can ny body share ur thoughts
    Thanks
    Nani:)

    Hi Nani,
    OAPageLayoutBean pagelayout=(OAPageLayoutBean)webBean.findChildRecursive("PageLayoutRN");If your code is for top most controller of page, above line possibly returns null because webBean itself is "PageLayoutRN" so no other child with "PageLayoutRN".
    please use webBean.addIndexedChild as told by gaurav.
    In case the above controller is not associated with pageLayout region and the need is to add the new child under pageLayout then use pageContext.getPageLayoutBean().
    Optionally you can just replace quoted line in your existing code with this one and that should work.
    OAPageLayoutBean pagelayout=pageContext.getPageLayoutBean();Abdul Wahid

  • How to create label & text items in a page dynamicly(TOP URGENT)

    Dear all;
    did any1 tried before to create a PLSQL which can create labels or text items?!! i have a page which i want to create labels according to the count of rows in the Database table?
    Regards;

    I would first try creating an 'On Load - Before Header' PL/SQL Computation to count the rows, and store the result in a hidden page/application item, e.g. P120_ROW_COUNT.
    Then in the label of the item, put &P120_ROW_COUNT. as the Label Text.
    I haven't tested it - but it should work.

  • Create Input Text Item Dynamically

    Hi
    I'm trying to create an input Text Dynamically and add that to the Table
    but i'm having problem with createWebBean method it's can't invoke it.
    please help thanks
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
    import oracle.apps.pa.ci.webui.PaSupplierImplementCO;
    import oracle.apps.pa.util.webui.Debug;
    public class xxpaPaSupplierImplementCO extends PaSupplierImplementCO {
        public void processRequest(OAPageContext paramOAPageContext,OAWebBean paramOAWebBean) {
            super.processRequest(paramOAPageContext, paramOAWebBean);
            xxpaProcessRequest(paramOAPageContext, paramOAWebBean);
        public void xxpaProcessRequest(OAPageContext paramOAPageContext,OAWebBean paramOAWebBean) {
            super.processRequest(paramOAPageContext, paramOAWebBean);
            print_log("Start processRequest",paramOAPageContext);
            OATableBean localOATableBean = (OATableBean)paramOAWebBean.findIndexedChildRecursive("SupplierTable");
            if (localOATableBean != null){
               OAMessageTextInputBean xxPaPOQuantityBy = (OAMessageTextInputBean)createWebBean(paramOAWebBean,OAWebBeanConstants.MESSAGE_TEXT_INPUT_BEAN,null,"xxPaPOQuantityBy");
               OAMessageTextInputBean xxPaPOQuantityBy1 = (OAMessageTextInputBean)createWebBean(paramOAWebBean,MESSAGE_TEXT_INPUT_BEAN,null,"xxPaPOQuantityBy");
               xxPaPOQuantityBy.setPrompt("Change Quantity By");
               xxPaPOQuantityBy.setMaximumLength(10);
               localOATableBean.addIndexedChild(xxPaPOQuantityBy);
               print_log("PO QTY ADDED ot Supplier Table",paramOAPageContext);
            print_log("End processRequest",paramOAPageContext);
    }

    Hi,
    Try with:
    OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)createWebBean(oapagecontext, "MESSAGE_TEXT", null);
    Regards
    Meher Irk

  • How to change a text item to have a link that opens a different page?

    Hi,
    How to change a text item to have a link that opens a different page?
    Thanks,
    Guy

    Hi Denes,
    I understood what the code will do. But it did not work.
    ...a href="f?p=&APP_ID.:2:&SESSION.">LINK</a...
    By default, P5_TASK_NAME displays Task Name which is passed from Page 3.
    So I changed your code as follows so that P5_TASK_NAME value may be displayed with a link.
    ...a href="f?p=&APP_ID.:3:&SESSION.">:P5_TASK_NAME</a...
    But P5_TASK_NAME value appears without any link and does not open page 3.
    Then I created a new text item (display only) in the same HTML region in page 5 and entered the following code in the default box:
    ...a href="f?p=&APP_ID.:3:&SESSION.">LINK</a...
    When I ran the application, it displayed the whole code as text.
    How can I display P5_TASK_NAME value with a link to open page 3?
    Would appreciate your help.
    ... to be replaced with < or >
    Could you please let me know how to display link code correctly?
    Thanks,
    Guy
    Edited by: GUY3 on Mar 11, 2009 4:20 PM

  • How to create an UI element dynamically on action in drop down?

    Hi,
    How to create an UI element dynamically on action of selecting a value from the  drop down?
    help out with the steps i need to follow..

    Hi,
    <u><i><b>Dynamic UI Element creation</b></i></u>
    We can create it only in the WD Modify View.
    Get the instance for the Root UI Element Container.
    Create the UI element Ex: Input Field, Text View etc.
    Bind the UI Element to the Attribute Value.
    Now bind the UI Element to the Root UI Element Container.
              IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
              IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
              IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
              IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
              IWDNode Mad =wdContext.getChildNode("Person",0);
              IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
              IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
              IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
              DdbName.bindValue(NameAtt);
              DdbAge.bindValue(AgeAtt);
              DdbGender.bindValue(GenderAtt);
              root.addChild(DdbName);     
              root.addChild(DdbAge);
              root.addChild(DdbGender);
    <u><i><b>Dynamic Action Creation</b></i></u>
    Create the Action in the Action tab.
    Create a Button.
    Get the reference for the created action (Through the Event Handler).
    Bind the Action to the Button.
    Bind the Button to the Root UI element Container.
    IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
    IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
    ButGo.setOnAction(ActGo);
    root.addChild(ButGo);
    Now write the required code for the Event Handler that is associated with the Action.
    //@@begin onActionGo(ServerEvent)
        IWDNode Mad = wdContext.getChildNode("Person",0);
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
    //@@end
    Regards
    SURYA

  • How can I find text-item description and content in database?

    I make "Actual news" region with text and simple image items.
    With "Custom Search" autoquery I make news portlet with 10 latest news.
    But I will make with PDK-Java discussion portlet, in which users can read and write about last published (last created text item display name and content) news.
    My questions:
    - How can I find text-item description and content in database?
    - How I can sort text-items to find latest created in my region?
    I have Portal R2
    Thanks in advance.
    Cheslav

    I am sorry. The following are the related tables.
    WWV_TEXT
    WWV_TEXT_BLOCKS
    WWV_TEXT_BLOCK_USAGES
    WWV_USER_TEXT_BLOCKS
    WWV_USER_TEXT_BLOCKS$
    WWV_USER_TEXT_BLOCK_USAGES
    WWV_USER_TEXT_BLOCK_USAGES$
    May be you want to browse WWV_TEXT which is the core table.

  • Creating new text field dynamically

    Hi,
    can anybody let me know how can we create new text fields dynamically in JSF.
    Basically the GUI will have a button/command link ,when clicked should create a new text field and then when the user enters any value in the new text fileld the formbean should be able to capture the value.
    so the user will have the choice of creating any number of text fields depending on the requirement.
    is javascript the only solution for this or can we do this JSF also?
    Thanks in advance.

    You may find this article useful then: [http://balusc.blogspot.com/2006/06/using-datatables.html]. The 'add new row' example is described here: [http://balusc.blogspot.com/2006/06/using-datatables.html#AddNewRowsToDatatable]. If it concerns only one field, just use only one column. You can for instance even use List<String> instead of a List<RowObject>.

  • How to create a table component dynamically in netbeans 6.0 (JSF 1.2)?

    How to create a table component dynamically in netbeans 6.0 (JSF 1.2)?
    This example http://developers.sun.com/jscreator/reference/techart/2/createTableDynamically.html works only with JSF 1.1.

    Please help my write correct code.
    How to replace this strings for run example?
    rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{Page1.tripDataProvider}"));
    staticText1.setValueBinding("text", getApplication().createValueBinding("#{currentRow.value['TRIP.TRIPID']}"));

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How to create a text file or XML file  and add content through  code into it...

    Hi Everyone,
    How to create a text file and add content through the code to the text file eform javascript ......orelse can we create a text file in life cycle designer...
    Else say how to create a new XML file through the code and how some content like Example "Hello World".

    You can create a text file as a file attachment (data object) using the doc.createDataObject and doc.setDataObjectContents:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.450.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.528.html
    You can then export the file with the doc.exportDataObject method:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.463.html
    This won't work with Reader if it hasn't been given the file attachment usage right with LiveCycle Reader Extensions.

  • How to create a text box in ascreen painter?

    HI friends can anyone tell me how to create a text box in a screen painter?
    And attachment BROWSER like what we attach for any documents in over mail.
    Example when we click on browser the path of the computer has to be opened and by giving the document name attach and the document will be attached. Please tell me the procedure....
    Thks

    To get the best answers, I think you probably need to break down your post into several different one with a separate question in each, along with the business problem you are trying to solve... but here's a few pointers for you to research...
    Textbox - there's plenty of info in SDN on creating a custom control with a textbox e.g. Re: Text Editor on modulepool Screen and sample code in SAP too.
    Attachments - If this is for an email, then GUI_UPLOAD might help and the BCS class is the newer way to send messages... check out Re: Offline Approval: RBBP_NOTIFICATION_OFFAPP Vs RSWUWFMLEC for example... if this is an attachment for an SAP object such as an FI Document or Purchase Order, then the Generic Object Services (GOS) could be what you want e.g. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3
    Jonathan

  • How to Create a text frame?

    Hai
    i'm senthil....
    i'm just now started working with Adobe Indesign plugin's..
    Can anyone tell me how to create a text frame...
    wat r the steps for creating a text frame?
    what are the Interface pointers used for creating a text frame...
    plzz reply me who knows...
    bye.

    See SDKLayoutHelper::CreateTextFrame.
    You can also look at SnpCreateFrame::CreateTextFrame in SnippetRunner.
    Regards,
    Narayan

  • How to Create a Text Variable

    Hi Experts...
    Can you please explain me how to create a Text variable...
    In my Cube i had 3 different date fields....
    and as per my requirment i need to create a rolling report for which will display data for 6 months rolling.
    As the date field which i need to use is not mapped to Time Char's (Cal Year,Cal Month...etc)
    For that reason i created below customer exit variable and used offset variables to achieve the rolling 6 months report
    Code used for Customer Exit VAriable:
    WHEN 'ZC_Cmonth1'. " Current Cal Month Car Expiry
    IF i_step = 2.
          CLEAR l_s_range.
    determine date
        LV_SYDAT     =  SY-DATUM.
        LV_YEAR_ACT  =  SY-DATUM+0(4).
        LV_MONTH_ACT =  SY-DATUM+4(2).
    Set begin date of intervall
    CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '01' INTO LV_DATE_LOW.
    Set end date of intervall
    CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '31' INTO LV_DATE_HIGH.
    Fill ranges-tab with: include all values between beginning of year
    and actual date
      CLEAR E_T_RANGE.
      CLEAR L_S_RANGE.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT  = 'BT'.
      L_S_RANGE-LOW  = LV_DATE_LOW.
      L_S_RANGE-HIGH = LV_DATE_HIGH.
      APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Now i need to create TEXT VARIABLE that will display the Month Name in the column name
    Please update in detail step how to create a Text Variable

    In your specific requirement select the which ever the keyfigure you want  to analyse, go to edit mode of keyfigure propeties there select the newvariable type and create the Text variable by maintaining the proper offset start and length and also maintain the in whcih format u want see the month name in column headers. Maintain the Text format or key format. it totally depends on u r requirement.
    Hope it will help ful for u.
    Bye,
    Chandu.

  • Wondering how to create a text box with variables...

    Hi everyone,
    I was wondering how to create a text box, that at the beginning of the presentation, the audience fills in regarding what they think constitutes the role they have been chosen for.
    I would like that same box to then appear at the end of the presentation, with the text they typed in at the beginning, so they can reflect on what they think now, and what they thought then. I understand this is done using variables, but i'm not 100% sure.
    I hope I've worded this okay!

    This screenshot shows the properties panel, Style tab for the TEB. I relabeled it to My_TEB, used the X button  to create a user variable v_choice that will replace the generic Text_Entry_Box_1/
    This is the properties panel of a Shape, I went in Edit mode (double clicking)to make the Character section appear, where you find the X button. It opens the dialog box 'Insert Variable' and you can choose the var associated with the TEB. The Maximum Length will define how many characters will be displayed, the value of a variable has maximum 256 characters.

Maybe you are looking for