PageMixer demonstration with Struts

pagemixer.filter
Class RegistrationFormFilter

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
        |
        +--jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
              |
              +--pagemixer.filter.RegistrationFormFilter
All Implemented Interfaces:
CommonConstants, jp.ne.dti.lares.foozy.pagemixer.mixer.Consumer, RegistrationFormConstants

public class RegistrationFormFilter
extends jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
implements RegistrationFormConstants

Filter for "RegistrationForm" of struts-mailreader.

This filter consists of below filters

See main(java.lang.String[]) to use as stand-alone application.

Below HTML files are good to examine filter behavior according to properties of RegistrationForm.

- src/demo/struts/war/WEB-INF/page/registration.*.html
this filter (1)insets value attributes for "action"/"username"/"fullName"/"fromAddress"/"replyToAddress" properties, (2)text for "username" property, (3)appeds "username" property to href attribute of link to "create" function, and (4)trims part of HTML depending on "action" property.


Inner Class Summary
static class RegistrationFormFilter.ActionAttr
          Filter to inset "action" filed value of "RegistrationForm".
static class RegistrationFormFilter.AddParams
          Filter to append query string to "href" attribute.
static class RegistrationFormFilter.Factory
          Factory for "CommonFilter".
static class RegistrationFormFilter.FromAddressAttr
          Filter to inset "fromAddress" filed value of "RegistrationForm".
static class RegistrationFormFilter.FullNameAttr
          Filter to inset "fullName" filed value of "RegistrationForm".
static class RegistrationFormFilter.ReplyToAddressAttr
          Filter to inset "replyToAddress" filed value of "RegistrationForm".
static class RegistrationFormFilter.TrimCreate
          Filter to trim part of token sequence by "action" filed value of "RegistrationForm".
static class RegistrationFormFilter.TrimEdit
          Filter to trim part of token sequence by "action" filed value of "RegistrationForm".
static class RegistrationFormFilter.UsernameAttr
          Filter to inset "username" filed value of "RegistrationForm".
static class RegistrationFormFilter.UsernameText
          Filter to inset "username" filed value of "RegistrationForm".
 
Inner classes inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
jp.ne.dti.lares.foozy.pagemixer.mixer.Filter.Factory
 
Fields inherited from interface common.RegistrationFormConstants
CLASS_ACTION_CREATE, CLASS_ACTION_EDIT, CLASS_SUBSCRIPTION, CLASS_USERNAME, KEY_FORM, NAME_ACTION, NAME_FROM_ADDRESS, NAME_FULL_NAME, NAME_REGISTRATION_FORM, NAME_REPLY_TO_ADDRESS, NAME_USERNAME
 
Fields inherited from interface common.CommonConstants
CLASS_STRUTS_ACTION
 
Constructor Summary
RegistrationFormFilter()
          Create filter for "RegistrationForm" of struts-mailreader.
 
Method Summary
static void main(java.lang.String[] args)
          Invoke as stand-alone application.
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
add, add, add, addFactories, addFilters, consume, flush, push, push, push, pushFactories, pushFilters
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
addCleanup, clear, connectTo, getConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationFormFilter

public RegistrationFormFilter()
Create filter for "RegistrationForm" of struts-mailreader.
Method Detail

main

public static void main(java.lang.String[] args)
Invoke as stand-alone application.

Usage of this class is shown below.

 pagemixer.filter.RegistrationFormFilter
     {Template.html}
     {ServletName} {web.xml}
     {struts-config.xml} [{prefix} {struts-config.xml} ....] -
     {prefix} {action}
     [[{name}[={value}]] ....]
 
{Template.html}
file path of template HTML to be processed by this filter.
{ServletName}
name of Struts ActionServlet in your web.xml.
{web.xml}
path to web.xml, in which mapping information of Struts ActionServlet is described.
{struts-config.xml}
"struts-config.xml" file for "default"(= "" prefix) module.
{prefix} {struts-config.xml}
module prefix and "struts-config.xml" for that module. You can specify some pairs of module configuration. You can use "-"(hypen) as prefix of default module instead of ""(empty string), because some shell script wrapping will cause emtpy string argument discarding.
{prefix} {action}
module prefix and path of action for pseudo request. This selects module/action configurations for population of ActionForm bean. You can use "-"(hypen) as prefix of default module instead of ""(empty string).
{name}[={value}]
name and value of request parameter. This not only sets ActionForm properties, but also stores ParameterKey(of jp.ne.dti.lares.foozy.pagemixer.serlvet) into context. ""(empty string) is used, if you does not specify "=".

Please see description of pagemixer.filter about class path requirement to execute this class.


PageMixer demonstration with Struts