Java Doc for SForm.java in  » Swing-Library » wings3 » org » wings » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » wings3 » org.wings 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.SComponent
      org.wings.SContainer
         org.wings.SForm

All known Subclasses:   org.wings.SWindow,  org.wings.CmsForm,
SForm
public class SForm extends SContainer implements LowLevelEventListener(Code)
Container in which you need to wrap HTML input fields (ie. STextField) to work correctly.

The browser uses this object/tag to identify how (POST or GET) and where to send an request originating from any input inside this form.

Note:Please be aware, that some components render differently if placed inside a SForm.
author:
   Armin Haaf



Field Summary
final public static  StringENC_TYPE_MULTIPART_FORM
     Multipart form encoding.
final public static  StringENC_TYPE_TEXT_PLAIN
     Default Form encoding type.
final public static  StringURL_ENCODING
     URL form encoding.
protected  StringactionCommand
    
 intfileChooserCount
    
final protected  EventListenerListlistenerList
    

Constructor Summary
public  SForm()
     Create a standard form component.
public  SForm(URL action)
     Create a standard form component but redirects the request to the passed URL.
public  SForm(SLayoutManager layout)
     Create a standard form component.

Method Summary
public  voidaddActionListener(ActionListener listener)
     Add a listener for Form events.
public static  voidaddArmedComponent(LowLevelEventListener component)
     Register a components to be subject to fire component events in a later phase of the request processing.
public  SComponentaddComponent(SComponent c, Object constraint, int index)
    
public static  voidclearArmedComponents()
     clear armed components.
protected  voidfireActionPerformed(String pActionCommand)
     Fire a ActionEvent at each registered listener.
public static  voidfireEvents()
     This method fires the low level events for all "armed" components of this thread (http session) in an ordered manner:
  • forms
  • buttons / clickables
  • "regular" components
This order derives out of the assumption, that a user first modifies regular components before he presses the button submitting his changes.
public  voidfireFinalEvents()
    
public  voidfireIntermediateEvents()
    
public  URLgetAction()
    
public  StringgetActionCommand()
    
public  FormCGgetCG()
    
public  SButtongetDefaultButton()
    
public  StringgetEncodingType()
     Get the current encoding type, as set with SForm.setEncodingType(String) .
public  RequestURLgetRequestURL()
    
public  booleanisEpochCheckEnabled()
    
public  booleanisPostMethod()
     Returns, whether this form is transmitted via POST (true) or GET (false).
public  voidprocessLowLevelEvent(String action, String[] values)
    
public  voidregisterFileChooser(SFileChooser fileChooser)
    
public  voidremoveActionListener(ActionListener listener)
    
public  voidsetAction(URL action)
    
public  voidsetActionCommand(String actionCommand)
     A SForm fires an event each time it was triggered (i.e.
public  voidsetCG(FormCG cg)
    
public  voidsetDefaultButton(SButton defaultButton)
     Set the default button activated upon enter.
public  voidsetEncodingType(String type)
     Set the encoding of this form.
public  voidsetEpochCheckEnabled(boolean epochCheckEnabled)
    
public  voidsetPostMethod(boolean postMethod)
     Set, whether this form is to be transmitted via POST (true) or GET (false).
public  voidunregisterFileChooser(SFileChooser fileChooser)
    

Field Detail
ENC_TYPE_MULTIPART_FORM
final public static String ENC_TYPE_MULTIPART_FORM(Code)
Multipart form encoding. Needed for file uploads. See SForm.setEncodingType(String) .



ENC_TYPE_TEXT_PLAIN
final public static String ENC_TYPE_TEXT_PLAIN(Code)
Default Form encoding type. See SForm.setEncodingType(String) .



URL_ENCODING
final public static String URL_ENCODING(Code)
URL form encoding. See SForm.setEncodingType(String) .



actionCommand
protected String actionCommand(Code)



fileChooserCount
int fileChooserCount(Code)



listenerList
final protected EventListenerList listenerList(Code)




Constructor Detail
SForm
public SForm()(Code)
Create a standard form component.



SForm
public SForm(URL action)(Code)
Create a standard form component but redirects the request to the passed URL. Use this i.e. to address other servlets.
Parameters:
  action - The target URL.



SForm
public SForm(SLayoutManager layout)(Code)
Create a standard form component.
Parameters:
  layout - The layout to apply to this container.
See Also:   SContainer




Method Detail
addActionListener
public void addActionListener(ActionListener listener)(Code)
Add a listener for Form events. A Form event is always triggered, when a form has been submitted. Usually, this happens, whenever a submit button is pressed or some other mechanism triggered the posting of the form. Other mechanisms are
  • Java Script submit() event
  • If a form contains a single text input, then many browsers submit the form, if the user presses RETURN in that field. In that case, the submit button will not receive any event but only the form.
  • The SFileChooser will trigger a form event, if the file size exceeded the allowed size. In that case, even if the submit button has been pressed, no submit-button event will be triggered. (For details, see SFileChooser ).
Form events are guaranteed to be triggered after all Selection-Changes and Button ActionListeners.



addArmedComponent
public static void addArmedComponent(LowLevelEventListener component)(Code)
Register a components to be subject to fire component events in a later phase of the request processing. SForm will call org.wings.LowLevelEventListener.fireIntermediateEvents and later org.wings.LowLevelEventListener.fireFinalEvents in a later phase of the request. The calls on the components will be ordered dependend on their type.
Parameters:
  component - The component to callback for event firing in a later phase of the request
See Also:   SForm.fireEvents()



addComponent
public SComponent addComponent(SComponent c, Object constraint, int index)(Code)



clearArmedComponents
public static void clearArmedComponents()(Code)
clear armed components. This is usually not necessary, since sessions clear clear their armed components. But if there was some Exception, it might well be, that this does not happen.



fireActionPerformed
protected void fireActionPerformed(String pActionCommand)(Code)
Fire a ActionEvent at each registered listener.



fireEvents
public static void fireEvents()(Code)
This method fires the low level events for all "armed" components of this thread (http session) in an ordered manner:
  • forms
  • buttons / clickables
  • "regular" components
This order derives out of the assumption, that a user first modifies regular components before he presses the button submitting his changes. Otherwise button actions would get fired before the edit components fired their events.



fireFinalEvents
public void fireFinalEvents()(Code)



fireIntermediateEvents
public void fireIntermediateEvents()(Code)



getAction
public URL getAction()(Code)



getActionCommand
public String getActionCommand()(Code)

See Also:   SForm.setActionCommand(String)



getCG
public FormCG getCG()(Code)



getDefaultButton
public SButton getDefaultButton()(Code)

See Also:   SForm.setDefaultButton(SButton)



getEncodingType
public String getEncodingType()(Code)
Get the current encoding type, as set with SForm.setEncodingType(String) . If no encoding type was set, this method detects the best encoding type. This can be expensive, so if you can, set the encoding type. string containing the encoding type. This is something likemultipart/form-data,application/x-www-form-urlencoded .. or 'null'by default.



getRequestURL
public RequestURL getRequestURL()(Code)



isEpochCheckEnabled
public boolean isEpochCheckEnabled()(Code)

See Also:   LowLevelEventListener.isEpochCheckEnabled
See Also:   



isPostMethod
public boolean isPostMethod()(Code)
Returns, whether this form is transmitted via POST (true) or GET (false).

Default is true. true if form postedt via POST,false if via GET (false).




processLowLevelEvent
public void processLowLevelEvent(String action, String[] values)(Code)



registerFileChooser
public void registerFileChooser(SFileChooser fileChooser)(Code)



removeActionListener
public void removeActionListener(ActionListener listener)(Code)
Remove a form action listener, that has been added in SForm.addActionListener(ActionListener)



setAction
public void setAction(URL action)(Code)



setActionCommand
public void setActionCommand(String actionCommand)(Code)
A SForm fires an event each time it was triggered (i.e. pressing asubmit button inside)
Parameters:
  actionCommand - The action command to place insiside the ActionEvent



setCG
public void setCG(FormCG cg)(Code)



setDefaultButton
public void setDefaultButton(SButton defaultButton)(Code)
Set the default button activated upon enter. The button is triggered if you press enter inside a form to submit it.
Parameters:
  defaultButton - A button which will be rendered invisible.If null enter key pressed will be catched by the wings framework.



setEncodingType
public void setEncodingType(String type)(Code)
Set the encoding of this form. This actually is an HTML interna that bubbles up here. By default, the encoding type of any HTML-form is application/x-www-form-urlencoded, and as such, needn't be explicitly set with this setter. However, if you've included a file upload element (as represented by SFileChooser ) in your form, this must be set to multipart/form-data, since only then, files are transmitted correctly. In 'normal' forms without file upload, it is not necessary to set it to multipart/form-data; actually it enlarges the data to be transmitted, so you probably don't want to do this, then.
Parameters:
  type - the encoding type; one of multipart/form-data,application/x-www-form-urlencoded or null to detect encoding.



setEpochCheckEnabled
public void setEpochCheckEnabled(boolean epochCheckEnabled)(Code)

See Also:   LowLevelEventListener.isEpochCheckEnabled
See Also:   



setPostMethod
public void setPostMethod(boolean postMethod)(Code)
Set, whether this form is to be transmitted via POST (true) or GET (false). The default, and this is what you usually want, is POST.



unregisterFileChooser
public void unregisterFileChooser(SFileChooser fileChooser)(Code)



Methods inherited from org.wings.SContainer
public SComponent add(SComponent c)(Code)(Java Doc)
public void add(SComponent c, Object constraint)(Code)(Java Doc)
public SComponent add(SComponent c, int index)(Code)(Java Doc)
public void add(SComponent c, Object constraint, int index)(Code)(Java Doc)
public SComponent addComponent(SComponent c)(Code)(Java Doc)
public SComponent addComponent(SComponent c, Object constraint)(Code)(Java Doc)
public SComponent addComponent(SComponent c, int index)(Code)(Java Doc)
public SComponent addComponent(SComponent c, Object constraint, int index)(Code)(Java Doc)
public void addContainerListener(SContainerListener l)(Code)(Java Doc)
public void addNotify()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
protected void fireContainerEvent(int type, SComponent comp)(Code)(Java Doc)
public SComponent getComponent(int i)(Code)(Java Doc)
public int getComponentCount()(Code)(Java Doc)
protected ArrayList getComponentList()(Code)(Java Doc)
public SComponent[] getComponents()(Code)(Java Doc)
public Object getConstraintAt(int i)(Code)(Java Doc)
protected ArrayList getConstraintList()(Code)(Java Doc)
public SLayoutManager getLayout()(Code)(Java Doc)
public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc)
public void inviteEachComponent(ComponentVisitor visitor) throws Exception(Code)(Java Doc)
protected boolean isShowingChildren()(Code)(Java Doc)
protected void processContainerEvent(SContainerListener listener, SContainerEvent e)(Code)(Java Doc)
public void remove(SComponent c)(Code)(Java Doc)
public void remove(int index)(Code)(Java Doc)
public void removeAll()(Code)(Java Doc)
public void removeContainerListener(SContainerListener l)(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
public void setCG(ContainerCG cg)(Code)(Java Doc)
public void setLayout(SLayoutManager l)(Code)(Java Doc)
protected void setParentFrame(SFrame f)(Code)(Java Doc)
public void updateCG()(Code)(Java Doc)

Fields inherited from org.wings.SComponent
final public static int DONE_RENDERING(Code)(Java Doc)
final public static Selector SELECTOR_ALL(Code)(Java Doc)
final public static int START_RENDERING(Code)(Java Doc)
final public static int WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT(Code)(Java Doc)
final public static int WHEN_IN_FOCUSED_FRAME(Code)(Java Doc)
protected Map<Selector, Style> dynamicStyles(Code)(Java Doc)
protected boolean enabled(Code)(Java Doc)
protected boolean visible(Code)(Java Doc)

Methods inherited from org.wings.SComponent
final public void addComponentListener(SComponentListener l)(Code)(Java Doc)
public void addDynamicStyle(Style style)(Code)(Java Doc)
final protected void addEventListener(Class<T> type, T listener)(Code)(Java Doc)
public void addNotify()(Code)(Java Doc)
final public void addParentFrameListener(SParentFrameListener l)(Code)(Java Doc)
final public void addRenderListener(SRenderListener renderListener)(Code)(Java Doc)
final public void addScriptListener(ScriptListener listener)(Code)(Java Doc)
public void addStyle(String additionalCssClassName)(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
protected void fireComponentChangeEvent(SComponentEvent aEvent)(Code)(Java Doc)
public void fireFinalEvents()(Code)(Java Doc)
protected void fireKeyEvents()(Code)(Java Doc)
final public void fireRenderEvent(int type)(Code)(Java Doc)
public ActionMap getActionMap()(Code)(Java Doc)
public Color getBackground()(Code)(Java Doc)
public SBorder getBorder()(Code)(Java Doc)
public ComponentCG getCG()(Code)(Java Doc)
final public Object getClientProperty(Object key)(Code)(Java Doc)
public SPopupMenu getComponentPopupMenu()(Code)(Java Doc)
public Style getDynamicStyle(Selector selector)(Code)(Java Doc)
public Collection getDynamicStyles()(Code)(Java Doc)
public int getFocusTraversalIndex()(Code)(Java Doc)
public SFont getFont()(Code)(Java Doc)
public Color getForeground()(Code)(Java Doc)
public int getHorizontalAlignment()(Code)(Java Doc)
public InputMap getInputMap()(Code)(Java Doc)
public InputMap getInputMap(int condition)(Code)(Java Doc)
final protected int getListenerCount(Class type)(Code)(Java Doc)
final protected Object[] getListenerList()(Code)(Java Doc)
final public EventListener[] getListeners(Class<? extends EventListener> type)(Code)(Java Doc)
public String getLowLevelEventId()(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
final public SContainer getParent()(Code)(Java Doc)
public SFrame getParentFrame()(Code)(Java Doc)
public SDimension getPreferredSize()(Code)(Java Doc)
public RequestURL getRequestURL()(Code)(Java Doc)
public boolean getResidesInForm()(Code)(Java Doc)
public List<ScriptListener> getScriptListenerList()(Code)(Java Doc)
public ScriptListener[] getScriptListeners()(Code)(Java Doc)
final public Session getSession()(Code)(Java Doc)
public boolean getShowAsFormComponent()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
public String getToolTipText()(Code)(Java Doc)
public int getVerticalAlignment()(Code)(Java Doc)
public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc)
protected static boolean isDifferent(Object oldObject, Object newObject)(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isFocusOwner()(Code)(Java Doc)
public boolean isRecursivelyVisible()(Code)(Java Doc)
public boolean isReloadForced()(Code)(Java Doc)
protected boolean isUpdatePossible()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
protected void processComponentEvent(SComponentListener listener, SComponentEvent e)(Code)(Java Doc)
protected boolean processKeyEvents(String[] values)(Code)(Java Doc)
protected void processLowLevelEvent(String name, String[] values)(Code)(Java Doc)
final public void putClientProperty(Object key, Object value)(Code)(Java Doc)
final void register()(Code)(Java Doc)
public void reload()(Code)(Java Doc)
final protected void reloadIfChange(Object oldVal, Object newVal)(Code)(Java Doc)
final protected void reloadIfChange(int oldVal, int newVal)(Code)(Java Doc)
final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code)(Java Doc)
final protected void reloadIfChange(byte oldVal, byte newVal)(Code)(Java Doc)
final protected void reloadIfChange(short oldVal, short newVal)(Code)(Java Doc)
final protected void reloadIfChange(long oldVal, long newVal)(Code)(Java Doc)
final protected void reloadIfChange(float oldVal, float newVal)(Code)(Java Doc)
final protected void reloadIfChange(double oldVal, double newVal)(Code)(Java Doc)
final protected void reloadIfChange(char oldVal, char newVal)(Code)(Java Doc)
final public void removeComponentListener(SComponentListener l)(Code)(Java Doc)
public void removeDynamicStyle(Selector selector)(Code)(Java Doc)
final protected void removeEventListener(Class<T> type, T listener)(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
final public void removeParentFrameListener(SParentFrameListener l)(Code)(Java Doc)
final public void removeRenderListener(SRenderListener renderListener)(Code)(Java Doc)
final public void removeScriptListener(ScriptListener listener)(Code)(Java Doc)
public void removeStyle(String cssStyleClassName)(Code)(Java Doc)
public void requestFocus()(Code)(Java Doc)
public void scrollRectToVisible(Rectangle aRect)(Code)(Java Doc)
public void setActionMap(ActionMap actionMap)(Code)(Java Doc)
public void setAttribute(String cssPropertyName, String value)(Code)(Java Doc)
public void setAttribute(CSSProperty property, String propertyValue)(Code)(Java Doc)
public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code)(Java Doc)
public void setAttribute(Selector selector, CSSProperty property, SIcon icon)(Code)(Java Doc)
public void setAttribute(Selector selector, CSSProperty property, Color color)(Code)(Java Doc)
public void setAttributes(Selector selector, CSSAttributeSet attributes)(Code)(Java Doc)
public void setBackground(Color color)(Code)(Java Doc)
public void setBorder(SBorder border)(Code)(Java Doc)
public void setCG(ComponentCG newCG)(Code)(Java Doc)
public void setComponentPopupMenu(SPopupMenu popupMenu)(Code)(Java Doc)
public void setDynamicStyles(Collection dynamicStyles)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setFocusTraversalIndex(int index)(Code)(Java Doc)
public void setFont(SFont font)(Code)(Java Doc)
public void setForeground(Color color)(Code)(Java Doc)
public void setHorizontalAlignment(int alignment)(Code)(Java Doc)
public void setInputMap(InputMap inputMap)(Code)(Java Doc)
public void setInputMap(int condition, InputMap inputMap)(Code)(Java Doc)
public void setName(String uniqueName)(Code)(Java Doc)
public void setNameRaw(String uncheckedName)(Code)(Java Doc)
public void setParent(SContainer parent)(Code)(Java Doc)
protected void setParentFrame(SFrame parentFrame)(Code)(Java Doc)
public void setPreferredSize(SDimension preferredSize)(Code)(Java Doc)
public void setReloadForced(boolean forced)(Code)(Java Doc)
public void setShowAsFormComponent(boolean showAsFormComponent)(Code)(Java Doc)
public void setStyle(String cssClassName)(Code)(Java Doc)
public void setToolTipText(String t)(Code)(Java Doc)
public void setVerticalAlignment(int alignment)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final void unregister()(Code)(Java Doc)
public void update(Update update)(Code)(Java Doc)
public void updateCG()(Code)(Java Doc)
public void write(Device s) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.