Child pages
  • Development-Examples-Calendar Component

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

That's how the html could look like:

Code Block
{panel}
 
<webobject name = "Table">
    <tr>
      <td align = "left" valign = "top" colspan = "7">
        <webobject name = "Month"></webobject>
        <webobject name = "HasNavigation">
           &nbsp;<webobject name = "YearLink"><webobject name = "Year"></webobject></webobject>
        </webobject>
      </td>
    </tr>
    <webobject name = "Rows">
      <tr>
        <webobject name = "Columns">
          <td align = "right" valign = "top">
            <webobject name = "HasLink">
              <webobject name = "IsCurrentDay"></webobject><webobject name = "Link"><webobject name = "Day"></webobject></webobject><webobject name = "IsCurrentDay"></webobject>&nbsp;
            </webobject>
            <webobject name = "HasNoLink">
              <webobject name = "Day"></webobject>&nbsp;
            </webobject>
          </td>
        </webobject>
      </tr>
    </webobject>
    <webobject name = "HasNavigation">
      <tr>
        <td align = "left" valign = "top" colspan ="3">
          <webobject name = "HasPreviousMonth">
            <small><webobject name = "PreviousMonthLink"><webobject name = "PreviousMonth"></webobject></webobject></small>
          </webobject>
        </td>
        <td align = "left" valign = "top">
         
&nbsp;
        </td>
        <td align = "right" valign = "top" colspan ="3">
          <webobject name = "HasNextMonth">
            <small><webobject name = "NextMonthLink"><webobject name = "NextMonth"></webobject></webobject></small>
          </webobject>
        </td>
      </tr>
    </webobject>
  </webobject>
{panel}

And here is the wod:

unmigrated-wiki-markup
Panel
Code Block

 
Table: WOGenericContainer{

   elementName = "table";

   border = "0";

   cellSpacing = "0";

   cellPadding = "0";

 };

 HasNavigation: WOConditional

 {

   condition = hasNavigation;

 };


 YearLink: WOHyperlink{

   action = displayYear;

 };

 Year: SpanString{

   value = month.year;

   isBold = true;

   isSmall = true;

   class = "Label";

 };

 Rows: WORepetition{

   count = rowCount;

   index = rowIndex;

 };

 Columns: WORepetition{

   count = columnCount;

   index = columnIndex;

 };

 Month: SpanString{

   value = month.monthName.toUpperCase;

   isBold = true;

   isSmall = true;

   class = "Label";

 };

 DayName: SpanString{

   value = dayName;

   isSmall = true;

   class = "Label";

 };

 HasLink: WOConditional{

   condition = hasLink;

 };

 HasNoLink: WOConditional{

   condition = hasLink;

   negate = true;

 };

 IsCurrentDay: WOConditional{

   condition = isCurrentDay;

 };

 Link: WOHyperlink{

   action = displayDay;

 };

 Day: SpanString{

   value = day.day;

   isSmall = true;

   isBold = isCurrentDay;

   isItalic = isCurrentDay;

   class = "Label";

 };

 HasNextMonth: WOConditional{

   condition = hasNextMonth;

 };

 NextMonthLink: WOHyperlink{

   action = displayNextMonth;

 };

 NextMonth: SpanString

 {

   value = nextMonthName;

   isSmall = true;

   class = "Label";

 };

 HasPreviousMonth: WOConditional{

   condition = hasPreviousMonth;

 };

 PreviousMonthLink: WOHyperlink{

   action = displayPreviousMonth;

 };

 PreviousMonth: SpanString{

   value = previousMonthName;

   isSmall = true;

   class = "Label";

 };

The component implementation is left to the imagination of the reader.Category:WebObjects