Wednesday 27 June 2007

Web Views Using AJAX part 7 (The Header)

Right a spot more work done.. the header is now returned and displayed by the agent and corresponding JS. The font details are returned by the agent but the general look of the header section is defined by a skin CSS file. Click on the image above to see it bigger...When you change the view in the designer the columns and font characteristics change when the web view is refreshed.
One small blip that took me a minute to work out was how to convert Point Size and Number of characters into Pixel width for the columns because notesview's column objects hold the width as number of characters. Happily a misspent youth writing PS routines was not in vain.A good approximation for proportional fonts is (PontSize*1.3333333)*Num of Characters this is not an exact pixel width but comes pretty close.

All a page needs now are :-
01. the 4 JS files in the JS HEADER
02. An IDed target HTML element to put the view in
03. A call to the load JS function. (in the example file) it is on the page load event
04. A CSS file to hold the skin info. This is dynamically added in the JS rather than embedded in the form/page

The call in 03 above is as follows

If "*" is passed to the current NSF is used
If "*" is passed to the supplied VR_view.css is used.
If "*" is passed to 200 data rows are returned
If "Y" is passed to the view details are returned rather than the view itself
If "N" is passed to the view itself is displayed on the web page/form

The example file as it is now can be downloaded here

1 comment:

Rodrigo said...

Oi, achei teu blog pelo google tá bem interessante gostei desse post. Quando der dá uma passada pelo meu blog, é sobre camisetas personalizadas, mostra passo a passo como criar uma camiseta personalizada bem maneira. Até mais.

Disqus for Domi-No-Yes-Maybe