|
Re: Re: Browser back button solution?: msg#00008text.xml.xforms.chiba.devel
Hello guys, sorry for the delay - you brought up an important topic. But please before going to solutions some remarks about XForms and the back-button. In XForms a form is build around a purpose and uses a model to capture this purpose. The user will work with only one URI during the whole form-filling session. Sure this doesn't mean that you can't have multiple forms or pages but you should keep this in mind when designing XForms apps. One purpose should be caught with one form and not by chaining several forms together. XForms 1.0 does not deal with chained forms at all. This said it should become clear that there's not much room for the back-button in this scenario. But nevertheless back to the scenario... You have send your form1 - what does that mean with XForms? The user has either submitted with replace='all' or used a load action to jump to form2. Now, when the user clicks the backbutton on form2 what should actually happen? You you want to invalidate the decision just taken by the user by leaving form1 with mentioned actions and step back to the start of form1? Or do you want the state back where the user left form-processing (ignoring the last action of the user; the submit or load)? When keeping in mind that this very action may have changed the contents of some database or transactional system somewhere you may imagine that this can be difficult. XForms tries to establish a clean processing model with defined entry and exit points and the backbutton simply does not fit within here. XForms is often thought of being a clientside technology so it's easy to imagine that a native implementation wouldn't allow you to leave your current page (form2 in this case) without confirmation and letting the user know of the consequences (eventually loosing data if not storing somehow) when she hits the backbutton. For the serverside it's a bit more difficult. The actual detection is easy. Just store the referrer header when initializing a form and you're ready to detect if the user left the page with 'back'. The problem is to decide what to do with that - the user is already back on form1 when we get this information. It would be better to not allow the user to navigate away with confirmation. Maybe this can be achieved with Javascript in our upcoming ajaxed implementation. We'll keep this in mind and are surely open for your suggestions. Martin Tilma wrote: Hello Michael,That's not right. The back-button won't work in most webapps when forms are using POST. You can often watch this in internet apps. You'll get a browser warning and most often the re-submittal of the form will fail. Especially when forms are statefull in some way and manage their values with hidden fields this will fail. There are frameworks that hack around this by implementing sophisticated state tracking but plain htmlforms just have a problem when using POST. This would be a way i think. And we're definitely consider such an option for the future. Not just for the back-button problem but simply to allow one user to use multiple forms at a time. Can't follow you here with the 'singleton' XForms. As i tried to explain at the start of the mail you've to answer the question what a resubmit really *should* mean then. XForms work on instance-data and there's a defined model how and when instance-data are changed. When submitting you intention is to persist (or mutate) this state. This change can also be seen as a user-confirmed change of the data. Maybe i completely miss the point here ... if so, please explain what you're trying to accomplish (but cloning of ChibaBean won't hardly be the right way of doing it). Joern
------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: R: Web Services integration into Chiba: 00008, Ulrich Nicolas Lissé |
|---|---|
| Next by Date: | Code in CVS will not compile.: 00008, Patrick Kimber |
| Previous by Thread: | Re: R: Web Services integration into Chibai: 00008, Ulrich Nicolas Lissé |
| Next by Thread: | Code in CVS will not compile.: 00008, Patrick Kimber |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |