Textbox in screenpainter

in screenpainter, we have textbox when we open its properties we have options such as (visible,nonvisible,possible and notpossible) what is the difference.
and how it can be used in our forms.

Hi,
         The properties have the following meaning:-
         1) Visiable:- It is visiable.i.e you can see the text box on the screen
                           during output/input.
         2) Invisiable:- It is presnt on the screen but it is not viviable to the end user.
         3) Possible:- It is used to enter / modify values in text box by the end user.
         4) Not Possible :- It is not possible to enter any value/data in the text box.
                                   In this it is only for output purpose.
          Reward Points if helpful..... 
Regards
Jitendra

Similar Messages

  • Get textbox values from ADF table

    Hi,
    I have af:table with input Textbox as a single column in which user can enter values.
    I have applied valuechangelistener for textbox using which I can get values entered by user.
    Say I have multiple rows. When valuechangelistener is called, I get only current entered value. Whereas I need all the values entered by user in all the textboxes.
    How I can implement this?

    HI try this:
    1) make binding of your table
    2)make rowSelection="multiple" on table
    3)select multiple rows for which you want data using ctrl.
    4)add below code in method of backing bean on actionlistener of some button say save or edit
    UIXTable table = getSearchResultsTable();
    //getting iterator to iterate over selected row keys
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext()) {
    Object rowKey = selection.next();
    //setting the rowKey to table one by one
    table.setRowKey(rowKey);
    String strRow=(String) table.getRowData();
    //then you can add this in list or whatever you want
    }

  • Different coloured text in one Textbox

    Can someone PLEASE help me!!!!!!!!!!!!!!
    I need to know how to have different coloured text in the same textbox.
    My application has text being inputted into the textbox every 5 seconds from 2 different sources. I want to differenciate the text by showing the user 2 different colours for each source.
    Thank you very much

    Acording to the first post it also shows data, so it is a GUI component. i never sow a textbox.
    JTextPane can show data in different colors. also JTextArea can.
    Noah

  • How to embed fonts in a textbox in adobe acrobat 9

    Hi all,
    The forms has beed designed in adobe acrobat 9.It has the text in the textboxes with a fontstyle of DejaVu Sans Mono.The client or the user generates the form by clicking on the appropriate link and the textboxes are populated accordingly.The problem is they dont have the fontstyle used in the textbox installed on their system.So whenever they generate the pdf the font in the textbox doesn't print in properly.Is there anyway we could force it to use the font which we have originally set up.Thanks in advance

    Bernd Alheit wrote:
    Read this:
    http://www.ehow.com/how_6566713_embed-fonts-pdf.html
    I have the somthing like the following in Ctrl-D Fonts. They can not be embedded using the method above. I guess it is because the fonts in the original pdf are not available in the system. But how to embed the substitutes in the pdf file.
    Helvetica
        Type: Type 1
        Encoding: Custom
        Actual Font: Helvetica
        Actual Font Type: TrueType

  • Unable to get the data from a website with dynamically filled textboxes when accessing through myWb.Document.GetElementById("num1").InnerText;

    Hi Team,
    I am learning on webbrowser control and during the learning phase i have the following issue:-
    My webbrowser [mywb in this case] is successfully navigating and displaying the website content in webbrowser control. However; that site has three textboxes with dynamically allocated text from asp script
    code behind; I have tried to display these textboxes values by providing the correct id of these textboxes in my visual studio 2013 code; but I am not receiving any data except null. Can you help me on this as early as possible.
    asp code written to dynamically assign the data to textbox:-
    <%
    myvar=Request.form("some")
    Response.write("<input type=text id=num1 value=" + myvar+ ">")
    %>
    The code written in VS 2013 to access the textbox  by its id when the DocumentCompleted event is triggered:-
    string mystr ="";
    mystr = myWb.Document.GetElementById("num1").InnerText;
    MessageBox.Show(mystr);
    Thank You in Advance.
    Regards, Subhash Konduru

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because the issue is related to website, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Composite control - change text property of textbox from .cs file

    Hi All,
    I have created a composite control with dropdowns and hiddenfield for datepicker. Now when I change the value of dropdown from browser - client side then its value is retained on postback. But when I change value programmatically its not reflected on
    screen.
    using System;
    using System.Text;
    using System.Collections;
    using System.Collections.Generic;
    using System.Globalization;
    using System.ComponentModel;
    using System.Drawing;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.Design;
    using System.Web.UI.WebControls;
    using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
    namespace GOV.Framework.Portal.Controls
    /// <summary>
    /// Simple DateTimePicker control that uses jQuery UI DatePicker to pop up
    /// a date, time or both picker.
    /// </summary>
    [ToolboxBitmap(typeof(System.Web.UI.WebControls.Calendar)), DefaultProperty("SelectedValue"),
    ToolboxData("<{0}:DateTimePicker runat=\"server\"></{0}:DateTimePicker>"), PersistenceMode(PersistenceMode.InnerProperty)]
    public class DateTimePicker : WebControl
    #region "Global Variables"
    public enum DisplayControls
    TextBox,
    Dropdown
    public enum DisplayModes
    Button,
    ImageButton,
    AutoPopup,
    Inline,
    public enum DisplayTypes
    Time,
    Date,
    DateTime
    public enum DisplayMonthTypes
    Full,
    Short
    private enum DisplayYearTypes
    Full,
    Short
    private DropDownList ddlDay = new DropDownList();
    private DropDownList ddlMonth = new DropDownList();
    private DropDownList ddlYear = new DropDownList();
    private TextBox txtDate = new TextBox();
    private Label lblMsg = new Label();
    private System.Web.UI.WebControls.Image imgCal = new System.Web.UI.WebControls.Image();
    private HiddenField hdnDate = new HiddenField();
    private DisplayModes _DisplayMode = DisplayModes.ImageButton;
    private DisplayControls _DisplayControl = DisplayControls.TextBox;
    private DisplayTypes _DisplayType = DisplayTypes.DateTime;
    private int _StepMinutes = 1;
    private int _StepHours = 1;
    private DateTime? _MinDate = null;
    private DateTime? _MaxDate = null;
    private string _OnClientSelect = "";
    private string _ButtonImage = "../Images/calendar.png";
    private string _CalendarCss = "WebResource";
    private string _CalendarJs = "../scripts/timepicker.js";
    private DisplayMonthTypes _DisplayMonthType = DisplayMonthTypes.Full;
    private DisplayYearTypes _DisplayYearType = DisplayYearTypes.Full;
    private int _minYear = DateTime.Now.Year - 25;
    private int _maxYear = DateTime.Now.Year;
    private int _minMonth = 1;
    private int _maxMonth = 31;
    private int _minDay = 1;
    private int _maxDay = 28;
    private string _dateControlClientId = string.Empty;
    DateTime? _SelectedDate = null;
    private bool _DisplayMessageLabel = true;
    private short _tabIndex;
    private const string vwst_SelectedDate = "_SelectedDate";
    #region "ErrorMessages"
    private const string SelectedDate_GreaterThan_MaxDate = "SelectedDate can not be greater than MaxDate";
    private const string MaxDate_LessThan_SelectedDate = "MaxDate can not be less than SelectedDate";
    private const string SelectedDate_LessThan_MinDate = "SelectedDate can not be less than MinDate";
    private const string MinDate_GreaterThan_SelectedDate = "MinDate can not be greater than SelectedDate";
    #endregion
    #endregion
    #region "Properties"
    #region "Private Properties"
    [Description("Determines display full or short(yy) year")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayTypes), "string")]
    private DisplayYearTypes DisplayYearType
    get
    return _DisplayYearType;
    set
    _DisplayYearType = value;
    [Description("Determines minimum year to be displayed in dropdown : Default currentyear - 25")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayTypes), "int")]
    private int MinYear
    get
    if (MinDate != null)
    _minYear = MinDate.Value.Year;
    else
    _minYear = DateTime.Now.Year - 25;
    return _minYear;
    //set
    // _minDisplayYear = value;
    [Description("Determines maximum year to be displayed in dropdown : Default currentyear")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayTypes), "int")]
    private int MaxYear
    get
    if (MaxDate != null)
    _maxYear = MaxDate.Value.Year;
    else
    _maxYear = DateTime.Now.Year;
    return _maxYear;
    //set
    // _maxDisplayYear = value;
    private string DateControlClientId
    get
    if (DisplayControl == DisplayControls.Dropdown)
    _dateControlClientId = hdnDate.ClientID;
    else
    _dateControlClientId = txtDate.ClientID;
    return _dateControlClientId;
    [Description("Determines minimum month of min date : default 1")]
    [Category("DateTime Selection"), DefaultValue(1)]
    private int minMonth
    get
    if (MinDate != null)
    _minMonth = MinDate.Value.Month;
    else
    _minMonth = 1;
    return _minMonth;
    [Description("Determines max months of max date: Default 12")]
    [Category("DateTime Selection"), DefaultValue(12)]
    private int maxMonth
    get
    if (MaxDate != null)
    _maxMonth = MaxDate.Value.Month;
    else
    _maxMonth = 1;
    return _maxMonth;
    [Description("Determines minimum day : Defualt 1")]
    [Category("DateTime Selection"), DefaultValue(1)]
    private int minDay
    get
    if (MinDate != null)
    _minDay = MinDate.Value.Day;
    else
    _minDay = 1;
    return _minDay;
    [Description("Determines max day: Defualt last day of max month")]
    [Category("DateTime Selection"), DefaultValue(30)]
    private int maxDay
    get
    if (MaxDate != null)
    _maxDay = MaxDate.Value.Day;
    else
    _maxDay = DateTime.DaysInMonth(MaxYear, maxMonth);
    return _maxDay;
    #endregion
    #region "Public Properties"
    /// <summary>
    /// The currently selected datetime
    /// </summary>
    [Category("DateTime Selection")]
    public DateTime? SelectedValue
    get
    DateTime dt = new DateTime();
    if (DisplayControl == DisplayControls.TextBox && txtDate.Text != "")
    DateTime.TryParse(txtDate.Text, out dt);
    else if (DisplayControl == DisplayControls.Dropdown && hdnDate.Value != "")
    DateTime.TryParse(hdnDate.Value, out dt);
    if (dt != null && dt != new DateTime())
    _SelectedDate = dt;
    else
    _SelectedDate = null;
    return _SelectedDate;
    set
    if (!value.HasValue)
    txtDate.Text = "";
    hdnDate.Value = "";
    else
    if (value != null && MinDate != null && value < MinDate)
    throw new ArgumentOutOfRangeException("SelectedValue", SelectedDate_LessThan_MinDate);
    if (value != null && MaxDate != null && value > MaxDate)
    throw new ArgumentOutOfRangeException("SelectedValue", SelectedDate_GreaterThan_MaxDate);
    string dateFormat = this.DateTimeFormat;
    //if ( dateFormat == "Auto")
    // dateFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
    if (DisplayControl == DisplayControls.TextBox)
    txtDate.Text = value.Value.ToString(dateFormat);
    else if (DisplayControl == DisplayControls.Dropdown)
    hdnDate.Value = value.Value.ToString(dateFormat);
    _SelectedDate = value;
    if (DisplayControl == DisplayControls.Dropdown)
    setDropDownValue(value);
    [Description("Determines display textbox or dropdowns")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayModes), "TextBox")]
    public DisplayControls DisplayControl
    get { return _DisplayControl; }
    set { _DisplayControl = value; }
    [Description("Determines how the datepicking option is activated")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayModes), "ImageButton")]
    public DisplayModes DisplayMode
    get { return _DisplayMode; }
    set { _DisplayMode = value; }
    [Description("Determines what datetimepicker should return")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayTypes), "DateTime")]
    public DisplayTypes DisplayType
    get
    return _DisplayType;
    set
    _DisplayType = value;
    [Description("Increment minute factor when using the time picker.")]
    [Category("DateTime Selection"), DefaultValue(1)]
    public int StepMinutes
    get
    return _StepMinutes;
    set
    _StepMinutes = value;
    [Description("Increment hour factor when using the time picker.")]
    [Category("DateTime Selection"), DefaultValue(1)]
    public int StepHours
    get
    return _StepHours;
    set
    _StepHours = value;
    private string _DateTimeFormat = CultureInfo.CurrentCulture != null ? CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern : "dd/MM/yyyy";
    [Description("Determines the Date Format used. Auto uses CurrentCulture.DateTimeFormat.ShortDatePattern. Format: MM month, dd date, yyyy year symbol")]
    [Category("DateTime Selection"), DefaultValue("dd/MM/yyyy")]
    public string DateTimeFormat
    get
    return _DateTimeFormat;
    set
    _DateTimeFormat = value;
    [Description("Minumum allowable date. Leave blank to allow any date")]
    [Category("DateTime Selection"), DefaultValue(typeof(DateTime?), null)]
    public DateTime? MinDate
    get
    return _MinDate;
    set
    if (value != null && SelectedValue != null && value > SelectedValue)
    throw new ArgumentOutOfRangeException("MinDate", MinDate_GreaterThan_SelectedDate);
    _MinDate = value;
    [Description("Maximum allowable date. Leave blank to allow any date.")]
    [Category("DateTime Selection"), DefaultValue(typeof(DateTime?), null)]
    public DateTime? MaxDate
    get
    return _MaxDate;
    set
    if (value != null && SelectedValue != null && value < SelectedValue)
    throw new ArgumentOutOfRangeException("MaxDate", MaxDate_LessThan_SelectedDate);
    _MaxDate = value;
    [Description("Client event handler fired when a date is selected")]
    [Category("DateTime Selection"), DefaultValue("")]
    public string OnClientSelect
    get
    return _OnClientSelect;
    set
    _OnClientSelect = value;
    [Description("Url to a Calendar Image. Applies only if the DisplayMode = ImageButton")]
    [Category("DateTime Resource"), DefaultValue("../Images/calendar.png")]
    public string ButtonImage
    get { return _ButtonImage; }
    set { _ButtonImage = value; }
    [Category("DateTime Resource"), Description("The CSS that is used for the calendar or empty for default."), DefaultValue("WebResource")]
    public string CalendarCss
    get { return _CalendarCss; }
    set { _CalendarCss = value; }
    [Description("Location for the calendar JavaScript or empty for default.")]
    [Category("DateTime Resource"), DefaultValue("../scripts/timepicker.js")]
    public string CalendarJs
    get { return _CalendarJs; }
    set { _CalendarJs = value; }
    [Description("Determines what to Display full Month name or short month name")]
    [Category("DateTime Selection"), DefaultValue(typeof(DisplayTypes), "string")]
    public DisplayMonthTypes DisplayMonthType
    get
    return _DisplayMonthType;
    set
    _DisplayMonthType = value;
    [Description("Display static label for msg below date control")]
    [Category("DateTime Selection"), DefaultValue(true)]
    public bool DisplayMessageLable
    get { return _DisplayMessageLabel; }
    set { _DisplayMessageLabel = value; }
    [Bindable(true)]
    [DefaultValue("false")]
    public override short TabIndex
    get
    return _tabIndex;
    set
    _tabIndex = value;
    ddlDay.TabIndex = value;
    ddlMonth.TabIndex = value;
    ddlYear.TabIndex = value;
    imgCal.TabIndex = value;
    #endregion
    #endregion
    #region "Events"
    public DateTimePicker()
    this.Width = Unit.Pixel(80);
    /// <summary>
    /// Load all controls
    /// </summary>
    /// <param name="e"></param>
    protected override void OnInit(EventArgs e)
    base.OnInit(e);
    //Controls.Clear();
    //CreateAndAddControls();
    /// <summary>
    /// Add Child controls - Dropdowns and textbox;
    /// </summary>
    protected override void CreateChildControls()
    base.CreateChildControls();
    Controls.Clear();
    CreateAndAddControls();
    /// <summary>
    /// Load all controls
    /// </summary>
    /// <param name="e"></param>
    protected override void OnLoad(EventArgs e)
    base.OnLoad(e);
    if (DisplayControl == DisplayControls.Dropdown)
    if (ddlDay.Items.Count == 0 || ddlMonth.Items.Count == 0 || ddlYear.Items.Count == 0 || !Page.IsPostBack)
    FillDropdowns();
    generateDisplayMessage();
    protected override void LoadViewState(object savedState)
    base.LoadViewState(savedState);
    protected override void LoadControlState(object savedState)
    base.LoadControlState(savedState);
    protected override object SaveViewState()
    if (HasControls() && Page.IsPostBack)
    ddlDay.SelectedValue = "11";
    object obj = base.SaveViewState();
    return obj;
    protected override void TrackViewState()
    base.TrackViewState();
    /// <summary>
    /// Most of the work happens here for generating the hook up script code
    /// </summary>
    /// <param name="e"></param>
    protected override void OnPreRender(EventArgs e)
    base.OnPreRender(e);
    // Register resources
    this.RegisterResources();
    string script = GenerateScript();
    Page.ClientScript.RegisterStartupScript(this.GetType(), "_cal" + this.ID, script, true);
    /// <summary>
    /// Render Control
    /// </summary>
    /// <param name="writer"></param>
    public override void RenderControl(HtmlTextWriter writer)
    if (this.DisplayMode != DisplayModes.Inline)
    base.RenderControl(writer);
    else
    writer.Write("<div id='" + this.ClientID + "Div'></div>");
    if (HttpContext.Current == null)
    if (this.DisplayMode == DisplayModes.Button)
    writer.Write(" <input type='button' value='...' style='width: 20px; height: 20px;' />");
    else if ((this.DisplayMode == DisplayModes.ImageButton))
    string img;
    if (this.ButtonImage == "WebResource")
    img = this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "jQueryDatePicker.Resources.calendar.png");
    else
    img = this.ResolveUrl(this.ButtonImage);
    writer.AddAttribute(HtmlTextWriterAttribute.Src, img);
    writer.AddAttribute("hspace", "2");
    writer.RenderBeginTag(HtmlTextWriterTag.Img);
    writer.RenderEndTag();
    /// <summary>
    /// Render Control
    /// </summary>
    /// <param name="writer"></param>
    protected override void Render(HtmlTextWriter writer)
    RenderControls(writer);
    #endregion
    #region "Methods"
    /// <summary>
    /// Set properties of control
    /// </summary>
    private void CreateAndAddControls()
    txtDate.ID = "_txtDate";
    txtDate.CssClass = "dpDate";
    ddlDay.ID = "_ddlDay";
    ddlMonth.ID = "_ddlMonth";
    ddlYear.ID = "_ddlYear";
    imgCal.ID = "_imgCal";
    imgCal.CssClass = "trigger";
    imgCal.ImageUrl = this.ButtonImage;
    //imgCal.Visible = false;
    hdnDate.ID = "_hdnDate";
    lblMsg.ID = "_lblMsg";
    lblMsg.CssClass = "MsgLabel";
    if (DisplayControl == DisplayControls.Dropdown)
    txtDate.Visible = false;
    this.Controls.Add(ddlDay);
    this.Controls.Add(ddlMonth);
    this.Controls.Add(ddlYear);
    this.Controls.Add(hdnDate);
    else
    txtDate.Visible = true;
    this.Controls.Add(txtDate);
    this.Controls.Add(imgCal);
    this.Controls.Add(lblMsg);
    /// <summary>
    /// Add Controls to the control
    /// </summary>
    private void RenderControls(HtmlTextWriter writer)
    //if (ChildControlsCreated)
    // return;
    AddAttributesToRender(writer);
    writer.AddAttribute(HtmlTextWriterAttribute.Class, "datePickerTable", false);
    writer.RenderBeginTag(HtmlTextWriterTag.Table);//start of table
    writer.RenderBeginTag(HtmlTextWriterTag.Tr);//start of tr1
    if (DisplayControl == DisplayControls.Dropdown)
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    ddlDay.RenderControl(writer);
    writer.RenderEndTag();
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    ddlMonth.RenderControl(writer);
    writer.RenderEndTag();
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    ddlYear.RenderControl(writer);
    writer.RenderEndTag();
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    hdnDate.RenderControl(writer);
    writer.RenderEndTag();
    else
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    txtDate.RenderControl(writer);
    writer.RenderEndTag();
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    //Control ltrl1 = new LiteralControl();
    //writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "None");
    //writer.RenderBeginTag(HtmlTextWriterTag.Div);
    ////ltrl1.RenderControl(writer);
    //imgCal.RenderControl(writer);
    //writer.RenderEndTag();//end of div
    writer.Write("<div style=\"display:none\">");
    imgCal.RenderControl(writer);
    writer.Write("</div>");
    writer.RenderEndTag();
    writer.RenderEndTag();//end of tr1
    writer.RenderBeginTag(HtmlTextWriterTag.Tr);//start of tr
    writer.AddAttribute(HtmlTextWriterAttribute.Colspan, "4", false);
    writer.RenderBeginTag(HtmlTextWriterTag.Td);
    lblMsg.RenderControl(writer);
    writer.RenderEndTag();
    writer.RenderEndTag();// end of tr2
    writer.RenderEndTag();// end of table
    //string newTable = "<table class='datePickerTable'";
    //string endTable = "</table>";
    //string newTr = "<tr>";
    //string endTr = "</tr>";
    //string newTd = "<td>";
    //string endTd = "</td>";
    ////Controls.Clear();
    //InitControls();
    //Controls.Add(new LiteralControl(newTable + newTr + newTd));
    //if (DisplayControl == DisplayControls.Dropdown)
    // Controls.Add(ddlDay);
    // Controls.Add(new LiteralControl(endTd + newTd));
    // Controls.Add(ddlMonth);
    // Controls.Add(new LiteralControl(endTd + newTd));
    // Controls.Add(ddlYear);
    // Controls.Add(new LiteralControl(endTd + newTd));
    //Controls.Add(txtDate);
    //Controls.Add(hdnDate);
    //Controls.Add(new LiteralControl(endTd + newTd));
    //Controls.Add(new LiteralControl("<div style=\"display:none\">"));
    //Controls.Add(imgCal);
    //Controls.Add(new LiteralControl("</div>"));
    //Controls.Add(new LiteralControl(endTd + endTr));
    //Controls.Add(new LiteralControl(newTr + "<td colspan=4>"));
    //Controls.Add(lblMsg);
    //Controls.Add(new LiteralControl(endTd + endTr + endTable));
    /// <summary>
    /// Code that embeds related resources (.js and css)
    /// </summary>
    /// <param name="scriptProxy"></param>
    protected void RegisterResources()
    // Load the calandar script
    string script = this.CalendarJs;
    // Load jQuery Calendar Scripts
    if (script == "WebResource")
    Page.ClientScript.RegisterClientScriptResource(this.GetType(), "jQueryDatePicker.Resources.ui.datepicker.js");
    else if (!string.IsNullOrEmpty(script))
    Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "__jqueryCalendar", this.ResolveUrl(script));
    // Load the related CSS reference into the page
    script = this.CalendarCss;
    if (script == "WebResource")
    script = Page.ClientScript.GetWebResourceUrl(this.GetType(), "jQueryDatePicker.Resources.ui.datepicker.css");
    else if (!string.IsNullOrEmpty(script))
    script = this.ResolveUrl(this.CalendarCss);
    // Register Calendar CSS 'manually'
    string css = @"<link href=""" + script + @""" type=""text/css"" rel=""stylesheet"" />";
    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "_calcss", css, false);
    /// <summary>
    /// Converts a date to a JavaScript date string in UTC format
    /// </summary>
    /// <param name="date"></param>
    /// <returns></returns>
    private static string EncodeJsDate(DateTime date)
    return "new Date(\"" + date.ToString("U") + " UTC" + "\")";
    /// <summary>
    /// Generate Javascript for Datepicker plugin
    /// </summary>
    /// <returns></returns>
    private string GenerateScript()
    // To capture and map the various option parameters
    StringBuilder sbOptions = new StringBuilder(512);
    sbOptions.Append("{");
    //jQuey Script
    StringBuilder sbStartupScript = new StringBuilder(400);
    sbStartupScript.AppendLine("jQuery(document).ready( function() {");
    string dateFormat = this.DateTimeFormat;
    if (!string.IsNullOrEmpty(dateFormat))
    dateFormat = this.DateTimeFormat.Replace("MMM", "M").Replace("MM", "mm");
    sbOptions.Append("dateFormat: '" + dateFormat + "'");
    //string onSelect = this.OnClientSelect;
    if (this.DisplayMode == DisplayModes.Button)
    sbOptions.Append(",showOnFocus: false, showTrigger: '<button type=\"button\" class=\"trigger\">...</button>'");
    else if (this.DisplayMode == DisplayModes.ImageButton)
    string img = this.ButtonImage;
    if (img == "WebResource")
    img = Page.ClientScript.GetWebResourceUrl(this.GetType(), "jQueryDatePicker.Resources.calendar.png");
    else
    img = this.ResolveUrl(this.ButtonImage);
    sbOptions.Append(",showOnFocus: false, showTrigger: '#" + imgCal.ClientID + "'");
    sbOptions.Append(", onSelect: DateSelectedFromCalendar ");
    if (this.MinDate.HasValue)
    sbOptions.Append(",minDate: new Date(" + MinDate.Value.Year.ToString() + "," + (MinDate.Value.Month - 1).ToString() + "," + MinDate.Value.Day.ToString() + ")");
    if (this.MaxDate.HasValue)
    sbOptions.Append(",maxDate: new Date(" + MaxDate.Value.Year.ToString() + "," + (MaxDate.Value.Month - 1).ToString() + "," + MaxDate.Value.Day.ToString() + ")");
    sbOptions.Append(",yearRange:' " + this.MinYear.ToString() + ":" + this.MaxYear.ToString() + "'");
    //end of options
    sbOptions.Append("}");
    // Write out initilization code for calendar
    if (this.DisplayMode != DisplayModes.Inline)
    sbStartupScript.AppendLine("var cal = jQuery('#" + this.DateControlClientId + "').datepick(" + sbOptions.ToString() + ");");
    else
    sbStartupScript.AppendLine("var cal = jQuery('#" + this.ClientID + "Div').datepick(" + sbOptions.ToString() + ");");
    sbStartupScript.AppendLine("var dp = jQuery.datepicker;");
    if (this.SelectedValue.HasValue && this.SelectedValue.Value > new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc))
    sbStartupScript.AppendLine("dp.setDateFor(cal[0],new Date('" + txtDate.Text + "'));");
    sbStartupScript.AppendLine("dp.reconfigureFor(cal[0]);");
    //******************* When dropdown changes then reflect it in calendar
    if (DisplayControl == DisplayControls.Dropdown)
    sbStartupScript.AppendLine("\r\n\r");
    sbStartupScript.Append("$('#" + ddlDay.ClientID);
    sbStartupScript.Append(",#" + ddlMonth.ClientID);
    sbStartupScript.Append(",#" + ddlYear.ClientID + "').change(function() {");
    // disable months and days when they are less then day months of minimum date
    sbStartupScript.Append("$ddlDay=$('#" + ddlDay.ClientID + "');");
    sbStartupScript.Append("$ddlMonth=$('#" + ddlMonth.ClientID + "');");
    sbStartupScript.Append("$ddlYear=$('#" + ddlYear.ClientID + "');");
    sbStartupScript.AppendLine("var minYear=" + this.MinYear.ToString() + ";");
    ///disable months of minimum year which are less then minumum date month
    sbStartupScript.AppendLine("if($ddlYear.val()<=minYear && $('#" + this.DateControlClientId + "').val!=''){ alert('true');");
    sbStartupScript.AppendLine("var minMonth=" + this.minMonth.ToString() + ";");
    sbStartupScript.AppendLine("if($ddlMonth.val()<=minMonth){");//start of if of minMonth
    sbStartupScript.AppendLine("$ddlMonth.val(minMonth);");
    sbStartupScript.AppendLine("var minDay=" + this.minDay.ToString() + ";");
    sbStartupScript.AppendLine("$ddlMonth.find('option:lt('+minMonth+')').hide();");
    sbStartupScript.AppendLine("if($ddlDay.val()<=minDay)");
    sbStartupScript.AppendLine("$ddlDay.val(minDay);");
    sbStartupScript.AppendLine("}");// end of if of minMonth
    sbStartupScript.AppendLine("else {");
    sbStartupScript.AppendLine("$ddlDay.find('option').show();");
    sbStartupScript.AppendLine("}");// end of else part of min month
    sbStartupScript.AppendLine("$ddlDay.find('option:lt('+minDay+')').hide();");
    sbStartupScript.AppendLine("}");// end of if part of min Year
    sbStartupScript.AppendLine("else {");
    sbStartupScript.AppendLine("$ddlMonth.find('option').show();");
    sbStartupScript.AppendLine("}");// end of else part of min Year
    ///set date in calendar
    sbStartupScript.AppendLine();
    sbStartupScript.Append("$('#" + this.DateControlClientId + "').datepick('setDate', new Date(\n\r\r ");
    sbStartupScript.Append("$('#" + ddlYear.ClientID + "').val(),");
    sbStartupScript.Append("$('#" + ddlMonth.ClientID + "').val()-1,");
    sbStartupScript.Append("$('#" + ddlDay.ClientID + "').val()));");
    sbStartupScript.AppendLine("} );");
    //******************* When calendar changes then reflect it in dropdown
    sbStartupScript.AppendLine("\r\n\r");
    sbStartupScript.AppendLine("function DateSelectedFromCalendar(dates) {");
    if (DisplayControl == DisplayControls.Dropdown)
    sbStartupScript.AppendLine("$('#" + ddlDay.ClientID + "').val(dates.length ? dates[0].getDate() : '');");
    sbStartupScript.AppendLine("$('#" + ddlMonth.ClientID + "').val(dates.length ? dates[0].getMonth() +1 : '');");
    sbStartupScript.AppendLine("$('#" + ddlYear.ClientID + "').val(dates.length ? dates[0].getFullYear() : '');");
    if (!string.IsNullOrEmpty(this.OnClientSelect))
    sbStartupScript.AppendLine(this.OnClientSelect + "();");
    sbStartupScript.AppendLine("}");
    //******************* Validation Script
    sbStartupScript.AppendLine("\r\n\r");
    sbStartupScript.AppendLine("$('form').validate({");
    sbStartupScript.AppendLine("errorPlacement: $.datepick.errorPlacement,");
    sbStartupScript.AppendLine("rules: {");
    sbStartupScript.AppendLine(this.DateControlClientId + ": {");//start of format picker
    sbStartupScript.AppendLine("required: true, dpDate: true}");//end of formate picker
    sbStartupScript.AppendLine("}, ");// end of rules
    sbStartupScript.AppendLine("messages: {");
    sbStartupScript.AppendLine(this.DateControlClientId + ": 'Please enter a valid date (" + this.DateTimeFormat + ")'");
    sbStartupScript.AppendLine("}");// end of messages
    sbStartupScript.AppendLine("});"); //end of validate function
    //******************* close document ready function
    sbStartupScript.AppendLine("} );");
    return sbStartupScript.ToString();
    /// <summary>
    /// Fill day month and year dropdown
    /// </summary>
    private void FillDropdowns()
    //Fill Day Dropdown
    ListItem liDay = new ListItem("Day", "0");
    ddlDay.Items.Add(liDay);
    for (int i = 1; i <= 31; i++)
    ListItem li = new ListItem(i.ToString(), i.ToString());
    ddlDay.Items.Add(li);
    //Fill Month Dropdown
    ListItem liMonth = new ListItem("Month", "0");
    ddlMonth.Items.Add(liMonth);
    string monthName = string.Empty;
    for (int i = 1; i <= 12; i++)
    switch (DisplayMonthType)
    case DisplayMonthTypes.Full:
    monthName = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i);
    break;
    case DisplayMonthTypes.Short:
    monthName = CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(i);
    break;
    ListItem li = new ListItem(monthName, i.ToString());
    ddlMonth.Items.Add(li);
    //Fill Year Dropdown
    ListItem liYear = new ListItem("Year", "0");
    ddlYear.Items.Add(liYear);
    string yearDisplay = string.Empty;
    for (int i = MinYear; i <= MaxYear; i++)
    switch (DisplayYearType)
    case DisplayYearTypes.Full:
    yearDisplay = i.ToString();
    break;
    case DisplayYearTypes.Short:
    yearDisplay = i.ToString().Substring(2);
    break;
    ListItem li = new ListItem(yearDisplay, i.ToString());
    ddlYear.Items.Add(li);
    setDropDownValue(this.SelectedValue);
    private void generateDisplayMessage()
    if (this.DisplayMessageLable)
    if (this.DisplayControl == DisplayControls.TextBox)
    lblMsg.Text = this.DateTimeFormat;
    if (this.MinDate != null && this.MinDate.Value != new DateTime())
    lblMsg.Text += " From " + this.MinDate.Value.ToString(this.DateTimeFormat);
    if (this.MaxDate != null && this.MaxDate.Value != new DateTime())
    lblMsg.Text += " To " + this.MaxDate.Value.ToString(this.DateTimeFormat);
    private void setDropDownValue(DateTime? dt)
    if (ddlDay.Items.Count != 0 && ddlMonth.Items.Count != 0 && ddlYear.Items.Count != 0)
    if (dt != null && dt != new DateTime())
    ddlDay.SelectedValue = ddlDay.Items.FindByValue(dt.Value.Day.ToString()).Value;
    ddlMonth.SelectedValue = ddlMonth.Items.FindByValue(dt.Value.Month.ToString()).Value;
    ddlYear.SelectedValue = ddlYear.Items.FindByValue(dt.Value.Year.ToString()).Value;
    else
    ddlDay.SelectedValue = "0";
    ddlMonth.SelectedValue = "0";
    ddlYear.SelectedValue = "0";
    #endregion
    }Usage Of Code in .ascx<cc2:DateTimePicker ID="dtpDOB" DisplayType="Date" DisplayMode="ImageButton" ButtonImage="../Images/calendar.png" runat="server"Changing Value from .cs file dtpDOB.SelectedValue = DateTime.Parse("01/01/2001");It is not reflected in screen

    Hello,
    According to your code, it's an ASP.NET user control problem. Please post in
    ASP.NET forums where more web developers will give you help.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Setting the value of a textbox which is created in a loop

    Hi all,
    I have two jsp pages. In page1, I have a table which has rows that are generated in a loop. something like this.
    <script type="text/javascript">
    function callMe(num)
    alert("from callme");
    var linkId = "link"+num;
    var boxId = "qotApprBy"+num;
    var input = document.getElementById(linkId);
    //alert(input.name);
    if(input.name==linkId)
    document.getElementById(boxId).value="<%= aName %>";
    else
    document.getElementById(boxId).value="General";
    <table width="100%">
    <%
    for(int i=0; i<myList.size(); i++)
    String myName = (String)myList.get(i);
    String linkId = "link"+(i+1);
    if(aName==null)
    aName=myName;
    String qotApprById = "qotApprBy"+(i+1);
    System.out.println("id:" + qotApprById);
    %>
    <tr>
    <td>
    <input name="<%= qotApprById %>" type="text" id="<%= qotApprById %>" value="<%= aName %>"><a id="<%=linkId%>" href="FAM_OsiCustomApproverSearch.jsp?qotSearchNo=<%=3167%>&qotSrhVersionNo=<%=1%>&rowId=<%=(i+1)%>" onclick="callMe(<%=(i+1) %>)">Click Me</a>
    <% aName=null; %>
    </td>
    </tr>
    <%
    %>
    </table>
    When ever I click the hyperlink it basically takes to another jsp page which submits its form values to page1. I need to get the value from page two & assign it to the corresponding textbox. Say, if I clicked on link in the 1st row of the table the value of the textbox in the first row of the table should change. If I click on the link in the second row of the table I need to change the value of the textbox in the second row and so on. My problem is even if I click the nth link in the nth row of the table, its changing the value of textbox in the 1st row. Can someone help me.

    can i see the the complete 2 jsp's

  • Problem: textbox leave empty string("") instead of null

    Hello, I have a problem with textboxes. By default, they always are initialized to null, but when I start entering and removing data from textboxes, many times they leave an empty string "" instead of null.
    And, of course, it's not the same a null value as an empty string and thus, I haven't got the expected result in queries to database.
    Thus, I always have to compare textbox values with "" and null. It's very tedious and not elegant solution. I would like to know if there is another way to get the values as null instead of empty strings.

    Yes. Once you entered and remove the text it will evaluated as you told .
    For ur case u can Try the condition as
    if ( instance !=null && instance.length !=0)
    be sure instance != null check b4 other wise u can get NullPointerException

  • Color in textboxes or around textboxes in tabular form

    I've got a tabular form with 12 columns of textboxes. Some of these columns are logically related so I'd like to sort of group them together a bit (the ones that are related). I was thinking about using a background color in the cells so that for example column 1-3 will have one color visible around the textbox that is displayed in the cell and column 4-5 would have another...
    I've tried setting CSS STYLE under COLUMN FORMATTING to 'background-color:#CC9999;'
    But that only seems to work if the cell contains text and then only the background immediately behind the text is colored, not the background of the entire cell (i think).
    Is it that the textboxes take up the entire cell so that no color is visible?
    If so, I'd appreciate suggestions for simple solutions... color in the textboxes? Some kind of frame around a few columns???
    Thanx
    Andreas

    I'd suggest creating a [custom named column template|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#BABFFGGJ] for the tabular form report, with logically related columns assigned to [column groups|http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#h-11.2.4]. When the containing table is [marked up|http://joeclark.org/book/sashay/serialization/Chapter10.html#h5-2695] in this way CSS can be used to apply colour and some other properties to the column groups/columns. It also keeps the page weight down as classes or styles don't have to be applied to every table cell.
    >
    But that only seems to work if the cell contains text and then only the background immediately behind the text is colored, not the background of the entire cell (i think).
    Is it that the textboxes take up the entire cell so that no color is visible?
    >
    This is a longstanding shortcoming of APEX, in that "Column Formatting" is nothing of the kind: these properties are applied to a &lt;span&gt; wrapped round the content rather than to the containing element (most obvious when that element is a table cell).

  • Object reference not set to an instance of an object. Exception while assigning data to a textbox

     spgetguestTableAdapter adapter = new spgetguestTableAdapter();
         HDeskDataset.spgetguestDataTable gt = new HDeskDataset.spgetguestDataTable();
                adapter.Fill(gt);
    HDeskDataset.spgetguestRow g = gt.FindByHD_GUEST_GUESTCODE(1);
    txtGuestCity.Value = g.HD_GUEST_CITY;  //  Here Is the Exception Occures, But Value Is Not Enpty

    Either the FindByHD_GUEST_GUESTCODE method doesn't return any spgetguestRow object or txtGuestCity has not yet been initialized and assigned to an object.
    If txtGuestCity is a TextBox, you should make sure that you assign its Text property
    after the call to the InitializeComponent() in the constructor of the Form or Window.
    If it is a custom object you must create an instance of the type before
    you assign its Value property:
    TheType txtGuestCity = new TheType();
    txtGuestCity.Value = g.HD_GUEST_CITY;
    If g is NULL you need to make sure that your FindByHD_GUEST_GUESTCODE actually returns an object when you pass the value 1 to it.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Coded UI Text not adding correctly to textbox

    This error results when I try to do record/playback in Coded UI Test to add a # to phone # textbox.
    Can anyone please explain what I should do to resolve?
    Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: Cannot perform 'SetProperty of Text with value "3125551212"' on the control. Additional Details:
    TechnologyName: 'Web'
    ControlType: 'Edit'
    TagName: 'INPUT'
    Id: 'corpForm_txtPhoneCorp_I'
    Name: 'corpForm$txtPhoneCorp'
    ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F006
    Result StackTrace:
    at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.SetValueAsEditBox(String bstrNewValue, Int32 nSetValueAsEditBoxFlag)
    at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.SetValueAsEditBox(String value, Boolean isEncoded, Int32 flag)
    at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.SetValueAsEditBox(String value, Boolean isEncoded)
    at Microsoft.VisualStudio.TestTools.UITesting.TechnologyElementPropertyProvider.SetValueAsEditBox(UITestControl uiControl, String value, Boolean isEncoded, Boolean useCopyPaste)
    at Microsoft.VisualStudio.TestTools.UITesting.HtmlPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
    --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, IPlaybackContext context)
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String actionName, UITestControl uiControl)
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String actionName, Object parameterValue, UITestControl uiControl)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyPrivate(String propertyName, Object value)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass3e.<SetProperty>b__3d()
    at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
    at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetProperty(String propertyName, Object value)
    at Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlEdit.set_Text(String value)

    Hi QAcodedui,
    Based on your issue, you mean that when you record the textbox UI action with input a phone number text value in the textbox control and then you playback this textbox UI action, it failed for coded UI test, am I right?
    If yes, I tried to add a simple textbox control in a windows form app and then I record the textbox UI action using coded UI test builder. I found that I can playback this textbox UI action successfully for coded UI test.
    So if you are handing code for this textbox UI action in coded UI test, I suggest you could try to use the coded UI test builder to record and playback this textbox UI action check this issue again.
    In addition, I suggest you could try to add the DrawHighlight method check whether the textbox control is found correctly.
    If you are able to see cursor is highlight in the txt field it means controls is identified without error. Then I suggest you could try to add the following code for the textbox control.
    For example, you can add the SendKeysAsScanCode method or the SkipSetPropertyVerification method check this issue.
    (1) Playback.PlaybackSettings.SendKeysAsScanCode = true; Keyboard.SendKeysDelay = 10;
    (2) Playback.PlaybackSettings.SkipSetPropertyVerification = true;
    Or you can try to add more searchproperties for this textbox control and then check this issue.
    Refernece:
    http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2011/11/07/troubleshooting-record-and-playback-issues-in-coded-ui-test.aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Textbox and Tables with text

    Hello everybody,
    I have an issue with IDCS5. I'm creating a textbox with a table inside, and It haves Columns and headers cells. I don't wanna make the headers with the Headers and Footpages options, because this textbox (This job could have more of 10 textbox) will be 3 or more cells inside the table. The other issue is... I need this colums move the text itself to another column If they suffering a change, but I don't see an option to make this... The other way to make this is creating and individual textbox side by side and link them, but It is esthetically awful.
    Does anyone know How can I make this?
    Thanks since now!

    I'm going to go ahead and assume that English is not your first language, because I cannot make any sense of what you're saying at all.
    Can you post screen shots?

  • [Forum FAQ] How to remove div characters from multiline textbox field in SharePoint 2013

    Scenario:
    Need to avoid the div tags and get data alone from multiline textbox field using JavaScript Client Object Model in SharePoint 2013.
    Solution:
    We can use a regular expression to achieve it.
    The steps in detail as follows:
    1. Insert a Script Editor Web Part into the page.
    2. This is the complete code, add it into the Script Editor Web Part and save.
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "sp.js");
    function retrieveListItems() {
    // Create an instance of the current context to return context information
    var clientContext = new SP.ClientContext.get_current();
    //Returns the list with the specified title from the collection
    var oList = clientContext.get_web().get_lists().getByTitle('CustomListName');
    //use CAML to query the top 10 items
    var camlQuery = new SP.CamlQuery();
    //Sets value that specifies the XML schema that defines the list view
    camlQuery.set_viewXml('<View><RowLimit>10</RowLimit></View>');
    //Returns a collection of items from the list based on the specified query
    this.collListItem = oList.getItems(camlQuery);
    clientContext.load(this.collListItem, 'Include(Title,MultipleText)');
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded() {
    //Returns an enumerator to iterate through the collection
    var listItemEnumerator = this.collListItem.getEnumerator();
    //Remove div tag use a regular expression
    var reg1 = new RegExp("<div class=\"ExternalClass[0-9A-F]+\">[^<]*", "");
    var reg2 = new RegExp("</div>$", "");
    //Advances the enumerator to the next element of the collection
    while (listItemEnumerator.moveNext()) {
    //Gets the current element in the collection
    var oListItem = listItemEnumerator.get_current();
    alert(oListItem.get_item('MultipleText').replace(reg1, "").replace(reg2, ""));
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    Result:<o:p></o:p>
    References:
    http://www.w3schools.com/jsref/jsref_obj_regexp.asp
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Nice article :)
    If this helped you resolve your issue, please mark it Answered

  • Displaying values from JSP in textbox

    I want to fetching values from database table using JSP and display the values in a textbox in a textbox. I found if the value is a single word, it can display correctly. but if the values are multiply words, there are just the first word appeared in the textbox. for example, I want to fetche address: 5 East 98th Street, just 5 appeared in textbox. The code is as follows:
    key = request.getParameter("key");
    person = homePerson.findByPrimaryKey(key);
    <input type="text" name="Address" value= <%= person.getAddress() %>>
    Can someone suggest on this problem. Thanks in advance.
    Qiang

    <input type="text" name="Address" value= <%=
    person.getAddress() %>>do this
    value="<%=person.getAddress()%>"
    dont forget the code... as in html spaces are ignored in values if they are not in codes.

  • Getting values from the dynamically created textboxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with 2 textboxes in each row. and
    after entering data into those rows , user clicks on save button
    and page is submitted. I want to capture all this data of dynamically
    added rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    U can do something like......
    class MatrixData{
    public myMethod(){
    Arraylist list_of_rows=new Arraylist ();
    JTextBox 11=new JTextBox (); // matrix position (1,1)
    JTextBox 12=new JTextBox ();// matrix position (1,2)
    addRow(new RowData(11,12)
    public addRow(RowData data){
    list_of_rows.add(data);
    class RowData{
    Arraylist txtBoxList=new Arraylist ();
    public JTextBox getOne(){
    return txtBoxList.get(0);
    public JTextBox getTwo(){
    return txtBoxList.get(1);
    public setOne(JTextBox comp){
    txtBoxList.add(comp);
    public setTwo(JTextBox comp){
    txtBoxList.add(comp);
    Hope it helps.
    Best Regards
    Mohit

Maybe you are looking for