Friday, March 21, 2008
21 March
A day of using 6.1, mostly editing HTML files. No crashes, no problems. Doesn't seem much different than 6.0.
Thursday, March 20, 2008
integrating generated with existing HTML a.k.a. glomming
I copy the html from the 'show source' screen into a new HTML file in the Netbeans editor, so I can match up the span and /span and other tags. I like the way netbeans highlights matching tags in yellow.
I try various ways of dropping the generated HTML into the existing file. Widgets end up on top of each other. I fiddle with the pixel numbers a bit. Finally decide to give up on the span style absolute positioning, and just put everything in a table. I start to sketch out what goes where in my notebook, then realize it's easier to do that visually back in the Visual Editor. I add the buttons that were missing from the original prototype, get everything where it should go, then drag a table below it all onto the grid, hoping to set rows, columns, and drag everything into it.
The Visual Editor's Table Layout is kind of odd. I don't see an easy way to input number of rows, number of columns.
I look through the menus and finally see a Table Column widget next to the Table widget. By dragging the column widget into the table, I give it more columns. But it's hard to see how to make them all the same width, now that I've scrunched some over to make room for more.
And when I try to drag buttons into cells, they don't snap in. They just sit on top.
I go back to my text HTML file. One can drag stuff from the palette into the text, too. Here, dragging in a table works in a more convenient way. I drag it in, and immediately get a window asking me how many rows and columns & other stuff. Good.
I try various ways of dropping the generated HTML into the existing file. Widgets end up on top of each other. I fiddle with the pixel numbers a bit. Finally decide to give up on the span style absolute positioning, and just put everything in a table. I start to sketch out what goes where in my notebook, then realize it's easier to do that visually back in the Visual Editor. I add the buttons that were missing from the original prototype, get everything where it should go, then drag a table below it all onto the grid, hoping to set rows, columns, and drag everything into it.
The Visual Editor's Table Layout is kind of odd. I don't see an easy way to input number of rows, number of columns.
I look through the menus and finally see a Table Column widget next to the Table widget. By dragging the column widget into the table, I give it more columns. But it's hard to see how to make them all the same width, now that I've scrunched some over to make room for more.
And when I try to drag buttons into cells, they don't snap in. They just sit on top.
I go back to my text HTML file. One can drag stuff from the palette into the text, too. Here, dragging in a table works in a more convenient way. I drag it in, and immediately get a window asking me how many rows and columns & other stuff. Good.
trick to get the html
...went around and around on the FAQ's on the netbeans site, then it occurred to me:
If I use the browser preview button to see the stuff in a web page, then 'view source', will I see the HTML?
Answer: Yeah, pretty much.
Now I can copy & paste it into a new HTML file...
If I use the browser preview button to see the stuff in a web page, then 'view source', will I see the HTML?
Answer: Yeah, pretty much.
Now I can copy & paste it into a new HTML file...
visual HTML editing
I dragged in a label, and a text box that appears to be a pulldown. I've got a button that I'd like to be square, and the size of the pulldown's height, but it needs to be sized to the grid, even though the height of the pulldown is 1-1/3 grid measures.
I'd like to make the grid smaller, for finer-grained size change choices. How do I change the grid?
Can I change the grid?
Copying a button only copies the label on a button. Not surprised, since when the guy in the film demo wanted 3 text fields, he selected them 3 times from the palette. It would be nice to be able to copy an object already sized and labeled in the IDE and then modify it.
I don't see how to add items to a dropdown list. I thought I was able to do it before with a listbox by clicking on items? but when I drag in a new listbox I can't do it with that either. I'll have to hard-code them in later.
I hope this is producing HTML I can edit.
I click "Preview in Browser". Nothing happens. IDE freezes. Then I get three tabs in my firefox browser with the preview. OK, so it just takes it a while. Fine.
There are two choices for page layout: Grid or Flow. I change from Grid to Flow to see if that makes resizing any easier. The grid disappears.
I try moving a listbox to be more aligned with a row of buttons. The listbox hops into the top left corner and won't be dragged out. Even though it's on top of two labels over there. I have a choice of all the way to the top-left, or most of the way in the top-left. It just won't be dragged any further out.
I switch back to Grid Layout and drag out the list box. There is simply no way to get its bottom edge to line up with the bottom edge of my row of buttons. Wait: the right click menu-choice: Align..bottom. It's not a choice when the object is highlighted. It is a choice when I'm just clicking on the page. I select it, try to move the list box. Its bottom still won't align with the grid line. Oh well. Another thing to do while editing the code later. At least this will create the objects for me & be a prototype.
All right, now I have the objects laid out. Where's the HTML page?
I click on Files, find Page1.jsp. Don't tell me this is all JSP.
Oh yes.
Well, I can't say I'm that surprised. I did have to download all the Java Server Faces whatever to get the visual editor to work.
I show this to my boss.
He asks: Can this help in our development?
I reply: If I were doing this from scratch and wanted to do everything their way, with JSF, JSP, their methods, then sure. But we have existing code and HTML and servlets that we want to use, and we need to put our HTML into as small as possible files to handle the low-bandwidth users, so no.
He says: Go on the Forum and see if there's a way to turn this into HTML. Maybe someone has asked this already.
Thither I go.
I'd like to make the grid smaller, for finer-grained size change choices. How do I change the grid?
Can I change the grid?
Copying a button only copies the label on a button. Not surprised, since when the guy in the film demo wanted 3 text fields, he selected them 3 times from the palette. It would be nice to be able to copy an object already sized and labeled in the IDE and then modify it.
I don't see how to add items to a dropdown list. I thought I was able to do it before with a listbox by clicking on items? but when I drag in a new listbox I can't do it with that either. I'll have to hard-code them in later.
I hope this is producing HTML I can edit.
I click "Preview in Browser". Nothing happens. IDE freezes. Then I get three tabs in my firefox browser with the preview. OK, so it just takes it a while. Fine.
There are two choices for page layout: Grid or Flow. I change from Grid to Flow to see if that makes resizing any easier. The grid disappears.
I try moving a listbox to be more aligned with a row of buttons. The listbox hops into the top left corner and won't be dragged out. Even though it's on top of two labels over there. I have a choice of all the way to the top-left, or most of the way in the top-left. It just won't be dragged any further out.
I switch back to Grid Layout and drag out the list box. There is simply no way to get its bottom edge to line up with the bottom edge of my row of buttons. Wait: the right click menu-choice: Align..bottom. It's not a choice when the object is highlighted. It is a choice when I'm just clicking on the page. I select it, try to move the list box. Its bottom still won't align with the grid line. Oh well. Another thing to do while editing the code later. At least this will create the objects for me & be a prototype.
All right, now I have the objects laid out. Where's the HTML page?
I click on Files, find Page1.jsp. Don't tell me this is all JSP.
Oh yes.
...
webuijsf:dropDown id="viewDropDown" items=\"#{Page1.viewDropDownDefaultOptions.options}\" label=\"View\" labelOnTop=\"true\" required=\"true\" style=\"left: 48px; top: 72px; position: absolute\" valueChangeListenerExpression=\"#{Page1.viewDropDown_processValueChange}\"/\>
\
Well, I can't say I'm that surprised. I did have to download all the Java Server Faces whatever to get the visual editor to work.
I show this to my boss.
He asks: Can this help in our development?
I reply: If I were doing this from scratch and wanted to do everything their way, with JSF, JSP, their methods, then sure. But we have existing code and HTML and servlets that we want to use, and we need to put our HTML into as small as possible files to handle the low-bandwidth users, so no.
He says: Go on the Forum and see if there's a way to turn this into HTML. Maybe someone has asked this already.
Thither I go.
"missing plugin" p.s.
From 6.1 Release Notes:
Description: The Visual Web JSF Backwards Compatibility kit provides supplemental libraries that are required by the Visual Web designer to support projects that are based on J2SE 1.4 or J2EE 1.4. These libraries are not open source and are therefore distributed as a separate NetBeans plugin. The kit will install the following libraries that are required for J2EE 1.4 projects:
- JavaServer Faces 1.1 Reference Implementation (RI)
- Rowset Reference Implementation (RI)
- JAX-RPC libraries from JWSDP 1.6
To get the Backwards Compatibilty Kit, in the main menu, choose Tools > Plugins.
--except I couldn't from 6.1. The tab was disabled. Is that the "known issue"?
It works in 6.1
In 6.1, I select Tomcat 6.0.16 and Java EE 5 and whoo-hoo! I get the grid.
I try it in 6.0 and no dice. Maybe I need to restart it?
Restart. Try once again...and...nope.
Well, OK. I can use it in 6.1. If 6.1 crashes or behaves in otherwise flaky beta ways, I know I can probably download the slightly later 6.0.1 that MJ downloaded a few days ago and use that. For now, let's continue in 6.1.
I try it in 6.0 and no dice. Maybe I need to restart it?
Restart. Try once again...and...nope.
Well, OK. I can use it in 6.1. If 6.1 crashes or behaves in otherwise flaky beta ways, I know I can probably download the slightly later 6.0.1 that MJ downloaded a few days ago and use that. For now, let's continue in 6.1.
6.0 web jsf project
I get a Navigator window with Page1, & 3 beans.
I double click on Page1 and get HTML text.
There's a button that says "Design". I click on it, and get the Navigator window again.
I ask MJ. He has me repeat this all. He looks surprised when I don't get the grid window.
What's different:
He has Netbeans 6.0.1. I've tried 6.1 and 6.0, not 6.0.1.
He clicked on Tomcat 6.0.16 and Java EE5.
I'll try that now.
I double click on Page1 and get HTML text.
There's a button that says "Design". I click on it, and get the Navigator window again.
I ask MJ. He has me repeat this all. He looks surprised when I don't get the grid window.
What's different:
He has Netbeans 6.0.1. I've tried 6.1 and 6.0, not 6.0.1.
He clicked on Tomcat 6.0.16 and Java EE5.
I'll try that now.
Subscribe to:
Posts (Atom)