Netui:textbox default value

Hi,
I am trying to use the following code as per the sample given in the help doc. But everything is working fine except the defaultValue attribute. I want to dynamically create 5 textboxes with defaultValue and use form bean while submitting the same. The code is as follows,
<netui-data:repeater dataSource="{actionForm.test}">
<netui:textBox defaultValue="123" dataSource="{actionForm.test}" />
</netui-data:repeater>
Here test is the array in the form. Instead of default value, I am getting the array reference value as the default value like [Ljava.lang.String;@18d551d is displayed. Anyone could help me out.
Please Reply immediately.
Thanks,
Bala.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

hi,
I just used {container.item} as datasource and solved
the error. Anyway thanks for ur response.
Thanks and Regards,
Bala.I had a similar problem and this fixed it, thanks.
But, now I have a different problem.
If I initialize the array in my form and then display the jsp, the array is displayed with individual textboxes as desired.
But, when I submit the form I get an index out of bounds exception.
I'm assuming that it is trying to set the submitted values back into the array which has been reset to a zero length array, and this is causing the exception.
The workshop automatically put this code in my Form when I added the array member (myList):
public String[] getMyList()
// For data binding to be able to post data back, complex types and
// arrays must be initialized to be non-null.
if(this.myList== null || this.myList.length == 0)
this.myList= new String[1];
return this.myList;
The getMyList() method appears to be called for every textbox that gets submitted (each array element).
How do I know how many elements to make my array in getMyList() since the length could vary?
Jeff

Similar Messages

  • Netui:select default value on top instead of bottom

    Is there anyway that I can change the netui:select tag to show the default value
    on the top of the list instead of the bottom?
    thanks
    kunal

    Kunal--
    If you are binding to a data set (a LinkedHashMap, for example), you can insert the default value
    into the data set in code in the JPF before binding to the select box, but it's not configurable
    when simply setting the defaultValue attribute.
    Apologies for the limitation.
    Eddie
    Kunal Mittal wrote:
    Is there anyway that I can change the netui:select tag to show the default value
    on the top of the list instead of the bottom?
    thanks
    kunal

  • Netui:select default value at the top

    I am using netui:select with following syntax:
    <netui:select defaultValue="--Select--" dataSource="{actionForm.contactType}"
    optionsDataSource="{pageFlow.contactTypes}" styleClass="app-commomForm"> </netui:select>
    The problem is "--Select--" is shown at the bottom of the drop down. What do I
    do to show at the top of the list?

    Maybe you can use the default value attribute, that way the user will always see the select selected...
    or maybe try using a string array and place select at the start of the array...

  • Netui:radioButton - default value

    I am using a netui:radioButtonGroup with 2 options -
    option a and option b.
    The user selects an option and it gets saved to the database. When the user comes back, I want to have his saved option automatically selected using the defaultValue. However, it is not getting selected. Any ideas?
    Thanks
    Kunal

    Set the property of the field in the form bean at the class level and in the radio button it will be defaulted to "A".
    form bean:
    private String radioOption = "A";
    public void setRadioOption(String aRadioOption) {
                   this.radioOption = aRadioOption;
              public String getRadioOption() {
                   return this.radioOption;
    jsp:
    <netui:radioButtonGroup dataSource="{actionForm.radioOption}">
         <netui:radioButtonOption value="A">A</netui:radioButtonOption>
         <netui:radioButtonOption value="B">B</netui:radioButtonOption>
         </netui:radioButtonGroup>

  • SSRS Cascading Parameter Setting Default Value of Parameter by Expression

    Hi All,
    I need some help on an issue I am running into in SQL server 2008 report parameters. I have the following Report Parameters defined:
    1) @PredefinedDateSelection - Boolean (User Selectable True/False, Default Value - 'False')
    2) @StartDate - Text (User input text box)
    If @PredefinedDateSelection = TRUE, then I would like to provide a particular default value to the StartDate textbox (i.e. @StartDate Default Value), If @PredefinedDateSelection = FALSE, then I would like to provide a different default value.
    I have the following code for the Expression for the Default value of @StartDate: =code.GetStartDate(Parameters!PreDefinedTimeSelection.Value)
    where GetStartDate is a very simple VB function defined as :
    Public Function GetStartDate(x as boolean ) As String
    Dim a as string
    Dim b as string
    a = "Report Uses Predefined Values"
    b = "Please Input Value"
    If (x) then
    Return a
    else
    Return b
    end if
    end function.
    Now the default value of @StartDate stays set as "Please Input Value", and does not change when I toggle @PredefinedDateSelection from False to True and vice versa. I was expecting to see the Default value to change between the two messages depending on my selection in the report preview.
    Another parameter which is a dropdown and uses a dataset to display two different set of selectable items depending on the value of @PredefinedDateSelection is working just fine. I am not sure if I am missing something or I am doing something wrong.
    Instead of using the VB code I also tried : =iif(Parameters!PreDefinedTimeSelection.Value = True,"Report Uses Predefined Values","Please Input Value")
    I also tried changing the default value using a dataset with SQL query and the available value set to NONE, so that the user could input. But the Default value does not refresh or change values.
     I hope I have explained my question clearly. I would really appreciate any thoughts and comments.
    Thanks,
    Arunesh

    Thank you much for your response.
    I tried that and it did work. But my requirement is to have a user input the date. The basic idea is if the user decides on a predefined time range like Day Shift Today or Yesterday and so on... then the report would automatically calculate the values based on predefined date time values. On the other hand, if the intent is to run the report for an arbitrary period then the user supplies the date and time limits.
    What I am trying to achieve is have the same parameter available for user input , but when the User decides he wants Predefined then the "textbox" populates with date and time as per his choice of predefind range.
    I understand that by this the user can still overwrite the date and time on the text box, but the report will run the predefined values as long as he has the @PredefinedDateSelection Set to true.
    Is there a way I can impement this?
    Once again I thank you and appreciate  your input.

  • Default value of form

    How can I use a query or custom function to retrieve a forgein key field to be the default value of a field. Also, the types are different. Here is my example:
    table: addresses
    address varchar2(100);
    city varchar2(30);
    state number(10);
    table: states
    id number(10);
    description varchar2(50);
    I want to create a form on table ADDRESSES and have the state not a list of values, but a read only field that displays the contents of the description field of STATES. How can I do this? I have tried to work with default value but don't know how to reference the STATE value in a query in the default value textbox and when I get any value (select 'OK' from dual), it complains that it cannot convert 'OK' to a number.
    Any thoughts? Thanks in advance.

    Please give some Information as how are you planning to get the description for the field as when you will open the form based on address table ,which description (I mean for which state) you wish to get,as there will be no way to find the address in a fresh form.

  • Extending flash: how do I set default values for filenames

    Hi,
    I am trying to set default values for filenames
    <choosefile> and <popupslider>s that will show up when
    my XMLpanel first loads in my jsfl extension file. It seems that I
    can only set default values for textbox items.
    How do I do this for filenames and popups?
    As a workaround, I also tried using a flash object dialog box
    to look like a <choosefile>, or any jsfl command, but then
    how do I return those values back to the XMLpanel that calls them.
    and pass the data back to my jsfl script.
    lemme know if you know a way,

    Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
    Misha

  • Dynamic parameter default values

    Hello guy,
    i'm having a little problem, i hope someone in here can help me. So, here is my situation:
    I'm building a windows forms application in C# to display some reports. As i want to redesign all the controls, i made my own prompt to fill in the parameters. This works really fine, except one thing:
    Whenever a parameter has default-values (so just a list of values is allowed), I switch from a textbox to a dropdown-menu filled with the default values.
    No problems with static parameters, but i can't find a way to access the default values from dynamic parameters (values are retrieved from SQL-Server). The default prompt from the report-viewer can do it right, so i hope  you can hep me with my following question:
    Is there a way to obtain these values? Or at least the SQL-statement that is used to get them?
    thanks
    using:
    Visual Studio 2010 v10.0.30319.1
    Crystal Reports runtime engine .NET 4, v13.0.1.220
    Crystal Reports for Visual Studio v13.0.1.220
    Edited by: Peter Wurstberg on Oct 12, 2011 1:15 PM

    I don't think the CR or Enterprise .NET SDK has any public APIs to retrieve default dynamic prompt values for crystal report parameter. With Java SDK there are no direct methods as well, however you can tap the HttpResponse object to read the prompt values that are sent to your viewer by the server as the viewer displays them and prompts you to select parameter value, however this method is not officially supported. With .NET SDK I am not sure if it is even possible. You have to use the standard viewer to see those values and let the viewer prompt with them, ratherthan your own controls.
    Hope that helps.
    Aasavari

  • How to use P_SESSION.GET_VALUE_AS_VARCHAR2 in MDform item default Value

    I have a master detail form based on two tables. In the DETAIL_BLOCK section I have an item named 'APPROVAL_STATUS' based on the column of the same name in the underlying table. I have an unassociated textbox named CURR_APPROVSTAT in the detail form for which I would like to set it's default value to the current value of APPROVAL_STATUS when the master detail form is opened in %3D mode via a hyperlink.
    I have tried using the p_session.get_value_as_varchar2 in the default value field of the CURR_APPROVSTAT item, but it generates errors on run.
    EX:
    Item CURR_APPROVSTAT
    default value field
    p_session.get_value_as_varchar2(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'APPROVAL_STATUS')
    Default Value type:
    Function returns varchar2
    on run, it generates error that p_session must be declared (I get the same error if I use portal.p_session... also).
    default value field
    select p_session.get_value_as_varchar2(p_block_name => 'DETAIL_BLOCK', p_attribute_name => 'APPROVAL_STATUS')from dual
    Default Value type:
    SQL returns varchar2
    on run, it generates and error that a right parenthesis is missing.
    I have also tried using the following in the Additional PL/SQL - before displaying form:
    p_session.set_value
    (p_block_name => 'DETAIL_BLOCK'
    ,p_attribute_name => 'CURR_APPROVSTAT'
    ,p_value => p_session.get_value_as_varchar2(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'APPROVAL_STATUS')
    on run, this generates the error identifier 'P_SESSION.GET_VALUE_AS_VARCHAR2' must be declared
    My questions are:
    1) is it possible to use the p_session.get_value_as_varchar2 in the default value field?
    2) If yes, then what if the proper syntax
    3) If no, can I set this value when the MD form opens from the additional pl/sql triggers, and if so, what is the syntax?
    any assistance you can offer is greatly appreciated.
    Sincerely,
    ARM

    In my detail block I have 10 rows displaying that may or may not have data after querying. To set the default value in the detail block, you have to set the index value of p_session.set_value. Since I don't know how many rows are already populated, I'm setting the default value to all 10 rows. Is there a better approach?
    Here's my code example, which I've placed in the additional PL/SQL section before displaying the form...
    DECLARE
    l_district_id VARCHAR2(7);
    BEGIN
    l_district_id := p_session.get_value_as_varchar2
    (p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_DISTRICT_ID');
    FOR i in 1 .. 10 LOOP
    p_session.set_value
    (p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_DISTRICT_ID',
    p_value => TO_CHAR(l_district_id), p_index => i);
    END LOOP;
    END;

  • [svn:fx-3.x] 10868: change default value of selectable in ASDoc comment to true

    Revision: 10868
    Author:   [email protected]
    Date:     2009-10-05 11:05:50 -0700 (Mon, 05 Oct 2009)
    Log Message:
    change default value of selectable in ASDoc comment to true
    QE notes: -
    Doc notes: -
    Bugs: -
    Reviewer: -
    Tests run: - checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/TextArea.as

    Thank you much for your response.
    I tried that and it did work. But my requirement is to have a user input the date. The basic idea is if the user decides on a predefined time range like Day Shift Today or Yesterday and so on... then the report would automatically calculate the values based on predefined date time values. On the other hand, if the intent is to run the report for an arbitrary period then the user supplies the date and time limits.
    What I am trying to achieve is have the same parameter available for user input , but when the User decides he wants Predefined then the "textbox" populates with date and time as per his choice of predefind range.
    I understand that by this the user can still overwrite the date and time on the text box, but the report will run the predefined values as long as he has the @PredefinedDateSelection Set to true.
    Is there a way I can impement this?
    Once again I thank you and appreciate  your input.

  • Tagid attribute in netui:textbox in jsp is not reflecting

    Hi,
    I included this netui tag in my jsp
    <netui:textBox dataSource="{actionForm.custId}" tagId="custTagId"></netui:textBox>
    But attribtue "tagid" doesnot seems to be reflecting in the html pages.
    thanks,
    shashi

    Tanya,
    This works well in a pageFlow. But it in the context of a portal it throws a JavaScript
    error saying that document[getNetuiTagName("myForm")][getNetuiTagName("age")]
    is null.
    Thanks,
    Anant
    "tanya" <[email protected]> wrote:
    >
    I'm not sure what you mean by "reflecting", but if you're referring to
    accessing
    it via javascript, see the following:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conValidatingUserInput.html
    You'll end up having to do something like this:
    <netui:html>
    <netui:textBox tagId="age" dataSource="{actionForm.age}" onBlur="isValidAge();"/>
    </netui:html>
    And this would be the JavaScript function isValidAge:
    function isValidAge() {
    if(document[getNetuiTagName("myForm")][getNetuiTagName("age")].value
    <= 0)
    alert('Wrong Age');
    -Tanya
    "shashishekar" <[email protected]> wrote:
    Hi,
    I included this netui tag in my jsp
    <netui:textBox dataSource="{actionForm.custId}" tagId="custTagId"></netui:textBox>
    But attribtue "tagid" doesnot seems to be reflecting in the html pages.
    thanks,
    shashi

  • Allowing Default Values OR typed values in a SSRS Report Parameter

    Hello,
    I'm able to set a parameter while designing a SSRS report to use a list of values or I can chose to specify no values.  In the latter scenario when actually running the report the value can be typed instead of selected.
    What seems impossible is to allow (while running) the user to type a value but also having the option of using default values.   It seems if the options for default or available values are entered with information while designing the report, the ability
    to type values into the report while running it is taken away.

    Hi ebs_software,
    Per my understanding you want to know if there is any method to type the parameter values and also can select a value from the drop down list, right?
    Generally, by default, when you haven't specify the "Available values" you will able to type an value in the parameter input textbox, or you will not able to do this. For the field of "Date/Time" type when you haven't specify the "Available
    values", you can pick up the date from the calendar picker and also can type the value in the textbox.
    Thanks for your understanding!
    Regards
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Parameter default value issue

    Hi, I am using SQL Server 2008 R2 database & SSDT (Visual Studio 2012) to develop reports. I am trying to modify an existing report after the upgrade and something seems not right especially with report parameter default values. I am using the expression
    below and for the default value its always returning the false part. When I put this expression in a textbox to test results it works as expected. Thanks in advance.
    =IIf(Parameters!Area.Value = "Test Area", "1", "2")
    Ione

    Hi Lone,
    Per my understanding you are experiencing the issue that the report parameter’s default values not work, the default values for this parameter is using the expression based on another parameter, but now it not always display the correct value, right?
    I have tested on my local environment and can reproduce the issue, the issue can be caused by you have not specified available values for this parameter base on their parent parameter(Area), so the parameters will not refresh when the value of the first
    parameter has changed. In Reporting Services, if we want to create cascading parameters, we should specify both available values and defaults values for child parameters.
    Please specify the Available values as below, using both the expression in the Label and Value:
    =IIf(Parameters!Area.Value = "Test Area", "1", "2")
    You also use an alternative method to create this parameter without using the expression:
    Create an Dataset using below query to get the Parameter(“1”,”2”):
    select distinct (CASE WHEN (@Area) =' Test Area' THEN '1' ELSE '2' END) AS  FieldName  from TableName.
    In  the Second Param(Param2) In both the “Available Values” and “Default Values” select the “Get values from a query”.
    For more information about how to create cascading parameters, please see MSDN document which tell us how to do it steps by steps.
    http://msdn.microsoft.com/en-us/library/aa337498(v=sql.105).aspx.
    If your problem still exists, please feel free to ask.
    Regards
    Vicky Liu

  • Default Value is not getting displayed in SUN ONE Ldap

    Hello,
    I have created an attribute in slapd.user_at.conf and it is associated in slapd.user_oc.conf.
    The attribute default value is given through SUN ONE Console. But, In our application the default value is not getting displayed.
    We need the default value to run our applicatin. Can anyone help me for this issue
    Regards,
    K. Senthil Kumar

    Hi anandkumar,
    I belive this issue can be resolved by changing the  Query proprties for the perticular field.
    Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
    __Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
    FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
    Hope this helps you!!
    Best Regards,
    Maruthi

  • How to load a default value in to a column when using sql loader

    Im trying to load from a flat file using sql loader.
    for 1 column i need to update using a default value
    how to go about this?

    Hi!
    try this code --
    LOAD DATA
       INFILE 'sample.dat'
       REPLACE
       INTO TABLE emp
       empno   POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
       ename   POSITION(06:15)  CHAR,
       job         POSITION(17:25)  CHAR,
       mgr       POSITION(27:30)  INTEGER EXTERNAL NULLIF mgr=BLANKS,
       sal        POSITION(32:39)  DECIMAL EXTERNAL NULLIF sal=BLANKS,
       comm   POSITION(41:48)  DECIMAL EXTERNAL DEFAULTIF comm = 100,
       deptno  POSITION(50:51)  INTEGER EXTERNAL NULLIF deptno=BLANKS,
       hiredate POSITION(52:62) CONSTANT SYSDATE
      )-hope this will solve ur purpose.
    Regards.
    Satyaki De.

Maybe you are looking for

  • BAPI to create Sales Order with reference to contract

    Hi All, I am trying to create Sales Order with reference to Contract, but although the order gets created, it does not contain reference document information.  The BAPI I am using is BAPI_SALESORDER_CREATEFROMDAT2.  Would someone know which parameter

  • How to divide a grid (an 2D array) into subgrids? [Suduko]

    Hey guys I've been struggling with a problem with my Suduko program for a few days now and thought I could get some help here. The problem is that I have no idea how to divide a Suduko grid and stuff them into subgrids. My current plan is to go throu

  • Missing Print Templates Folder

    I have recently purchased some blog templates and I can not install them because I have no print templates folder. I go edit-preferences-show lightroom folder- lightroom- and there is no print templates folder to drop the templates into. Please help!

  • PCI Express SCSI Card

    Which PCI Express SCSI Card should I use for a DAT Tape drive on a Mac Pro?

  • Mail - unread mail count does not decrement

    When reading a stack of new email I find that the unread email count (little number next to "inbox" folder) does not change as I read the mail. If I click on another folder and go back to the inbox the number changes to reflect the accurate count. An