This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 95022

Summary: Broken resizing of textfield and other components
Product: obsolete Reporter: Peter Zavadsky <pzavadsky>
Component: visualwebAssignee: Dongmei Cao <dongmeic>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Peter Zavadsky 2007-02-08 23:16:50 UTC
There was made a change (yesterday?) which renders the textfield component from:

<input class="TxtFld_sun4" id="form1:textField1" name="form1:textField1"
size="20" style="left: 96px; top: 168px; position: absolute; width: 360px"
type="text" value=""/>

to:

<span id="form1:textField1" style="left: 288px; top: 192px; position: absolute">
    <input class="TxtFld_sun4" id="form1:textField1_field"
name="form1:textField1_field" size="20" type="text" value=""/>
</span>


which breaks the resizing, adding the encapsulating span causes the issue.
Comment 1 Jayashri Visvanathan 2007-03-05 23:48:02 UTC
Dongmei, 
 do you know if this change came from woodstock ?
Thanks
Comment 2 Dongmei Cao 2007-03-06 00:31:31 UTC
I just checked the checkin history on the woodstock component. The change was
make in build #4 before opensource. A <span> is always rendered in the
FieldRenderer. Used to be only rendered if there is a label for the component
Comment 3 Dongmei Cao 2007-03-06 00:58:19 UTC
I think this is a component issue. Since there is a <span> around the TextField
(same problem in TextArea), the width and height on the span do not affect the
size of the text field. The size of the text field is controlled by size
(columns) attribute and the size of the text area is controlled by the
columns/rows. The designer does change the span width and height when you resize
the component.
Comment 4 Dongmei Cao 2007-03-07 00:45:25 UTC
The DropDown, ListBox, PasswordField also have the same problem.
Comment 5 Dongmei Cao 2007-04-11 21:36:23 UTC
If you decide, the component should not be allowed to be resized in the
designer, then it is easy to do.

If you specify (in the DesignInfo),

RESIZE_CONSTRAINTS = NONE

then designer will not provide any resize handle 
Comment 6 Dongmei Cao 2007-04-12 05:29:07 UTC
Removed the resize handlers at designtime for TextField, TextArea,
PasswordField, DropDown and ListBox since 
- For DropDown and ListBox, it does not make sense to resize them anyway.
Without the width set, the browsers will automatically adjust the width to the
longest item. With the width set, the long items can actually get cut off.
- For TextField, TextArea and PasswordField, it makes more sense to change the
"columns"/"rows"(for textarea) attributes to control the width of the components.
- Resizing the height of TextField, TextArea and PasswordField does not make
sense anyway.

Modified:
   woodstock/webui/src/designtime/com/sun/webui/jsf/component/DropDownBeanInfo.java
   woodstock/webui/src/designtime/com/sun/webui/jsf/component/ListboxBeanInfo.java
  
woodstock/webui/src/designtime/com/sun/webui/jsf/component/PasswordFieldBeanInfo.java
   woodstock/webui/src/designtime/com/sun/webui/jsf/component/TextAreaBeanInfo.java
   woodstock/webui/src/designtime/com/sun/webui/jsf/component/TextFieldBeanInfo.java

Comment 7 Dongmei Cao 2007-04-12 05:33:40 UTC
We need to document this new behavior in release notes. Otherwise, it'll confuse
the old users. 

We also need to specifically mention this for projects imported from Creator and
5.5/5.5.1. If the user has resized the above components in the old projects,
then after import the projects into NB6, they might notice the width is not the
same as before. Advise the user to use the columns/rows attributes in the new
project, instead.
Comment 8 Joseph Silber 2007-05-02 15:28:19 UTC
Release note added
Comment 9 Lark Fitzgerald 2007-06-15 16:53:02 UTC
*** Issue 106840 has been marked as a duplicate of this issue. ***
Comment 10 Lark Fitzgerald 2007-06-21 20:00:27 UTC
Verified.  This is a functional change.  Release note was added.
Comment 11 James Branam 2007-09-17 16:17:27 UTC
Documentation has been added.
Comment 12 Kenji Tachibana 2007-11-22 02:31:51 UTC
Do you have any plan to fix this issue in future release? 
Japanese community member also encountered this and thinks
to be fixed in future. 
Comment 13 Dongmei Cao 2007-11-25 20:44:44 UTC
No. This will not be fixed. 
Comment 14 Dongmei Cao 2008-02-04 18:44:35 UTC
Just some clarification. The components can be resized by changing the columns/rows.
But they can not be resized by width/height (the old way). It is just a
different way of resizing them. This way should
make more senses because if you resize them using width/height, the last
character/column might only show partially.
Comment 15 _ krystyna 2008-02-04 22:52:10 UTC
Also see desc8 in issue #124393 for CSS workaround to
add width for listbox, dropdown.