Microsoft Deployment Toolkit Wizard Editor : Part 4 : What my face looked like when I first tried to decipher the HTML in the HTML Tab!
previous posts in this series:
- microsoft deployment toolkit wizard editor : part 1 : introduction
- microsoft deployment toolkit wizard editor : part 2 : global settings and custom initialization and validation scripts.
- microsoft deployment toolkit wizard editor : part 3 : panes can be a pain, or how to bring external data into your wizard.
this was my reaction when i started trying to figure out the html in the html tab of the wizardeditor
ok, seriously, here is my understanding of what is taking place and how to get data from your xml into the wizard. i welcome all feedback because, well… honestly i am just guessing.
First off this is what the XML that we are loading looks like. I will be referring to this image throughout the explanation
The first part is simple, it is the title of the dialog
<h1>please select correct configuration </h1>
The next item is a div tag with a class assigned to it. Essentially we are creating a section of the document that we can apply style and formatting to using the css defined in wizard.css
.ScrollingDynamicListBox
{
border: solid 1px;
overflow: auto;
width: 600px;
height: 280px;
}
<div class=scrollingdynamiclistbox>
The next line gets a little bit more complex. It declares a table and sets the data source for the table to our XML. Then it sets the height, width and other style elements. If you wanted the html easier to read you could move the style items into the CSS file and just assign a class to the table.
The table tag also says that when the table is ready (full of data) to run the vbscript function ReadyInitializeConfigurationList
<table id="configlist" datasrc="#configurations" height: 300 width="100%" border=0 cellspacing=0
language=vbscript onreadystatechange=readyinitializeconfigurationlist>
The next line specifies a table row and what the table row should look like, what it should look like while the mouse is over it, and sets it back when the mouse leaves the row
<TR = specifies to add a row to our table
Class=”DynamincListBoxRow” = Specifies what our table row should look like
onmouseover=Javascript:this:classname = “DynamicListBoxRow-over” = Says when the mouse is over the row, change the class to DynamicListBoxRow-over
<tr valign=top class="dynamiclistboxrow" onmouseover="javascript:this.classname = 'DynamicListBoxRow-over';"
onmouseout="javascript:this.classname = 'DynamicListBoxRow';" >
There is a lot taking place in these next few lines. It is where we pull the data from our XML and display it in our table. First we use the <TD> Tag to create a “Table Data Cell” and then we use the <INPUT Tag to create a Radio Button and a hidden field in the Data Cell. In the graphic below I added a BORDER to the <TD so you can see there are actually two cell. The one the arrow points to contains our radio button and our hidden field tied to configid
<TD = Creates a Data Cell in our Table row.
<Input type=radio = Creates a Radio Button
<Input Type=hidden = Creates a hidden field to hold our configid value from our XML
The ‘datafld=“configid”’ is what makes ?? insert the value of configid in the xml document into our table-data-cell. I think this is a better explanation than I could provide.
<input type=hidden name=configid datafld="configid" />
<td class=dynamiclistboxelement width="0px">
<input type=radio name=selecteditem language=vbscript onpropertychange="configitemchange" />
<input type=hidden name=configid datafld="configid" />
</td> >
The next few lines create another Data Cell and create two new divisions <DIV> tags (for formatting) and two new <LABEL labels (for data binding) in our document.
The last <LABEL style=”display: inline;”> creates an error message of sorts because it only displays if there is no data. I am not sure of the specifics of how or why it does this so if you know please blog about it and I will link to it HERE.
<td language=vbscript onclick="clickchildcheckbox" class=dynamiclistboxelement width="100%">
<div>
<label datafld="configdescription" class="larger" ></label>
</div>
<div>
<label datafld="configcomments" dataformatas="html">
<label class=errmsg style="display: inline;" >no task sequences are available
(configurations.xml does not exist, is empty, or is inaccessible)
</label>
</label>
</div>
</td>
Then we close our table and our division. Notice there is not a closing </TR> here… it was like that in the pane I based this on. I am not sure if that is an error or intentional. If you know please blog about it and I will link to it HERE.
</table>
</div>
I do not think we are usign this line, I just did not remove it
<input type=hidden id=configidx name=configidx>
And here is the line that brings the XML into our pane
<xml id="configurations"></xml>
And this creates a button that runs the function associaterequestwithmachine vbscript function.
</br>
<div class=wideedit align=center>
<input type=button name="updateconfigbutton" value="tie this machine to the selected configuration" onclick="associaterequestwithmachine" />
</div>
Well, I hope this helped to get you started with the WizardEditor and how to put it to use in your deployment.
If you want to read more about Front Ends for MDT be sure and check out Johan Arwidmark, Maik Koster, Jason Scheffelmaer aka Schuff, and Ben Hunter/The Deployment Guys
I welcome any feedback and corrections,
Todd