GenericNamePageHandler#

GenericNamePageHandler is part of the OWiki Plugins.

This page is available in german and english.

Inside package de.orisa.wiki.forms.GenericNamePageHandler

Functionality#

Mainly the same as NewPageHandler, but it extends this Handler. Now it is possible to determine the pagename of the new page through dynamic parts of the form (filled out by user at runtime) and static (constants declared in the form at design time) elements.

To use this Handler you must build a form in the following convention.

convention#

FormSet: #

Contains 3 elements:
  • form=newPageForm -This is the name of the form thats identifies the form on the wikipage(f.e. if you have more than one form)
  • newpagename:
    • constant element: pageprefix - all pages will begin with the word: pageprefix
    • dynamic element: $title and $subtitle are elements of the form and will be filled with a value if the users submits the form.
Note that different nameparts of newpagename need to be concatenated with "+"!
  • predefined values for the form = the variable title gets the default value BookTitel - unnecessary
[{FormSet form='newPageForm' newPageName='pageprefix+$title+$subtitle' title='BookTitel'}]

FormOutput#

The Output of the new Page - mainly to make a standardized look. You can use Wikisyntax to embed elements. Contains 3 elements:
  • form : the unique form identifier (like in FormSet)
  • handler: GenericNamePageHandler
  • output: You can use Wikisyntax to embed elements. The PageHandler will replace the placeholders (marked with $(variablename)) with the corresponding variable from the form.

Note: It is important to have a empty line between FormOutput and the first elements of the output! Otherwise the Handler will not work.

[{FormOutput form='newPageForm' handler='GenericNamePageHandler'

|Title| $(title) 
|Subtitle| $(subtitle) 
}]

FormOpen#

This is the form where the user can input data for the new Page.
Contains 3 elements:
  • form : the unique form identifier (like in FormSet)
  • FormInput : InputElements of the form. You can use wikisyntax to embed elements. The attribute name defines the variable name (it is mapping for the FormOutput).


[{FormOpen form='newPageForm'}]

||Title| [{FormInput name='title' type='text' size='80'}] 
||Subtitle| [{FormInput name='subtitle' type='text' size='80'}] 

![{FormInput name='createNewPageButton' type='submit' value='Create Page'}] 

FormClose#

Close the form.

[{FormClose}]

Liegt im package de.orisa.wiki.forms.GenericNamePageHandler

Funktionalität #

Im Prinzip die gleiche wie beim NewPageHandler, aber er erweitert diesen, so dass man für den Seitennamen dynamische(an Hand verschiedener Formularfelder) und statische(feste Bezeichner) Elemente definieren kann.

Konvention#

Header, der die Elemente von newPageName definiert(mit + voneinander getrennt), Titel bekommt den Defaultwert StandartWertTitel
[{FormSet form='newPageForm' newPageName='Seitenpraefix+$title+$subtitle' title='StandartWertTitel'}]

FormOutput#

Der zu nutzende FormHandler und wie das Formular am Ende fertig aufgebaut wird


[{FormOutput form='newPageForm' handler='GenericNamePageHandler'

|Title| $(title) 
|Subtitle| $(subtitle) 
}]

wichtig:da muss eine leere Zeile zwischen dem Element FormOutput und der ersten Wikisyntax sein. Sonst geht der Handler nicht.

Die Eingabemaske des Formulars - FormOpen#

Wichtig sind die FormInputs welche in Wikisyntax eingebettet werden können, um das Formular optisch ansprechend zu gestalten.

[{FormOpen form='newPageForm'}]

||Title| [{FormInput name='title' type='text' size='80'}] 
||Subtitle| [{FormInput name='subtitle' type='text' size='80'}] 

![{FormInput name='createNewPageButton' type='submit' value='Seite anlegen'}] 

Formular schliessen#

[{FormClose}]

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-7) was last changed on 12-Feb-2009 18:11 by NicolaFischer