Focal Point
[CLOSED] CSS ID styles vs Class styles in WebFocus

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6087055495

November 30, 2010, 03:06 PM
Joy_Jacques
[CLOSED] CSS ID styles vs Class styles in WebFocus
Hi all,

I'm new to WebFocus and trying to work on styling a report. As I look through the documentation I see a fair amount of information about using class styles, but not much at all on id styles.

When I apply an id style (removing the inline styles and putting them into a CSS rule) it applies in a somewhat hit and miss fashion, and for some elements (like tabs and tab-body) it generates an error with the referenced ibigbl.js WF javascript file.

Can someone tell me if using ID styles works in WebFocus, or should I just use class styles? Or could you point me to a good resource on using CSS within WebFocus. I did find some docs but I'm wondering if there is anything like a best practices?

Thanks for any help.

This message has been edited. Last edited by: Kerry,


7.7.2, Windows, html
November 30, 2010, 05:02 PM
Dan Pinault
On the same lines I'm curious to know if anyone out there develops their HTML Launch Pages in something other than the HTML Composer. It seems to me like the Composer just likes to rewrite certain bits of code when you open a file whether you save it or not! Styling in the tool is limited and, other than how to insert a CSS file, I can't find any documentation on how to use external CSS.

How do you deal with this at your shop?

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
November 30, 2010, 10:04 PM
Francis Mariani
I have not yet used HTML Composer, though I see it as an interesting tool to generate the WebFOCUS-specific code. I would use a text editor for the rest.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 01, 2010, 06:03 AM
Wep5622
Regarding those id's; are you sure they are unique in the document? If they are, supplying a simplified test case (between BB-style CODE-tags) should give people an idea of what problem you're trying to solve.

quote:
Originally posted by Dan Pinault:
Styling in the tool is limited and, other than how to insert a CSS file, I can't find any documentation on how to use external CSS.


As I understand it, when inserting a CSS file, you're not limited to the files the file-open dialogue can see, but you can specify URL's too (by means of IBFS://? Haven't tried yet).

Worse, if the file you point at isn't in the local directory (in another directory in your path, for example), Dev Studio creates a copy in the local directory - apparently because it has no means to determine the URL it would have had on the server.

When including stylesheets, we usually just add the link-tags we need by hand. It seems much easier that way. We keep a "template" around so that we can simply copy-paste the right tags into our launch pages.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 03, 2010, 10:58 AM
Brian Suter
The HTML composer in 7702 has a templates feature that allow a plethora of styling classes for the HTML request page.

I do not recommend editing the composer created HTML. Doing so leaves you on your own. The HTML composer has required tags and the run time has required JS calls. We have had cases where someone greatly overhauled the HTML in a text editor (like removed tags) and were surprised when the tool could not reopen it! You do not edit DOC or PDF files with a text editor.


Brian Suter
VP WebFOCUS Product Development
December 06, 2010, 03:39 AM
Wep5622
True, but in 7.6 (which we use, as does the OP) there's often no way around it.
You can get surprising results indeed, for example if you convert a generated span that behaves like a block element to an appropriate div, only to find that your form stops working.

In general, I've found that the HTML composer is useful to generate the initial form, but it tends to generate a lot of unneccesary style attributes that can even get in your way (if it uses the wrong font, for example). Including css or javascript files from another project or server is another example where it falls short.

Cleaning up the generated HTML some can be useful, but if you put a lot of effort into that you'll find all your meticulous cleaning undone as soon as someone edits the file again in the composer, or that they can't open it.

My advice; if the sole reason to clean up what it generated is because your fingers itch to, don't do it. Just save it, look the other way and forget what you saw Wink


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 07, 2010, 09:52 AM
Dan Pinault
I can understand both sides of the argument - work only in the text editor vs work only in the gui.
Given my limited knowledge of coding by hand I prefer to use the gui and get as much out of it as I can. You have to admit though that the ability to style pages is cumbersome in the HTML Composer. There seems to be no documentation on how to externally style a page so I'm wondering if others have developed techniques like designing the page in some other tool like Dreamweaver or Expression and then bringing that into the HTML Composer to bind everything to variables and requests.

We are just beginning to experiment with 7702 so we'll take a closer look at the appl.css method and, if we come to an 'Aha!' moment we'll post something.

Anybody willing to share some examples of their styling accomplishements?

Thanks!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.