hmm.... I don't get it - you usually don't save stuff like id's in the component tree, so how would it help you to apply an id to an item in the component tree?
Or did I get you wrong here? regards, Martin On 1/29/06, Mario Ivankovits <[EMAIL PROTECTED]> wrote: > Hi! > > - If the bean is request-scoped, it forces you to get this parameter > > into every request - a major challenge for postback in JSF. > > > Ok, this is really a problem when using param.name > > - You have to very carefully check incoming parameter values > > for legitimacy (in a way that JSF components often can handle > > automagically) since no validation will be performed by the system. > > > Is there somehting in jsf 1.2 which allows to annotate settters with > validators? > > - Painful coupling between the target page, consuming the URL, > > and the source page, generating the query parameter. > > > Is is really that bad? Using reflection you have the coupling between > url and bean, is this any better? > > So a solution to this might be to set the submittedValue of a component > and let faces do the rest. > What I mean is: > > *) The url points to the view-ID > *) faces will create the view > *) a phase listener (or whatever) will try to lookup the components by > id and set the submittedValue based on the url parameters - as it does > for POST, but for GET too. > *) at least for sure, the url need some informations for faces to call > an actions (eg: _action=cmdLinkId) - or even better, use the already > existent hidden value to pass in the action (dont know the name now, > _jsp_link ?) > > So the url could be something like this: > http://server/ctx/documentView.faces?searchForm.documentId=4711&_action=searchForm.searchDocument > Note: searchForm.searchDocument is the clientId of a command link and > not the bean action method. > > now you are fine, we use the power of the component tree to ensure valid > parameters and are still able to use saveState to transfer the bean from > one request to another. > > The bookmark page can be the page itself, of only a bridge to the real > page as due to the action character faces will still apply any > navigation rule to it. > > The user should be told always to use the id, else any change on the > component tree will result in invalid bookmark urls due to the changed ids. > > For what I know this also requires at first only one change, e.g. > process the GET stuff too. > > To create a link to a bookmarkable page we can extend commandLink wit a > parameter something like javascript=false so it will render like it do > if you configure ALLOW_JAVASCRIPT=false > > --- > Mario > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces