[JBoss JIRA] Created: (RF-9508) UIValidatorScript component test and implementation
by Alexander Smirnov (JIRA)
UIValidatorScript component test and implementation
---------------------------------------------------
Key: RF-9508
URL: https://jira.jboss.org/browse/RF-9508
Project: RichFaces
Issue Type: Task
Security Level: Public (Everyone can see)
Components: component-a4j-core
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
Fix For: 4.0.0.Milestone4
# UIValidatorScript
* Holds Set of per-field validator functions ( ScriptObject instances ).
* encodeAll method:
o encode html <script> element for all libraries used by validators/converters.
o encode all ScriptObject as <script> element with validator function definition.
o Encode form-wide function for ActionSource components. That function should call all per-field validation functions.
o Encode MessageDispatcher JavaScript object used to delivery messages from validators.
# ScriptObject creates JavaScript function definition that performs per-field validation. Attributes:
* functionName.
* description for converter function call, with parameters and message.
* Collection of description for validator functions, with actual parameters and message.
* AJAX callback code.
* implements equals() method so all validators with same functionality would use single function.
# ScriptBuilder takes ScriptObject collection and builds client-side JavaScript code.
This component should be added to viewResource by code ( with "form" or "body" target ), so it should be implemented similar to Queue script.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (RF-9365) a4j:ajax: data is not defined
by Pavol Pitonak (JIRA)
a4j:ajax: data is not defined
-----------------------------
Key: RF-9365
URL: https://jira.jboss.org/browse/RF-9365
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-a4j-core
Affects Versions: 4.0.0.Milestone2
Environment: RichFaces 4.0.0-SNAPSHOT SVN r.19259
Metamer 4.0.0-SNAPSHOT SVN r. 19259
Java(TM) SE Runtime Environment 1.6.0_21-b06 @ Linux 2.6.34.6-54.fc13.x86_64
Mojarra 2.0.2-FCS
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.8 (KHTML, like Gecko) Chrome/7.0.529.0 Safari/534.8
Reporter: Pavol Pitonak
The attribute data does not work - it shows an error in Firebug "data is not defined"
<h:form id="form">
<h:commandButton value="Submit">
<a4j:ajax event="click" data="#{bean.car}" oncomplete="alert(data.car)"/>
</h:commandButton>
</h:form>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (RF-9507) ClientValidatorRendererunit tests and implementation.
by Alexander Smirnov (JIRA)
ClientValidatorRendererunit tests and implementation.
-----------------------------------------------------
Key: RF-9507
URL: https://jira.jboss.org/browse/RF-9507
Project: RichFaces
Issue Type: Task
Security Level: Public (Everyone can see)
Components: component-a4j-core
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
Fix For: 4.0.0.Milestone4
ClientValidator renderer getScript method:
* performs arguments check ( not null, behavior is instance of ClientValidatorBehavior.
* get Converter instance from behavior by getConverter method, then use ClientScriptLookupService to find client-side JavaScript. Both ConverterNotFoundException and ScriptNotFoundException enforce AJAX callback rendering unless input component has no validators.
* If Converter script found, get Collection of validators from behavior. If collection is empty, return null instead of script. Otherwise, loop through all validators to construct client-side validator function, using ClientScriptLookupService. Record number of validators that cannot be performed on client.
* If there is no Converter script or at least one validator has no client-side version, add AJAX callback to client-side validator.
* Find or Create UIValidatorScript in UIView.viewResources associated with "form" target. Create ScriptObject that will be used to build validator call. If UIValidatorScript already contains ScriptObject with same signature use its function name for page size optimization. Problem: JSF 2.0 doesn't like components tree changes, and specification does not allow dynamic including of script libraries. At least, it seems not possible to change controls with client-side validation by AJAX. Solution: use the same way as queue component ( create UIValidatorScript in ViewHandler )
* Return JavaScript code that calls function build by ScriptObject.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months