wheel.components
Class Link

java.lang.Object
  extended by wheel.components.Component
      extended by wheel.components.RenderableComponent
          extended by wheel.components.Link
All Implemented Interfaces:
IContainer

public class Link
extends RenderableComponent
implements IContainer

Represents a link either to another page inside the application or to an external URL. Examples of valid links:

  1. link("FrontPage", "Take me to frontpage");
    - will finnd a Page class named FrontPage from the basePackageForPages.
  2. link("FrontPage?field1=hello&field2=34", "Take me to frontpage");
    - Same as above but will try to set given parameters to the page-class if fields with thoe names exists. Note that basic type translation works.
  3. link("http://www.dilber.com", "Take me to Dilbert");
  4. link("FrontPage.myMethod()", "Call myMethod");
    - Loads FrontPage, builds it and calls myMethod().
  5. link("this.onAction()", "Show some action");
    - Calls the onAction() method on the current page.
  6. link("this.onAction('parameter1')", "Show more action");
    - Calls onAction-method that takes a String-parameter and passes given value.
  7. link("FrontPage:myComponent.foobar()", "Whoa");
    - Loads FrontPage, builds the page, finds a complex component with id "myComponent" and calls foobar() method on it.

Author:
Henri Frilund

Method Summary
 void _renderActions(org.xmlpull.v1.XmlSerializer serializer)
           
 java.lang.String defaultTagName()
          Subclasses must implement this.
 void renderComponent(org.xmlpull.v1.XmlSerializer serializer)
          Default implementation that will render all renderable child components that this component has.
 
Methods inherited from class wheel.components.RenderableComponent
_classReferenceFromHints, _clear, _getRenderAfterMe, _getRenderBeforeMe, _render, _renderClassReferenceFromHints, _renderTagStart, _renderXhtmlAttributes, addRenderAfter, addRenderBefore, config, defaultDomEvent, getTagName, toString
 
Methods inherited from class wheel.components.Component
_applyFormat, _getAction, _getActions, _getChildren, _getForm, _getRenderableChildren, _getRenderHints, _getTopLevelComponent, _getVisibleForm, _getXhtmlAttributes, _isGeneratedId, _setComponentId, _setGeneratedId, _wrapComponentId, a, a, abbr, abbr, acronym, acronym, action, actionBinding, actionBinding, add, addFirst, address, address, afterAdd, area, attribute, attributes, b, b, base, bdo, big, big, blockquote, br, button, caption, checkbox, checkboxGroup, cite, cite, clasS, col, colgroup, create, dateInput, dd, dd, del, del, dfn, dfn, div, dl, dt, dt, el, em, em, encode, entity, equals, eval, fieldset, fileInput, fileInput, find, findAll, form, form, frame, frameset, get, getComponentId, getComponentName, getComponents, getEngine, getPage, getParent, h1, h1, h2, h2, h3, h3, h4, h4, h5, h5, h6, h6, hashCode, head, hidden, hr, htmlText, i, i, id, iframe, img, ins, ins, kbd, kdb, label, label, legend, legend, li, li, link, link, map, message, message, meta, multiSelect, nbsp, noframes, noscript, numberInput, numberInput, object, ol, p, p, param, placeholder, pre, pre, q, q, radio, radioGroup, rawText, remove, remove, renderHint, requestFocus, s, s, samp, samp, script, select, selectModel, small, small, span, span, strike, strike, strong, strong, style, sub, sub, submit, sup, sup, table, tbody, td, text, textarea, textInput, tfoot, th, thead, title, tr, u, u, ul, up, up, var, var, wBlock, wrapSelf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

defaultTagName

public java.lang.String defaultTagName()
Description copied from class: RenderableComponent
Subclasses must implement this. If no xhtml tagname can be resolved from rendering hints, will default to value returned by this method.

Specified by:
defaultTagName in class RenderableComponent
Returns:

renderComponent

public void renderComponent(org.xmlpull.v1.XmlSerializer serializer)
                     throws java.io.IOException
Description copied from class: RenderableComponent
Default implementation that will render all renderable child components that this component has. Subclasses should override this method if necessary.

Overrides:
renderComponent in class RenderableComponent
Throws:
java.io.IOException

_renderActions

public void _renderActions(org.xmlpull.v1.XmlSerializer serializer)
                    throws java.io.IOException
Overrides:
_renderActions in class RenderableComponent
Throws:
java.io.IOException


Copyright © 2007-2008. All Rights Reserved.