Now let's check that we've correctly registered our new tag and that EWD's compiler can locate it and run our tag processor.

Create a new EWD application called mgwTest by adding a new subdirectory named mgwTest to your EWD Application Root Path (eg c:\ewdApps\mgwTest)

Create a new page named tagTest.ewd in this directory with the following contents:

   <ewd:config isFirstPage="true">
        <title>Custom Tag Test</title>
       <h2>This is a test of our new custom tag</h2>
       <demo:todaysMessage message="Hello World!" />

Save this file (eg as c:\ewdApps\mgwTest\tagTest.ewd)

Go back into Studio and edit the tag processor method to the following:

ClassMethod todaysMessage(nodeOID As %String, ByRef attrValues, docOID As %String, technology As %String)

Re-compile the class using CTL + F7.

Now start up a Caché terminal session, change to the namespace in which you compile EWD applications, and type:

 d compileAll^%zewdAPI("mgwTest",,"csp")

(Note: change "csp" to the technology you want to use, eg "php", "wl", etc.)

If you've done everything correctly, you should see the following:

USER>d compileAll^%zewdAPI("mgwTest",,"csp")
ztodaysMessage(nodeOID,attrValue,docOID,technology) public { break
USER 19d1>

If you type w nodeOID and Enter, you should see:

USER 19d1>w nodeOID
USER 19d1>

What has happened is that EWD's compiler has correctly found an instance of our new Custom Tag and passed control to our tag processor which then hit the break point that we added. The variable nodeOID is the pointer to the instance of the tag that it found in the DOM. EWD has also passed us the attributes it found for this tag. Do the following in your Caché terminal session:

USER 19d1>d ^%r
Array: attrValues
Device:      Right margin: 80=>
attrValues("message")="Hello World!"

There's the attribute we added to the tag!

If everything is working as shown here, you're now ready to begin writing your tag processor method logic.