Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta1
-
Fix Version/s: 2.0.0
-
Component/s: ICE-Components
-
Labels:None
-
Environment:ICEfaces 2.0
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
Description
Typical ICEfaces 2.0 applications will contain pages with a mixture of h: component with singleSubmit and compat components. The expected behavior from the page developer's point of view will be that the compat components also support singleSubmit. For instance, singleSubmit does not run validators for non-submitting components, whereas partialSubmit does.
The expectation is that users will either use "partialSubmit" if they have an existing code-base written to use it, or else they would use "singleSubmit" tag instead. Using both at the same time is not supported.
The first task for this is to develop test cases that will indicate the current level of support within the compat components for singleSubmit. Basically, a set of pages that use each compat component inside a form with a "singleSubmit=true" tag, and partialSubmit=false on each component.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Initial testing by Nils:
Showcase Conversion Issues
- Extended Components
- Selection
- Multi-box selection only renders one element
- Custom Components
- Calendar
- Some odd double loading
- Not always rendering "selected date" fields.
- Charts
- Resource Problem
- Download Resources
- Resource Problem
- Google Maps
- Generates "value not valid" errors in server console output
- Render not immediately occurring
- Menu Bar
- Change to menu bar orientation not causing immediate render
- Rich Text
- Resource Problem?
- Table
- Row Selection
- 2nd row selection causes request of indefinite length
- Value not valid error thrown
- Enhanced multiple works better, but unreliably
- Layout Panels
- Panel Popup/Confirmation Panel
- Popup doesn't have modal or draggable effects, this is consistent between the original and revised versions
- Stacking Panel
- Changing option doesn't cause render
- Collapsible Panel
- First toggle of a collapsible section works, thereafter causes request of indefinite length
- Tooltip Panel
- Tooltip ice:outputTexts for product images render inline
web.xml in test application was modified: this lead to problems with RichText, OutputResources, and Charts.
Google map does not respond to city selection.
selectOneMenu is submitting on both "blur" and "change" events. This can likely be resolved with some special cases in application.js/enableSingleSubmit.
Modifying the google map demo as follows allows Tokyo and Mexico City to be selected when single submit is active:
<ice:selectOneMenu id="mapCityList"
value="#
"
valueChangeListener="#
">
<f:selectItem itemValue="" itemLabel="#
"/>
<f:selectItem itemValue="Tokyo"/>
<f:selectItem itemValue="Mexico City"/>
<f:selectItem itemValue="#
"/>
<f:selectItem itemValue="#
"/>
<f:selectItem itemValue="#
"/>
</ice:selectOneMenu>
The incompatibility in the gmap demo appears to be due to
javax.faces.partial.execute=iceform:mapCityList
vs
javax.faces.partial.execute=@all
This is resulting in null values for the EL-specified selectItems.
The incompatibility is actually with ice:loadBundle. When the entire component tree is not executed, the ice:loadBundle component is not executed and does not place "msgs" in scope. Replacing this with f:loadBundle should work in most cases.
Change ice:loadBundle to f:loadBundle: ICE-6290
Initial testing shows that JSF 2.1 may not be necessary for dynamic language switching.
Various modifications to singleSubmit handling for experimentation:
+++ old-icefaces/core/src/main/javascript/application.js (working copy)
@@ -271,12 +271,13 @@
if (toLowerCase(element.type) == 'submit')
- ice.setFocus(null);
+ ice.setFocus("");
ice.se(e, element);
+// ice.s(e, element);
}
if (f.addEventListener)
{ - f.addEventListener('blur', submitForm, true); +// f.addEventListener('blur', submitForm, true); f.addEventListener('change', submitForm, true); } else {
f.attachEvent('onfocusout', submitForm);
component-showcase City selection on Google Maps page causes two events to the server for both trunk and singleSubmit version:
0:0:0:0:0:0:0:1%0 - - [25/Nov/2010:16:51:58 -0700] "POST /component-showcase-orig/showcase.jsf HTTP/1.1" 200 2509
0:0:0:0:0:0:0:1%0 - - [25/Nov/2010:16:51:58 -0700] "POST /component-showcase-orig/showcase.jsf HTTP/1.1" 200 1685
The two POST requests in the Google Maps demo may be normal behavior, since they do not occur when the application is run remotely with the wrong (not localhost) google maps key. The second POST may be triggered by the return of the map coordinates from the city selection.
Please test component-showcase.war from http://server.ice:8888/svn/ossrepo/icefaces2/branches/ice-6178 to verify behavior under different browsers.
I have observed a focus problem in "Selection" that I will investigate.
Note that "ace" has been removed from this branch due to build problems.
Comments from Mandeep after testing:
Server: Tomcat6
Browser:FF3.6
Application: compat comp-showcase
Selection: checkbox has problem, only last selected checkbox value is displayed
Text Entry: comment value output is displayed even though there are errors in name and password fields
Collapsible Panel: any collapsible panel cannot be used the second time(open a panel, now user cannot close that panel)
Note: scripts still work.
Selection: this is due to the "execute" restriction: by only executing one of the checkboxes, the state of the others is ignored.
Text Entry: again due to the "execute" restriction: FacesMessages are retained across lifecycles, so are still displayed, but only the one input component is executed, so the previous errors are actually ignored.
Collapsible Panel: the following change allows Collapsible Panel to work. The "source" is apparently not being set by singleSubmit, resulting in the UI Blocker becoming confused. The UI Blocker should be made more robust, but it should also be determined why the source of the event is null.
var stopBlockingUI = noop;
namespace.onBeforeSubmit(function(source) {
//don't block UI for the retrieveUpdate requests
if (null != source && viewIDOf(source) != source.id && isBlockUIEnabled(source)) {
In this case, it looks like JSF is providing a null "source" to the listener (UI Blocker):
jsf.ajax.addOnEvent(function(e) {
switch (e.status)
});
Test results provided by Mandeep:
Selection value are updated only when user interact with another component on the page. for example 'select car' value is updated when user interacts with the drink radio buttons
TextEntry comments value is displayed even when there are errors in name & password
Popup Calendar: value are no submitted right away. for example change 'selection pattern' for popup calendar, notice change is not applied to the date value. now click anywhere on the page, notice the date value is updated according to the 'selection pattern'
Menu Bar: selection is not always submitted. try selecting a few time in Menu Bar. also try to change orientation
Progress Bar: label alignment cannot be changed dynamically. Start progress, now change the alignment, alignment change does not take effect
Download Resources: does not work
Media: changing media type does not always work
Set Event Phase: Select a country, its cities list is not populated. now cick anywhere in the page. corresponding cities list is now populated
Columns: change the number of columns, the table is not updated. now click anywhere in the pg, table is updated according to the number of columns
DataPaginator: change the radio button selection from paging to scrolling, not changes are applied to the page. Now click anywhere on the page, the changes are applied to the page
Position Panel: '<!-- 969-->' redundant text is displayed above the position panel component
GMap: deselect 'show control' no changes are applied to the page. now deselect 'show markers' controls are removed from gmap but markers are still displayed
Charts: change the type of chart selection, no changes are applied to the page, now click anywhere on the page, notice the changes are applied to the page.
Collapsible Panel: only first interaction with the component page works
ice-6178\icefaces revision# 23297
Server: Tomcat6
Bowser: FF3.6
Note: sometimes during testing the application stopped responding, had to reload to make application work again.
problem common with keyboard test and mouse test:
Button & Link: inputtext field had partial submit enable( it should be disabled)
Keyboard test problems:
TextEntry: keyboard can be used fine(known issue with displaying comments even when username & password have errors)
Button & Links:
reset button does not work on pressing enter key
command link does not work on pressing enter key
output link does not work on pressing enter key
selection:
select cars(list): down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page
drink(radio button): can be selected only once by arrow key, after that the focus goes back to entire page
language (checkbox): selections can be made by key board, but output is displayed for the last selected item only(known issue)
select country & cities: down arrow key can be used only once, after that the arrow keys start moving the scroll bar of the page
Calendar: can not select dated by keyboard, cannot open poup calendar
Charts: can not change chart type more than once by using the keyboard
Download Resources: can navigate everything but cannot download anything with enter key
Effects: can not do anything with keyboard
Gmap: can search address & cities fine, checkboxes work ok too, but cannot tab into the map to use its controller (not sure if that possible)
media: can change radio button selection only once
MenuBar: can navigate the menubar fine but cannot select anything by pressing enter key
SetEventphase: can change selections only once by using arrow keys
Tree: can not do anything with the keyboard
Columns: can change the number of coulmns only once
Datapagintor: can not use keyboard to navigate datatpaginator pages
Expandable table: can not collapse or expand table by using keyboard
Sortable table: can not change sort by using keyboard
Row Selection: can not select any row with keyboard
DataExporter: can not get anything to work with keyboard
Stacking panel: can change radio button selection only once
Collapsible Panel: cannot expand or collapse panel by using keybaord
Confirmation Panel: the dat can be save by using the keyboard but confirmation panel is nto displayed before saving. Can not delete any data by using keyboard.
Not valid for testing using keyboard
Tooltip
Position Panel
SplitPanel
Resizable column
Richtext
menuPopup
Modifying application.js to use the following allows focus to be retained in component-showcase:
jsf.ajax.request(element, event,
{render: "@all"});
// ice.se(e, element);
The root cause of loss of focus appears to be the following in submit.js:
//move element from its original place into the single submit form
form.appendChild(element);
Moving the element that is currently focused by the user is likely the source of the problem. Using innerHtml may be an option for cloning the element if DOM APIs are not suitable.
ICE-6340 focuses on focus issue.
Since we already have the compat/samples/component-showcase application, including automated Selenium test scripts, it would be a good place to start. This sample needs to be modified to use the <icecore:singleSubmit> tag inside each form for each component demo, and also to remove the use of any "partialSubmit=true" attributes on any forms or other ice:components in the sample application. Observing the submit behavior of each component demo after this change is made will give us a reasonable initial indication of whether or not the component is behaving as expected.