Use system console with editable default value

Hi,
Is it possible in java (or maybe groovy) to ask user for input in console with default value passed? User should be able to edit the default value or commit it by pressing enter key.
Sample:
<CONSOLE> Enter type: TYPE1<cursor>
if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?

Opal wrote:
if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?For java it would need to look more like the following
<CONSOLE> Enter type[enter for default 'TYPE1']: <cursor>
I suspect that generally users will not be editing the default, so although you can't do it, it isn't much of a loss.

Similar Messages

  • XML FORM  -  How to save read-only controls with a default value

    Hello everybody,
    I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
    The question is, how can I include in this forms a control:
      - Visible for the user
      - With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
      - Read-only mode
      - The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button. 
    Anyone knows how to do this?
    What control can I use?
    I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
    It is posible using labels?
    Thanks.
    Kind regards

    Hello Jose,
    I know you responded with a question... I see it in the email, but I don't see it here!  Very odd... but in response:
    The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location').  Repeat the find until you see something like:
    [code]<!--
    field location
    -->[/code]
    Below there is where I put the new code.  Mine looks like this:
    [code]- <xsl:choose>
    - <xsl:when test="location='' and ($editmode='create')">
    - <xsl:choose>
    - <xsl:when test="./xf:ValidationError/@tagname='location'">
    - <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="tabindex">
    - <xsl:choose>
      <xsl:when test="$accessibilitymode='true'">21</xsl:when>
      <xsl:otherwise>3792</xsl:otherwise>
      </xsl:choose>
      </xsl:attribute>
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:when>
    - <xsl:otherwise>
    - <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:otherwise>
      </xsl:choose>[/code]
    I put the <xsl:attribute name="readonly"> in both places (when test, and when not test).  I'm not entirely sure if that's necessary, but that worked for me.
    Hope this helps,
    Fallon

  • How to use one variable as a default value for another variable?

    Hi Experts,
    Is it possible to use one variable as a default value for another variable?
    For example:
    Variable 1 = current calendar year month
    Variable 2 = mandatory input ready variable for calendar year month
    I want to use variable 1 as default value for variable 2, but also have the ability to change the month if required.
    Thanks!
    Kathryn

    u can use replacement path variable
    in that case u can replace the values of 1 variable with the another variable...
    but  u cannot do this setting
    u cannot make variable 2 as mandatory
    u cannot enter value for variable 2
    because by default it will take the value of variable 1
    u have to make follow settings
    variable 2
    name , technical name
    processing by = replacement path
    infoobject = ocalmonth
    next tab
    replaced by another variable
    variable name
    offset start , offset lenght
    save and hit okey

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • PDK Java Portlet looses edit default values everytime I redeploy EAR

    Hello All,
    I have a PDK Java portlet (Portal - Oracle 10g). It works as expected perfectly till I redeploy my EAR. As soon as I redeploy EAR, it looses the settings that user had set using edit defaults link. Is there anyway to prevent this? Application runs on OC4J server.
    I urgently need solution to this problem and any help would be greatly appreciated.
    Thanks,
    Kinnaree

    Just to be sure, you are registering the PDK producer with a WebCenter portal?
    Or are you just using the PDK provider in an oracle portal environment and you don't use webcenter?
    If you are using webcenter, can you also test this behavior in Oracle portal? Do you also loose the values in oracle portal or is it just in webcenter? This way we can see if it's a webcenter or portlet issue.
    If you loose the values on both the oracle portal and webcenter side, than it has something to do with the portlet. If they are working correctly in oracle portal, than it might be a bug in the PDK bridge in Webcenter.
    Edited by: Yannick Ongena on Jun 23, 2011 11:14 AM

  • Apex_item select list to be displayed with multiple default values

    I am using APEX 4.2.
    For one of our requirements , we are displaying a report which uses "apex_item.select_list_from_query" multiselect field.
    The above function accepts a parameter, 'p_value' using which we can specify the default value to be highlighted.
    Is there any way to highlight multiple values on the select list by default, when the page is loaded, based on a sql output.
    Sample Scenario:
    Say colour is a multiselect field. Full list of values available : R, B, G, Y, O
    On day1, for record1 i am choosing R and B. which I am saving in the backend when the page is submitted.
    On day2 : I login again to see the report. When the report is loaded, I should see the values 'R' and 'B' highlighted or in a different font format , differentiated from the rest.
    Thanks in advance for your replies.
    Regards,
    Raasi
    Edited by: 878815 on Mar 11, 2013 10:23 PM

    878815 wrote:
    I am using apex_item.select_list_from query. and then a piece of javascript to concatenate as a colon delimited string. This is the function I am using in the report sql,
    apex_item.hidden(20,null)||apex_item.select_list_from_query(6,null,'<sql>','multiple size = "6" onChange="Multi(this)"','NO' ) as col_1I think 'multiple size' is a custom attribute and APEX have no clue about it.
    javascript code:
    function Multi(p_this)
    var l_selected=html_SelectValue(p_this);
    if (l_selected.constructor == Array) l_selected=l_selected.join(':');
    p_this.parentNode.firstChild.value = l_selected;
    return l_selected;
    };What is this apex_item.hidden used for.. placeholder?
    May be populate the hidden item with default value as colon delimited string and on page load use some JavaScript to read that string and set/highlight the select list.
    It would be easy if you can replicate the issue on apex.oracle.com

  • How to set system date as a default value in UIX/XML page?

    Example: We set default values using following statements:
    <set property="inputValue" target="${bindings.PoNumber}" value="${'1234'}"/>
    <set property="inputValue" target="${bindings.UserName}" value="${param.MyParam1}"/>
    In JDeveloper Help, we cannot find a way to set a Date attribute's default value to today's (system) date. Any suggestions?
    Also, does anyone have a reccomendation on a good book for uix/xml?
    Thanks, Ali.

    bump

  • How can I use today's date as default value in query string filter web part in SharePoint

    I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...

    Hi,
    Per my understanding, you might want to set a default value to the Query String Filter Web Part.
    It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
    By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
    of browser.
    If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
    URL into the address bar:
    http://sharepoint/SitePages/Page1.aspx?t=value1
    Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
    page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
    About how to redirect user to other page with an URL:
    http://www.tizag.com/javascriptT/javascriptredirect.php
    How to get today’s date using JavaScript:
    http://www.w3schools.com/js/js_dates.asp
    Best regards      
    Patrick Liang
    TechNet Community Support

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • Using a Sql Result in Default Value of Dashboard Prompt

    Hi,
    I Create a Dashboard Prompt, this have two dates, the initial and the last for a period to filter. I need to set the default value in the fist and last date of the previous month, for example, if today is 20th of november the default value of initial date has been 1th of October and the last date has been 31th of october.
    I used in default the option 'SQL Results' and use the next sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM') FROM dual;
    SELECT TRUNC(last_day(add_months(sysdate, -1))) from dual;
    But when I try to use the dashboard prompt the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT TRUNC(add_months(sysdate,-1),'MM') FROM dual
    When I try to use only select sysdate from dual; the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27004] Unresolved table: "dual". (HY000)
    Thanks for your help.

    Thanks for your help. Finally I solve this issue of
    this form:
    1. I Create a Initialization Block with the next
    sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM')
    INITIAL_DATE ,TRUNC(last_day(add_months(sysdate,
    -1))) END_DATE, To_char(TRUNC(add_months(sysdate,
    -1), 'MM'), 'YYYYMM') PERIOD FROM dual;
    2. Then I Create three Repository Variables and
    assign the Initialization Block to this
    3. In the Dashboard Prompt I use the "Server
    Variable" Option in the default and call the three
    variables.
    Thanks again
    EdwinHi: How u access server variable with two fields of date. Actually, I am doing the same work. But I can not do this work. Because this is ok when the date is greater than or less than. When i use between, in default server variable button did not show any text area for reoository variable. I also made initailization block with 2 fields.
    My Task is, I have to initialize the one date coloumn. From Date: and To Date. Pluzz help me in section
    Ali Haroon Nawaz

  • Runtime error with column default value settings

    I have one SP2010 (enterprise) document library which gives me a runtime error if I click on "column default value settings" in the settings. Other document libraries' column default value settings are working fine. I use managed metadata
    and created libraries from templates. I deleted all custom columns from the site, only title is left over (content types are document and link to a document) but runtime error still shows up. How can I fix this?
    Server Error in '/' Application.
    Description:
    An application error occurred on the server. The current custom error
    settings for this application prevent the details of the application error from
    being viewed remotely (for security reasons). It could, however, be viewed by
    browsers running on the local server machine.
    Details: To enable
    the details of this specific error message to be viewable on remote machines,
    please create a <customErrors> tag within a "web.config" configuration
    file located in the root directory of the current web application. This
    <customErrors> tag should then have its "mode" attribute set to
    "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
    Notes:
    The current error page you are seeing can be replaced by a custom error page by
    modifying the "defaultRedirect" attribute of the application's
    <customErrors> configuration tag to point to a custom error page
    URL.
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>
    Runtime Error

    Thanks for your suggestions. I found the log but don't know what it means. Can anybody help?
    System.ArgumentOutOfRangeException:   startIndex cannot be larger than length of string. Parameter name: startIndex  
      at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length,   Boolean fAlwaysCopy)
      at   Microsoft.Office.DocumentManagement.MetadataNavigation.PerLocationViewManager.HumanReadablePath(SPList   list, Guid fieldId, String uniqueNodeId, String pathDelimiter)
      at   Microsoft.Office.Server.WebControls.MetaDataNavTree.TreeViewDataBound(Object   sender, EventArgs e)
      at System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e)
      at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
      at   Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationContext.OnTreeViewLoad(SPTreeView   spTreeView)
      at Microsoft.Office.Server.WebControls.MetaDataNavTree.PerLocationPageLoad()
      at   Microsoft.Office.DocumentManagement.Pages.ColumnDefaultsPage.OnLoad(EventArgs   e)
      at System.Web.UI.Control.LoadRecursive()
      at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

  • Prompts with dynamic default values

    I have a request from my client to modify several reports so that two date prompts will have default values populated with the first and last day of the previous month.  All of the reports are currently using custom sql so I have to be able get the dynamic default value in the extended @prompt syntax.  However, I am not able to use any of the sql functions since the functions merely appear as plain text as the default value itself. 
    I have found a few work arounds to achieve the functionality of the dynamic prompts, but I cannot get the actual default value displayed to the user to be dynamic.  Is it possible to achieve this by using only the custom sql?

    Hi Sandeep ,
    Below blog may answer your query .
    Dave&amp;#8217;s Adventures in Business Intelligence &amp;raquo; Dynamic Dates Part III: Monthly Date Ranges
    Search for And for Last Month?

  • What is the Best Approach for System Defined Fields and Default values

    Hi ,
    Please let me know that what can be the best approach for providing a Default value for the System defined fields when creating a User and How can we hide the System defined fields at the time of User creation

    You cannot provide default values for any attributes defined in the FormMetaData.xml file. You can only provide default values for fields defined in the User Defined Fields and supply a default value.
    You can using entity adapters to populate some of the values, but you must supply an Organization because there is an entity adapter that you cannot modify that verifies the organization name.
    -Kevin

  • Using a Table as a Default Value in a Custom List

    Hi,
    I am trying to create a list for users to fill out that utilizes multiple tables for data entry. I would like to set the table to be the default value for the field in order to have consistency across submissions and for ease of use. I have tried using HTML
    code for the table as well as copying the HTML markup from inserted tables in the field but I have been unable to generate a table in the field by default. I have tried this in both the web based editor and Sharepoint Designer 2010.
    Thanks!

    Hi aelawler,
    Which type field did you use for storing the table? Please try to create a site column using Publishing HTML type or Enhanced rich text, and add the column to the list, use it to store the table. Test it using your method, compare the result.
    Here is a post about setting default value for enhanced rich text, please pay attention to Amit's reply:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/a6b5614d-ae45-4e2f-af0e-7e1887b05f60/set-default-value-to-enhanced-rich-text-box?forum=sharepointcustomizationprevious
    If it doesn’t work, I think, you need to create a custom field type to store the table, and set default value for it. You can try to create it based on the Publishing HTML or Enhanced rich text type.
    Create a custom field type in SharePoint 2010
    http://www.bing.com/videos/watch/video/creating-custom-field-types-for-sharepoint-2010/10t33r1uw
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Difficulty in creating a chart by using a function with a returned value

    Hi,
    I am having a problem in using own function to create chart a with a returned value as the chart. If not using the returned value, it works fine.
    Is this a known issue?

    If you share some code, we might be able to help you.

Maybe you are looking for