You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by Bob Schellink <sa...@gmail.com> on 2009/06/29 23:14:50 UTC

Example improvements

Ted Husted suggested the following enhancements to Click examples.

I'm including them here as its easier to track the changes.

Ted Husted wrote:
> ----
>
> Click Examples
>
> To try the bleeding edge, I grabbed the latest Jetty 7.0.0.ME, dropped
> in the WAR, and stepped through with IE8 (64 bit).
>
> On Advanced Table, this may be the expected behavior, but after
> viewing or editing a record on a page other than one, the system
> always returns to page one. (Same in IE8, FF3, oP9) Refreshing the
> page, after a change by another client, does bring up the current page
> with the change. Editing also clears any custom sort (i.e. by ID).

Fixed. The Table's "edit" ActionLink now passes the page and sort state 
to the
EditCustomer page which stores these values in HiddenFields, thus the state
is preserved when flow is returned to the AdvancedTable page.

>
> On Advanced Form, I created a new customer record, but it did not save
> my Investments. Tried IE8 and FF3. (Note that in Advanced Form, the
> Investment list is not an outline, but a flat list.)

Fixed. The Field was called "investment" instead of "investments", which is
what the Customer property is called.

> I assume the expected behavior is that changes are not persisted
> across sessions (since mine were not).

Yes this is as expected. Click, by default is stateless and thus no 
state are
stored in the session. Click supports stateful pages which allows for more
interaction. Stateful pages are stored in the session and will be preserved
between sessions (if the container persists the session). The following 
examples
demonstrate stateful Pages:

  /table/search-table.htm
  /table/table-styles.htm
  /wizard/wizard.htm

>
> Jetty 7 does not include does not include the Jasper JAR, which was
> faithfully reported on startup, sO I did not test the JSPs. The system
> did fail gracefully with a HTTP 500 and the message "Problem accessing
> /click-examples/border-template.jsp. Reason: JSP support not
> configured"
>
> Wizard - Not a defect, but I half-expected the Ajax autocomplete to
> kick in for the Suburb field.

Unfortunately the Autocomplete field doesn't work well with stateful Pages.
However there is a Click extensions project in the works that provides full
Ajax integration and contains an Autocomplete field that works with both
stateless and stateful pages.

> Control Head Demo - In IE8 only, failed to display multiple starts. OK
> in FF3. (IE compatibility mode didn't help.) Of course, I don't expect
> us to fully support IE8 in this release.

Fixed.

> Field Set Demo - Doesn't seem to be validating the Expry. (Does
> validate the card number as to format.)

Fixed.

> File Upload - The example seems to expect both Browse file fields
> filled in. If one is omitted, it clears the other. No big, but rude.
> (Oddly, it doesn't clear the descriptions.) Tried IE8 and FF3.

Agreed not nice. However this is a limitation of browsers file upload
functionality. Its not possible to set the value of a <input type="file">
element. If I recall correctly, the reason for this is because of security
concerns. Otherwise an attacker will be able to upload files from an 
unsuspecting
users machine.

I've changed the example a bit and removed the required fields making it
easier to try out.

> Search Form - Not really a defect, but an enhancement might be to
> validate the input. For example, entering text for ID raises an SQL
> error (which is gracefully presented by the click error handler).

Fixed.

> List Panel - Is the third custom list suppose to stack across the
> screen to the right (like an inverted Jenga tower)?
Fixed.


Thanks for the suggestions Ted.


bob