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 111414 - IllegalStateException editing component id in jsp
Summary: IllegalStateException editing component id in jsp
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: _ sandipchitale
Depends on:
Reported: 2007-07-31 00:10 UTC by _ krystyna
Modified: 2007-10-28 02:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2007-07-31 00:10:17 UTC
NB build 7270000

1. clean userdir, create ee5 project
2. drop 2 textfields. Switch to .jsp file and edit id for textField2 -> textXXX
3. switch back to designer
4. swtich back to jsp to reinstate id of textField2
>each time backspace is pressed to erase "XXX", get IllegalArgumentException and you have to press Close on
the dialog; and then each character addition will throw IAE with slightly different stack.

In 5.5.1, after step 3, switching back to .jsp, textField2 would be resinstated by insync.

java.lang.IllegalStateException: Illegal source modification with dirty model C:\Documents and Settings\Krystyna 
Polomski\My Documents\NetBeansProjects\WebApplication153\web\Page1.jsp
        at org.netbeans.modules.visualweb.insync.SourceUnit.setSourceDirty(
        at org.netbeans.modules.visualweb.insync.SourceUnit.removeUpdate(
        at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate
        at javax.swing.text.AbstractDocument.fireRemoveUpdate(
        at org.netbeans.editor.BaseDocument.fireRemoveUpdate(
        at org.netbeans.editor.BaseDocument.remove(
        at org.netbeans.editor.BaseKit$DeleteCharAction.actionPerformed(
        at org.netbeans.modules.web.core.syntax.JSPKit$JspDeleteCharAction.actionPerformed(
        at org.netbeans.editor.BaseAction.actionPerformed(
        at javax.swing.SwingUtilities.notifyAction(
        at javax.swing.JComponent.processKeyBinding(
        at javax.swing.JComponent.processKeyBindings(
        at javax.swing.JComponent.processKeyEvent(
        at java.awt.Component.processEvent(
        at java.awt.Container.processEvent(
        at java.awt.Component.dispatchEventImpl(
        at java.awt.Container.dispatchEventImpl(
        at java.awt.Component.dispatchEvent(
        at java.awt.KeyboardFocusManager.redispatchEvent(
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(
        at java.awt.Component.dispatchEventImpl(
        at java.awt.Container.dispatchEventImpl(
        at java.awt.Window.dispatchEventImpl(
        at java.awt.Component.dispatchEvent(
        at java.awt.EventQueue.dispatchEvent(
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
        at java.awt.EventDispatchThread.pumpEvents(
        at java.awt.EventDispatchThread.pumpEvents(
Comment 1 _ sandipchitale 2007-08-03 06:41:25 UTC
Insync expects that the id of the component tag matched the property name.

In fact in the method:

void org.netbeans.modules.visualweb.insync.faces.FacesBean.setBindingProperties()

this is enforced. So when the id is changed in JSP but is not in Java, the id is forced to be the name of the property 
in backing bean. This cause a DOM modification event on JSP. This makes the model dirty. Then when the user switches 
to JSP source again and tries to correct the id the reported IAE happens.

The workaround is to rename the id in the PropertySheet after selecting the component in the Designer. Reducing to P3 
as there is a workaround.
Comment 2 _ sandipchitale 2007-10-28 02:56:07 UTC
As such the changing of id in JSP is not supported. See: 117711 also.

So I am going to reduce the priority on this one. We can talk about it if you like.