Benjamin

Interesting that you ask this. I'm doing something similar with Widgits / Forms in Widgets. I'm particular intrigued by what response you will get too:
Also on the view part how would i add the widget's input fields to the main view? I think using a slot would be the best way here. 

Using a Slot (this is basically a Widget?) means the Slot's action must be run as isSimple () otherwise getDetaultView() will not work.
When the action isSimple, this means that:
"Simple" Actions are not executed; no validation is performed, no filters are run (and thus no security filter!), and no request data is available except for explicit arguments given to the Execution Container (which, obviously, don't have to be validated in this case in order for them to be accessible).

Like you say you need to POST to the main action, which is where the execute*() functions et al are. I have executeWrite() and handleError(). Then like you say, you will need access to data that may not be in the form fields but will relate directly to the form (is this what you say?)
If you imagine the scenario for a second, you will see that we can't just store the name of the form in $user because what if the same form is rendered twice in the same session and not submitted one after the other. So when generating the form, create a unique id, pass it as a GET parameter into the form's action and then validate it at the other end. Then using this "reference" place all the data you need in the $user object.
Then that lets you, in the Success and Error Views, pass back to the original form using information stored in the object, and so on:
$this->createForwardContainer('module',....);

Hope this was of some help.


Benjamin Börngen-Schmidt wrote:
Hello List,

normally I have my froms in the input template, display it and submit the form's data to the action and so on.
But now I came to a point in my project, where it would be helpful to dynamicly create forms ie. taking in accout the credentials of a user etc. 
My current Plan how to implement this is, that I'll have a main and widget actions which return on a read request the input template with the fields. So far so good. 
Let's also assume that the main action and view knows which widgets need to be called. 

Now when i post the Form it will be submitted to the main action, which of course does not know about the the parameters of the widget actions thus can not validate them. So i somehow have to register the validators of widgets or would it be enough to somehow run those widget actions and they then validate the params from the global requestdata?
Also on the view part how would i add the widget's input fields to the main view? I think using a slot would be the best way here.  

I think my question is somehow similar to those Michal already asked on the List, but yet I haven't fully understood it.

Thanks Folks for creating such a sweet Framework and answering all questions so pariently.
---
Benjamin Börngen-Schmidt




_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users


--

Craig Fairhurst
Call 01200 422 533 Fax 01200428726
Mobile 07912079370 Skype craigfairhurstuk

Web http://www.youds.com


YOUDS MEDIA

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. YOUDS Media, Fern Court, Clitheroe, Lancashire BB7 1BE http://www.youds.com



_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to