- Alternate "stage 2" syntax v2.032, v2.033, v2.034, v2.035
- WebHub now includes new features which enable easy multilingual site development and close integration with
MacroMedia DreamWeaver MX 2004.
- To ensure backwards compatibility, this "stage 2" syntax is disabled by default. To activate,
add the following to your application-level INI file:
[TWebApp.Defaults]
ProjectSyntax=0213
- The Stage 2 syntax is documented separately.
WebHub v2.032 uses Stage 2.00.
WebHub v2.033 uses Stage 2.11.
WebHub v2.034 uses Stage 2.12.
WebHub v2.035 and v2.036 use Stage 2.13.
WebHub v2.039+ use Stage 2.14.
- HREF strongly recommends that you do NOT adopt Stage 2 syntax for large, existing, in-production applications yet.
The reason for this recommendation is that the syntax details
are in fairly rapid flux, and while we are making every effort to provide enough information for everyone to get everything right
at each stage, we still expect some minor wording changes coming up between now and the end of July 2004.
Nonetheless, we strongly encourage you to try it with a new or existing site (say one with less than than 10 web pages).
- Confirmed session conflict problem v2.031
- If you are using session cookies, you can have a problem where one surfer gets into the session data of another surfer. (Reference support ticket #00402)
- This is confirmed fixed in v2.152. Other intermediate versions have not been tested for this issue.
- To fix this, you need to recompile your custom WebHub application with new components.
- New DreamWeaver integration panel v2.032...v2.037
- HREF is providing a new panel (lib\whDream.pas) which enables remote editing of WebHub HTML Stage 2
files with DreamWeaver v7.0.1. "But wait! This is impossible!!"
Actually, no, it is possible, although very difficult to imagine before you see it work.
- Sign up to listen to, and watch, the recorded eseminars
from 24-Jun-2004 and 30-Jul-2004. Ask for your login via
href.com/contact.
- Requires: WebHub Designer DreamWeaver Manager extension.
- The two eseminars are available without audio here
and here. The first one provides a general introduction
to WebHub Syntax Stage 2, and the second one goes in-depth into using the Dreamweaver MX 2004 WebHub Extension.
- New WebHub Wizard for use in Delphi IDE v2.031
-
A new wizard, lib\D#\whWizRunWebAppD#.bpl, provides a menu for use when compiling with Delphi.
On the Delphi menu, select "Projects > WebHub" for these new features:
- Stop AppID
this makes the running EXE exit gracefully
the appid will come from the TWebApp.TheAppID property and you may override that.
- Compile, then Run
this tries to compile, and if successful, stops your EXE and runs the new one from within Delphi
- Compile, then Launch
same idea except EXE is run outside Delphi, with no debugger active
- Edit App INI File
This should open Notepad and display the application-level INI file. This requires that you have already set the
current AppID by using "Compile, then Run" or "Reset AppID".
- Hub - Start
starts Hub.exe service
- Hub - Stop
stops Hub.exe service
- Launch WebHubAdmin
- Launch WebHubView
- Reset AppID
lets you change the AppID used by the wizard
Your app is run based on the project output directory. WebHubAdmin and WebHubView are run from the "bin" folder under the path specified in
the registry setting, SOFTWARE\HREF Tools\Install\InstallRoot\WebHub. The hub service is controlled through "net start hub" and "net stop hub".
This wizard works with Hub v2.029+ and is included with "WebHub Object Pascal Components" v2.031+.
- TWebDataGrid is now much more XHTML compliant
- The table tag includes an ID based on the component name. v2.033
- All syntax is in lowercase.v2.033
- Input tags have / endings in order to be XHTML compliant.v2.033
- The id will be the Name of the grid.v2.034
- The class will always be "webDataGrid-table".v2.034
- The associated buttons will be class "webDataGrid-buttons".v2.034
- The associated controls will be class "webDataGrid-controls".v2.034
- You should set the Border property to a blank string in your Delphi code, for maximum XHTML compliance. v2.034
- The Border property defaults to a blank string is the component's constructor. It was 'BORDER' in earlier versions. v2.035
- TWebDataScan and TWebDataGrid allow escaped quotation marks within Delimiter list v2.034
- Please see the HTQ1 demo for sample code -- study its INI file.
- TWebDataScan and TWebDataGrid no longer send extra blank button v2.035
- Although this may not have been noticable unless you were using styled UL and LI tags for your buttons, prior
versions inadvertently sent out an extra </li_tag><li_tag> pair. Correct functioning can be seen in the HTQ1 demo.
- Support added for lingvo within filtered URLs v2.037
- If you set the AppDefault named cgiJumpWithLingvo to true, and you set cgiUseFilter to true, and you
have ProjectLingvo set non-blank, and the site visitor's guestlingvo literal is different from the ProjectLingvo,
then (and only then!) will JUMPs be made in the form
/xxx/appid:pageid:session:cmd
where xxx is the guestlingvo.
- To use this feature, you must be running StreamCatcher v1.5.2.0 with the following settings
[wwwMySite.RequestHeaderRewriting]
/xxx/*=HeadersToRewriteGroup1
[wwwMySite.HeadersToRewriteGroup1]
guestlingvo:=guestlingvo:xxx
[wwwMySite.DirectoryURLsToReMapWithinDomain]
/xxx/-AppID:*=/iis/webhub.dll?-AppID:%t
/xxx/AppID:*=/iis/webhub.dll?AppID:%t
/xxx/*=/iis/webhub.dll?AppID:%t
- An upcoming version of StreamCatcher should make this quicker to configure; meanwhile you are welcome to
use this syntax to improve your search engine ratings.
- Demonstration site: www.earthwaverecords.com.
- New TWebInfo.OnSetSessionsDir event v2.031
- This event is called after TWebInfo sets a new session directory. This will occur during initialization
and if the SessionsDir becomes unavailable (goes offline, e.g. on a LAN).
- "DO" page works with TWebActionNoSaveState objects v2.032
- Previously, the "DO" page worked only with TWebAction objects.
- New TWebApp.AppSettings list added for your custom application settings v2.032
- You may now segregate your custom application settings in your INI file, rather than
keeping them in [TWebApp.Defaults]. This new list works exactly like TWebApp.Defaults -- all the same
access methods within Delphi, and in WHTML.
- In the INI file, use section named [TWebApp.AppSettings] as of v2.036. (Section was [TWebApp.Settings] in v2.032 to v2.035)
- In WHTML, use %=AppSetting.key=% to reference the value of a single setting.
- In Delphi, use pWebApp.AppSetting['key'] to reference the value of a single setting, and pWebApp.AppSettings to reference
the complete list of settings.
- TWebObjectInspector installs to HT+ palette v2.032
- We added an icon for TWebObjectInspector and set it to automatically install to the HT+ palette.
- Preview Panel enhanced v2.032
- The preview panel (webhub\lib\whHtmlVw.pas) has been reviewed, enhanced, and reintegrated into WebHub. It is now
used in the WebHubAdmin module, and we highly recommend that developers add it to WebHub applications which
run as applications. (Of course, the preview panel is not relevant if you are running as an invisible service.)
- On the "HTML > Files" panel, the "HTML > Pages" panel, the "HTML > Chunks" panel, and the "In/out > Output" panel,
you will now find an icon on the toolbar which sends the relevant content to the preview panel. Thus, if you have selected
a file, the file will be previewed. If you have selected a page, the page will be previewed. If you have selected a chunk,
the chunk will be previewed. If you are on the output panel, whatever is shown will be previewed.
- If you have graphics on your pages that you would like to see within the preview panel, set the ExportDir to
the root of your site, e.g.
[TWebApp.Defaults]
ExportDir=d:\Projects\WebHub Demos\Live\WebRoot\
- The preview feature works with both WebHub "classic" syntax and the new "Stage 2" syntax. You have more control
and more features when you use the "Stage 2" syntax. The rules that work with DreamWeaver files also
apply to files in the "HTML > Files" panel. For example, you can use the whdesegno section to specify an active page,
and thereby preview only one page out of a file containing multiple pages.
- The preview panel has always required a third party component, THtmlViewer, by David Baldwin, available
in HREFShop. HREF made two patches
to the THtmlViewer source which will be included in David's next release. Meanwhile customers are welcome to a copy
of the patched files. Request htmlsubs.pas and StyleUn.pas from techsupport.
The only other compilation requirement is that you include the webhub\lib\whAppOut.pas panel as well.
- NB: there are no longer any compiler directives associated with the use of the preview panel. Previous versions
compiled the input and output panels differently depending on whether the preview panel was in use; now the detection
is automatic; the preview panel itself activates features on the other panels. For this reason, if you use
the preview panel, you must also use the "HTML > Files" panel and the "Input/Output > Output" panel, or modify the
whHtmlVw.pas source to suit your own needs.
- Syntax Highlighting in W-HTML editor supports Stage 2 Syntax v2.033
- The WebHub HTML panel now highlights the new WHTEKO, WHFOLIO, etc. tags in red.
- Stage 1 syntax is still highlighted (unchanged).
- WebHub macro affixes are now variable v2.035
- A new unit, whMacroAffixes.pas, defines MacroStart and MacroEnd to be %= and =% respectively, which gives the
same behavior as WebHub through v2.034.
- You may override these values with alternate 2-character strings as shown:
uses whMacroAffixes;
(snip)
pWebApp.AppID := 'MyAppID';
MacroStart := '(~';
MacroEnd := '~)';
pWebApp.Refresh;
- HREF will only support %=...=% and (~...~) affixes, i.e. the old style and the new one.
- To change existing database content to the new affixes, you could use a series of replaces, like this:
- SessionSaveTimeOffset: Integer property added v2.033
- If this value is non-zero, all session VAR files closed by the app
will be datetime stamped with a value that is offset from "now"
by the indicated number of minutes.
- Improved XHTML compliance v2.033
- Changed HTML code to lowercase and ended singleton tags for greater XHTML compliance, in the
following units: ApiBuilt, cgiVars, dmHubApp, dmHubGridData, dmWebHub, htdbwapp,
htmlBase, htmlCore, htmlSend, htwebapp, HubCall, isaWrite,
wdbForm, wdbgrid, wDBScan, wdbsorce, webApp, webDrop, webGrid, webLGrid, webList, WebObjInsp,
webOutln, webScan, webSend, webSGrid, webVars, whAsync, whChatApp, whDemoViewSource, whHtmlVw, whJPEG.
- All TABLE tags have IDs and no longer default to having a BORDER.
- We used this checklist and you may, too.
- Support for ColdFusion style comment tag added v2.033
- The following comment is completely stripped, regardless of whether the opening and/or closing tags are at the beginning of a line.
-
- WebHub SET macro syntax extended v2.036
- The following syntax will be supported within the SET macro (only):
-
SET|Session['x']=hello
Set the literal named x equal to the string constant hello.
-
SET|Session[Session['x']]=world
Set the literal named hello (because x equals hello) to the string constant world.
-
SET|Session['z']=Session['x']
Set the literal named z to contents of the literal named x.
-
SET|Session['z']=x
Set the literal named z to the string constant x (because the keyword Session was used on the left-of-equals, the right-of-equals is considered a constant if it doesn't otherwise specify a particular array).
-
SET|Session['h']=%=hello=%
Set the literal named h to whatever %=hello=% evaluates to. Note that the use of %= ... =% is required around hello to indicate it is not a string constant.
-
SET|Session['temp']=Session[%=PageSetting.TableKey=%]
Set the literal named temp to the value of the literal whose name is found in the Page Setting named TableKey.
-
SET|x=hello
Unchanged: hello will be evaluated and if found to be a literal, pWebApp.Literal['x'] will be set to pWebApp.Literal['hello']. This ambiguity is the problem which the enhanced SET macro syntax solves.
-
(~SET|Session[Session[Session['Sx']]]=green~)
(This advanced example is from the SHOWCASE demo, 2Html.whteko file) This 3x nested syntax lets you set a variable where the name of the variable is only known at execution time. In this example, Sx is expanded, and that becomes the variable name to be set.
- NB: WebHub v2.034 does not fully implement the SET macro. Please use v2.036+.
- To see an example of these SET commands done with parentils, see the SHOWCASE demo and navigate in to the pgReusable
page (Entrance -> Easier HTML -> Reusable Pieces of HTML).
- TWebPage.PageMode renamed to TWebPage.PageOutputTarget v2.033
- Delphi icons added for TtpSharedLongint and TtpTrayIcon v2.033
- These components had been using the default Delphi icon, and now have their own.
- Here is code you may use for testing the SET macro
- %= and =% changed to variables MacroStart and MacroEnd v2.035
- All WebHub Component code now uses the variables MacroStart and MacroEnd, defined in htmConst.pas to '%=' and '=%' as pChars.
This is in preparation for enabling future versions of WebHub to operate with '(~' and '~)' as the definitive start and end markers.
Removing the = symbol from the start and end markers makes many expressions which are currently problematic (e.g. SET|x=%=webtime=%)
unambiguous for parsing by human eyes, the WebHub file loader, the WebHub editor and the WebHub Dreamweaver extension.
- WebHub programmers are strongly advised to make their own code use these variables.
- Automatic Sequencing Syntax Clarified v2.035
- This change applies to all syntax stages.
- Old: defaults=sequence.on,next.pageid,prev.pageid,final.pageid,up.pageid (all as a single PageDefault value)
- New: whSequence=on or auto, whSequenceNext=pageid, whSequencePrev=pageid, whSequenceFinal=pageid, whSequenceUp=pageid (each as separate PageDefault values)
- Old value of "RESET" within pagedefaults is no longer relevant to Syntax Stage 2.13+
- TWebListGrid caption and column separators made configurable v2.035
- Previously the caption delimiter was ~ and the column separator was |. These are now configurable through the
CaptionDelimiter and ColumnDelimiter properties. They default to the old values when the macro affixes as %= ... =%, and
default to ~ and | otherwise.
- Handling of exceptions within TWebAction components improved v2.036
- Now, if an exception is raised by a TWebAction component and the TWebApp.OnError procedure "handles" the error (sets the Handled flag
to true), the rest of the page will still be generated. Previously the page output was truncated at the point of the exception.
- Exceptions within TWebDataSource are now raised so that they can be handed by your TWebApp.OnError event. This includes
errors where the database connection becomes unavailable.
- SendBufferedChunk method on ThtWebDBApp renamed to SendBufferedString v2.037
- Change all references in your PAS files from SendBufferedChunk to SendBufferedString.
- OnTraceChunk event on TWebOutputApp renamed to OnTraceTekero v2.037
- ChunkDataSource property on ThtWebDBApp renamed to DynContentDataSource v2.037
- ChunkFieldname property on ThtWebDBApp renamed to DynContentFieldname v2.037
- CacheDbChunks property on ThtWebDBApp renamed to CacheDBContent v2.037
- If you are not using the shared lib\dmWhDbAp.pas file, open your DFM and
change the property name from CacheDBChunks to CacheDBContent before opening
the PAS version of your data module.
- TWebApp.OnPageComplete event added v2.037
- This event fires when the output stream is absolutely complete, including all anchors having been expanded.
A read-only copy of the output stream is passed to the event.
- Removed TWebOutput.SendSpacers v2.037
- Here is the code in case you were using it:
const
MagicSpace=#$A0;
procedure TWebOutput.SendSpacers(HowMany:Byte);
var
Buffer: array[0..255] of char;
begin
FillChar(Buffer,HowMany,MagicSpace);
Buffer[HowMany]:=#0;
SendPchar(Buffer);
end;
- This code has been discontinued because in Firefox, the "magicspace" character renders as a ? symbol.
- The units which had been using magicspace (wdbgrid, websgrid, weblgrid, weboutln, webapp), now use the non-breaking-space.
- OnBeforeTranslation and OnAfterTranslation events added to TWebOutputApp v2.037
- These events fire before and after translated keys are sent to the output stream. The purpose is to let you add
extra HTML which might be required to give the correct font or other styling for certain languages.
- Example code follows
-
- New IfInDW macro v2.037
- This conditional macro determines whether the code is running within Dreamweaver Design View, or not.
- Syntax: IfInDW|do this||else this
- Security layer added for remote Dreamweaver use v2.037
- If your WebHub appliation contains the dmDream.pas unit, you should customize three key event handlers.
- pWebCommandLine.OnFrontDoorTriggered (uses webCall unit) (See DemoAppFrontDoorTriggered in whDemoInitialize.pas)
- DataModuleDreamWeaver.OnDesignPage (uses dmDream unit) (See DemoAppDesignPageCalled in whDemoInitialize.pas)
- dmWebHubApp.OnSessionInURL (declared in dmWebHub.pas but you should reference the derived unit which contains your web app object)
(See DemoAppSessionInURL in whDemoInitialize.pas)
- Customize OnFrontDoorTriggered so that even if your application generally enforces a FrontDoor, a Dreamweaver user
can still access the remotedesign page without being bounced to the FrontDoor. If your app does not use a FrontDoor, you do
not need to configure this event handler.
- Customize OnDesignPage to add security rules which determine access to the remotedesign and remotepreview pages.
This is where you can restrict access to a particular IP number, or range of IP numbers.
- Customize OnSessionInURL to allow a certain session number, or range of session number, to access the remotedesign page.
Use this in conjunction with specifying a session number in the Dreamweaver DesignDynSrc definition, e.g.
remoteadv=http://demos.href.com/scripts/runisa.dll?adv|remotedesign|remoterefresh|2323|
.