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.
Original status: 5-Cause Known; Suggested Status: NEW Original Target Release: mako_dev; Suggested Target Milestone : Dev These items should be added to the Status Whiteboard: WAV_APPROVED Original submitter: wjprakash Description: > On Aug 25, 2005, at 6:26 PM, Winston Prakash wrote: > >> Hi Tor, >> >> When I worked with page fragment I see the following problems >> >> - In the Page fragment designer there is a white area which doesn't seem to have a purpose (see picture 2) >> - When I add components in the Page fragment and it is outside the bounding box of the >> main page then the bounding box does not resize itself (picture 1) > > >> - I'm able to add components to the page fragment from the main page. But it is not >> reflected in the Page fragment page.(See tab component is missing picture 2) >> >> I'll file a bug on these issues. > > > > Please don't - this is working the way it's supposed to. The page fragment has a width and a height property (click on the fragment and look in the property sheet). This controls the size of the fragment. Outside the white area components are grayed out to indicate that they don't fit inside the size assigned to the fragment. Ah! that is what the white rectangle is for, showing the current size in the PF designer. Can this be resizable which in turn can update the fragment size? > > The reason this is necessary is that in CSS, absolute positioned children do not contribute to the size of its parent. That's why in Page 1 even if you add a button that goes outside the fragment, the box doesn't enlarge to accomodate it. > Yes, in the designer I could fake it and simply show a bounding box boundary. But that would be lying - and would break down fatally if you include the fragment inside a container. For example, our solution of putting adjacent datatables in group panels such that if the first table is larger the second would move down. With a page fragment the actual size of the fragment is (0,0) if we don't assign a size to it. That's what the page fragment sizes are all about. OK. Got it. Since I was able to resize the page fragment in page 1 designer and it did not update the size of page fragment (white box) in its designer (which it should not, as PF is added to different pages), is what confused me. BTW you did not comment about I was able to add components to the page fragment in Page1. But it was not reflected in the Page fragment designer. Adding components to the PF in Page1 should be allowed? > No - you cannot edit a page fragment from a page - it's a "black box". Are you sure the component was really added to the fragment? I'm pretty sure it must have been added to the page itself (but in a position overlapping the fragment). Look in the status bar when you're dragging - it should tell you where it will put it (it's new parent). - Tor Yes. I'm pretty sure. The bounding box becomes blue indicating it accepts drop. Then I added the tab it was inside. When I drag the PF it moves along with it. In the out line it shows ... ah! it is added to the <div> of the directive.include (parallel to it) <div style="left: 288px; top: 144px; position: absolute"> <jsp:directive.include file="Fragment1.jspf"/> <ui:tabSet binding="#{Page1.tabSet2}" id="tabSet2" selected="tab2"> <ui:tab binding="#{Page1.tab2}" id="tab2" text="Tab 2"/> </ui:tabSet> </div> - Winston Probably we could make this "<div> for jsp:directive include" a real JSF component with its own deigntime, renderer etc (just renders the <div> with jsp:directive. Then we may be able to specify in acceptChild() none. Something like a tag <f:pageFragment file="Fragment1.jspf" style="left: 288px; top: 144px; position: absolute"/> Which would render <div style="left: 288px; top: 144px; position: absolute"> <jsp:directive.include file="Fragment1.jspf"/> </div> - Winston That would be good. Something for the components team to ponder. One advantage of this is that it would let you put page fragments inside grid panels and other components which refuse html children. Another is that you could use it in tabs etc (since it could obey the rendered property). -- Tor Evaluation: This I have filed as reminder for Mako. It is too late for Thresher. As I put in the report converting Page Fragment to a component has many advantages. I would like this to be fixed for NB 6.0 if possible. -Jayashri
Obsolete milestone, please reevaluate