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 119376 - Deleting Fragment does not remove from JSP
Summary: Deleting Fragment does not remove from JSP
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ deva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-18 17:05 UTC by Lark Fitzgerald
Modified: 2007-10-31 18:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2007-10-18 17:05:16 UTC
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710172300)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Deleting Fragment does not remove from JSP

Steps:
1. Create page fragment on Page1 using DnD
2. delete page fragment from Page1
3. Switch to JSP view

div tag still exists.
Comment 1 Winston Prakash 2007-10-18 17:54:50 UTC
When you add a Page Fragment the code added is

<div>
@Page Fragment Include
</div>

When the page fragment is deleted, if the JSP include is not deleted
then then it is a bug.

If the <div> is not deleted, then it is not a bug. It is by design.

Assume after dropping the page fragment user has added additional code
Ex.

<div>
@Page Fragment Include

<!-- Additional Components added after page fragment-->
<H2> Some added text </H2>
</div>

If we are removing the <div> when the Page Fragment is removed,
then we are deleting the user code and it is a code loss for the
user perspective and that is a P1 bug. 

In my opinion if only the <div> is not removed after removing the page fragment then it is not a bug.
If it was removed earlier then it is not a regression, but the implementation
of correct behavior :)
Comment 2 Winston Prakash 2007-10-18 17:59:11 UTC
I just talked to Sandip, looks like when any HTML bean is
deleted (say from outline or designer) then it is not deleted in the JSP.
That is a P1 bug though. 
Comment 3 _ sandipchitale 2007-10-18 18:06:25 UTC
It turns out the HTML beans are not getting removed.
Comment 4 Lark Fitzgerald 2007-10-18 18:08:35 UTC
When you delete the fragment, the jsp shows:
                        <div style="position: absolute; left: 72px; top: 72px">
                            <jsp:directive.include file="Fragment1.jspf"/>
                        </div>
Comment 5 _ deva 2007-10-18 18:48:27 UTC
The fix for #116587 was not complete. I could not verify that bug fix completely because of blocking issue #118646

Checking in BeansUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/BeansUnit.java,v  <--  BeansUnit.java
new revision: 1.18; previous revision: 1.17
done
IDE: [10/18/07 10:46 AM] Committing "BeansUnit.java" finished

Fixed in trunk, will ask for approval for beta2
Comment 6 _ krystyna 2007-10-18 23:20:11 UTC
Pre-integration jar test of Deva's fix (with Beta2) looks good.
Comment 7 _ deva 2007-10-19 05:35:32 UTC
Integrated changes into 6.0beta2 branch
Comment 8 Lark Fitzgerald 2007-10-31 18:23:08 UTC
Verified fixed using:
Product Version: NetBeans IDE Dev (Build 20071031110342)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Glassfish: 58g
Woodstock 4.1: Build 15 RC1