net.sf.tacos.demo.pages.forms
Class AjaxFormsExample

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.apache.tapestry.AbstractPage
                  extended by org.apache.tapestry.html.BasePage
                      extended by net.sf.tacos.demo.pages.forms.AjaxFormsExample
All Implemented Interfaces:
Locatable, LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IPage, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent

public abstract class AjaxFormsExample
extends org.apache.tapestry.html.BasePage

Demonstrates the use of AjaxForm components that enable the posting of form data without refreshing the entire page.

Author:
phraktle

Constructor Summary
AjaxFormsExample()
           
 
Method Summary
 void addNote(org.apache.tapestry.IRequestCycle cycle)
          Creates a new note and sets its state to editing.
 void countrySelected(org.apache.tapestry.IRequestCycle cycle)
          Invoked by handleEvent listener
 void editNote(Long id)
          Invoked by edit link.
abstract  AjaxWebRequest getAjaxWebRequest()
          Injected ajax request
abstract  Note getCurrNote()
          Selects the currently selected note, in the Foreach
abstract  Set getEditorIds()
          Set of notes currently being edited
abstract  NoteStore getStore()
          Holds notes
 void removeNote(Long id)
          Invoked by remove link.
abstract  void setCurrNote(Note note)
          sets the current note
abstract  void setEditorIds(Set edit)
          Sets notes currently being edited
abstract  void setStore(NoteStore store)
          Sets the current store
 void storeNote(org.apache.tapestry.IRequestCycle cycle)
          Called by form to store input value.
 
Methods inherited from class org.apache.tapestry.html.BasePage
getResponseContentType
 
Methods inherited from class org.apache.tapestry.AbstractPage
addPageAttachListener, addPageBeginRenderListener, addPageDetachListener, addPageEndRenderListener, addPageRenderListener, addPageValidateListener, attach, beginPageRender, beginResponse, detach, endPageRender, firePageAttached, firePageBeginRender, firePageDetached, firePageEndRender, firePageValidate, getChangeObserver, getEngine, getExtendedId, getGlobal, getIdPath, getLocale, getNestedComponent, getOutputEncoding, getPageName, getRequestCycle, getVisit, initialize, removePageAttachListener, removePageBeginRenderListener, removePageDetachListener, removePageEndRenderListener, removePageRenderListener, removePageValidateListener, renderPage, setChangeObserver, setLocale, setPageName, validate
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

AjaxFormsExample

public AjaxFormsExample()
Method Detail

storeNote

public void storeNote(org.apache.tapestry.IRequestCycle cycle)
Called by form to store input value.

Parameters:
cycle -

editNote

public void editNote(Long id)
Invoked by edit link.

Parameters:
id -

removeNote

public void removeNote(Long id)
Invoked by remove link.

Parameters:
id -

addNote

public void addNote(org.apache.tapestry.IRequestCycle cycle)
Creates a new note and sets its state to editing.

Parameters:
cycle -

countrySelected

public void countrySelected(org.apache.tapestry.IRequestCycle cycle)
Invoked by handleEvent listener

Parameters:
cycle -

getAjaxWebRequest

public abstract AjaxWebRequest getAjaxWebRequest()
Injected ajax request


getStore

public abstract NoteStore getStore()
Holds notes


setStore

public abstract void setStore(NoteStore store)
Sets the current store


getEditorIds

public abstract Set getEditorIds()
Set of notes currently being edited


setEditorIds

public abstract void setEditorIds(Set edit)
Sets notes currently being edited


getCurrNote

public abstract Note getCurrNote()
Selects the currently selected note, in the Foreach


setCurrNote

public abstract void setCurrNote(Note note)
sets the current note