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.
Working with a complex document in flow layout, the components keep automatically rearranging themselves. Even if I reorder them in the outline, when I hit refresh, the components will randomly reorder. Also with the attached page, after trying to get the arrangement to stick multiple times, I get the following exception and the entire "fixed_footer1" section does not display properly: java.lang.NullPointerException at com.sun.webui.jsf.component.PanelLayoutDesignInfo.acceptParent(PanelLayoutDesignInfo.java:67) at com.sun.rave.insync.live.LiveUnit.canCreateChild(LiveUnit.java:516) at com.sun.rave.insync.live.LiveUnit.canCreateBean(LiveUnit.java:489) at com.sun.rave.insync.live.DesignBeanNode.createPasteTypes(DesignBeanNode.java:519) at org.openide.nodes.AbstractNode.getPasteTypes(AbstractNode.java:501) at org.openide.explorer.ExplorerActionsImpl.updatePasteTypes(ExplorerActionsImpl.java:324) at org.openide.explorer.ExplorerActionsImpl.updatePasteAction(ExplorerActionsImpl.java:314) at org.openide.explorer.ExplorerActionsImpl.updateActions(ExplorerActionsImpl.java:258) at org.openide.explorer.ExplorerActionsImpl.access$400(ExplorerActionsImpl.java:65) at org.openide.explorer.ExplorerActionsImpl$ActionStateUpdater.actionPerformed(ExplorerActionsImpl.java:667) at javax.swing.Timer.fireActionPerformed(Timer.java:271) [catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Created attachment 38129 [details] LoginPage.jsp
Created attachment 38131 [details] LoginPage.java
FWIW, I shutdown the IDE, removed the cache, restarted, opened project and the display was correct in the designer.
Assigning for Peter for evaluation. This seems to be duplicate of 94879. Can you confirm ? thanks
The designer displays only what is produced by the model+renderers machinery. The rearanging is not in the hands of designer or outline but in the the nodes impl themselves, representing the beans/components. Sandip was working on the reaarranging the children nodes, passing this to him first. The exception however refers to a problem in the components (design time), needs to get there too.
Seems like and NPE in designinfo.
It looks like DesignInfo.acceptParent() threw an NPE because DesignBean.getInstance() returned null. This method should _never_ return null. Has anyone successfully reproduced the NPE?
Created attachment 38958 [details] plugin portal project
*** Issue 96496 has been marked as a duplicate of this issue. ***
*** Issue 94879 has been marked as a duplicate of this issue. ***
While trying to reproduce the problem I am seeing these exceptions: 1. When calling refresh after reordering. INFORMATIONAL *********** Exception occurred ************ at 9:32 AM on Mar 5, 2007 java.lang.IllegalStateException: Unexpected floating value, cssFloating=com.sun.rave.designer.cssengine.CssValueImpl@1c6b306[value=none] at com.sun.rave.css2.LineBoxGroup.positionFloatBox(LineBoxGroup.java:616) at com.sun.rave.css2.LineBoxGroup.finishFloats(LineBoxGroup.java:570) at com.sun.rave.css2.LineBoxGroup.finishLine(LineBoxGroup.java:448) at com.sun.rave.css2.LineBoxGroup.relayout(LineBoxGroup.java:236) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.ContainerBox.layoutChild(ContainerBox.java:1188) at com.sun.rave.css2.ContainerBox.relayout(ContainerBox.java:1137) at com.sun.rave.css2.DocumentBox.layoutContext(DocumentBox.java:336) at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:252) at com.sun.rave.css2.PageBox.layout(PageBox.java:511) at com.sun.rave.css2.PageBox.relayout(PageBox.java:576) at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:378) at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:589) at com.sun.rave.designer.DesignerTopComp.componentShowing (DesignerTopComp.java:960) at com.sun.rave.designer.WebForm.componentShowing(WebForm.java:1762) at com.sun.rave.designer.jsf.ui.JsfMultiViewElement.componentShowing (JsfMultiViewElement.java:62) at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement (MultiViewPeer.java:265) at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement (MultiViewPeer.java:235) at org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged (MultiViewPeer.java:626) at org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged (MultiViewModel.java:230) at org.netbeans.core.multiview.MultiViewModel.setActiveDescription (MultiViewModel.java:99) at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected (MultiViewModel.java:280) at javax.swing.JToggleButton$ToggleButtonModel.setSelected (JToggleButton.java:215) at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:139) at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected (MultiViewModel.java:276) at org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed (TabsComponent.java:420) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.Component.processMouseEvent(Component.java:5485) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) 2. When clicking on the hyperlinks in the footer: java.lang.AssertionError: Invalid box index: 9, size is 1; this list is {LineBox:com.sun.rave.designer.markup.RaveRenderedElementImpl@172f7c3[div], id=form1:center_container:page_border:fixed_footer1:footer_text1:footer_navig1, rendered=true} at com.sun.rave.css2.BoxList.get(BoxList.java:91) at com.sun.rave.css2.ContainerBox.getBox(ContainerBox.java:189) at com.sun.rave.css2.CssBox.getPrevNormalBlockBox(CssBox.java:2738) at com.sun.rave.css2.ModelViewMapper.findPrevLineBox (ModelViewMapper.java:960) at com.sun.rave.css2.ModelViewMapper.findClosestPosition (ModelViewMapper.java:1849) [catch] at com.sun.rave.css2.ModelViewMapper.viewToModel (ModelViewMapper.java:1788) at com.sun.rave.designer.DesignerPaneUI.viewToModel (DesignerPaneUI.java:1087) at com.sun.rave.text.DesignerCaret.positionCaret (DesignerCaret.java:219) at com.sun.rave.text.DesignerCaret.adjustCaret(DesignerCaret.java:410) at com.sun.rave.text.DesignerCaret.adjustCaretAndFocus (DesignerCaret.java:399) at com.sun.rave.text.DesignerCaret.mousePressed(DesignerCaret.java:393) at com.sun.rave.designer.InteractionManager$MouseHandler.mousePressed (InteractionManager.java:1600) at java.awt.Component.processMouseEvent(Component.java:5485) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3889) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
The Flow layout is not implemented well. It has big architectural issues, and at this moment it is not easily fixable, at least not quickly. I've put there changes to supress throwing user exceptions, just to log them. So they are preserved, but user is not annoyed with no help.
This is a fix for the problem related to the moving of components in the Outline window. The problem occured because because the index in the design bean children array was also used to move the Nodes in the JSP source DOM. However the Nodes in the JSP DOM do not correspond 1 to 1 with the DesignBeans. That is because the white space between tags becomes Text nodes. The comment and passthrough become other Nodes. To get around the problem the next sibling bean's element is used instead to insert this bean's elemnt. If this is the last DesignBean then the corresponding element is inserted at the end.
Created attachment 39280 [details] Another project
Verified NB 030506 with VWP 0313_1 that re-ordering components within panels from outline has been fixed. A side issue regarding re-parenting components to panels from outline has been opened. http://www.netbeans.org/issues/show_bug.cgi?id=98333