myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <we...@gmx.at>
Subject Re: Fwd: some doubts in JSF implementation
Date Thu, 15 Dec 2005 09:17:17 GMT
Hi Manfred,
thans for forwarding this

Going a dynamic javascript route for form alteration, is a huge problem
in JSF, you have to bring the tree into sync (some people managed it
already, the dynamic ajax data table does it, as well as ajax anywhere).

It is way easier to create a a form from the backend dynamically by
influencing the component tree after an event via a simple submit.

The perfect example was posted recently by triggering a submit on a
value change of a drop down box, which in the end alters the form in the
valueChange listener.
(the drop down has a javascript handler which does a simple form submit
and then the value change in the backend is triggered)

I would think twice about doing a dynamic form alteration on the client
side, you open a can of worms there which are hard to tame.

if you cannot live with a full form refresh, look at ajax anywhere, it
might be possible to do it with ajax anywhere to alter the ajaxed part
dynamically on the server thus you get a mixed mechanism (have no
experiences there, but from what I could gather it looks like you could
bend it that way)

Altering the forms from pure javascript is a problem anyway, I did that
a while ago and ran into myriads of IE related problems, which I spent
90% of my time to workaround. In the end the code was a mess. The IE is
somewhat nasty in the DOM tree handling because it mixes windows
controls and native controls and meshes probably internally two dom
trees and event loops into one.


Werner




Manfred Geiler wrote:
> ---------- Forwarded message ----------
> From: silvius <silvius@maas.de>
> Date: 13.12.2005 15:28
> Subject: some doubts in JSF implementation
> To: manolito@users.sourceforge.net
> 
> 
> Hello Manfred,
>     I have some questions on the understanding of Custom Components
> developement
> 
> My requirement is
>        1. The components given by JSF emits the HTML tag like
>              <input type=text"....... >
>                 but i need it like
>              <span class="xx"> <input type="sssss" .... > </span>
> 
>        In this case, should i override the components i want and create
> new components with ENCODE method alone ? can this solve my problem.
> 
>     2. I did the same what i mentioned in step 1.
> 
>     3. Now when the form is submitted, in the requestparameterMap I
> donot see my components.
>           so i created a empty hidden text field and i could see this in
> the requestParameter...
> 
>           So how to bring my custom components to the
> requestParameterTree ?
> 
>     Is it like, my components have <span> in front, so UIForm could not
> understand my components?
>        or any other problem.
> 
> 
>     4. I have a form with 10 input fields. Now when i submit this form
> the JSF implementation can understand its a postback and do other
> things.. right.
>        But i want to POST a different form, which is built by Javascript
> at client and at runtime.
>        this new form is built based on the SHOWN form. So if i want to
> post this form, will this be possible.
>        And How should this be done ?
> 
> These are some of the questions i have ... could you please help me...
> 
> Thanks
> 
> --
> With Warm Regards
> Silvius. D
> ______________________________________
> 
> Right attitudes produce right results
> 
> German Mob:  0049 173  1523767
> German Home: 0049 7158 9565527
> German Off:  0049 711  7791720
> 


Mime
View raw message