PageMixer demonstration with Struts

pagemixer.filter
Class AppErrorsInsetFilter

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
        |
        +--jp.ne.dti.lares.foozy.pagemixer.mixer.SequenceEditFilter
              |
              +--jp.ne.dti.lares.foozy.pagemixer.mixer.SequenceHybridFilter
                    |
                    +--pagemixer.filter.AppErrorsInsetFilter
All Implemented Interfaces:
jp.ne.dti.lares.foozy.pagemixer.mixer.Consumer, ErrorConstants

public class AppErrorsInsetFilter
extends jp.ne.dti.lares.foozy.pagemixer.mixer.SequenceHybridFilter
implements ErrorConstants

Inset application specific error information.

"Application specific error information" means error message strings contained in Collection(may be "List"), which is stored into in Servlet request "ERROR" (as Constants.ERROR_KEY of Struts mail reader sample application) attribute.

This filter insets error information into HTML source like as shown below:

   <-- beginning of errors block -->
   <span class="application-errors">
     <p>HEADER:</p>
     <ul>
       <-- beginning of iteration block -->
       <li class="application-error-iterate">
         <-- beginning of error block -->
         <span class="application-error">error is here</span>
         <-- end of error block -->
       </li>
       <-- end of iteration block -->
     </ul>
     <p>FOOTER</p>
   </span>
   <-- end of errors block -->
 

This provides sequence for "errors block" to AppErrorsInsetFilter.Iteration and AppErrorsInsetFilter.Trim.

Since:
PageMixer 3.1

Inner Class Summary
static class AppErrorsInsetFilter.Factory
          Factory for "AppErrorsInsetFilter".
static class AppErrorsInsetFilter.Inset
          Inset error message into inside of token sub sequence.
static class AppErrorsInsetFilter.Iteration
          Iterate sequence for iteration block.
static class AppErrorsInsetFilter.Trim
          Trim whole "errors block" if no error information is stored.
 
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.ErrorConstants
ATTR_APPLICATION_ERROR, ATTR_APPLICATION_ERROR_MESSAGE, CLASS_APPLICATION_ERROR, CLASS_APPLICATION_ERROR_ITERATE, CLASS_APPLICATION_ERRORS, KEY_APPLICATION_ERROR, KEY_APPLICATION_ERROR_MESSAGE
 
Constructor Summary
AppErrorsInsetFilter()
          Constructor.
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.SequenceHybridFilter
afterLast, getFilter, onFirst, onInside, onLast
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.SequenceEditFilter
beforeFirst, consume, flush
 
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

AppErrorsInsetFilter

public AppErrorsInsetFilter()
Constructor.

PageMixer demonstration with Struts