David

Apologies for any confusion caused, but I was kind of expecting to hear 
where I was going wrong myself.
In order for the Slot's action getDefaultView to be "heard" you do need 
you do need isSimple on the action.
If you can't change the getDefaultView() what can you do??

David Zülke wrote:
> Craig,
>
> I'm afraid most of the stuff below is confusing, misses the point and 
> is factually wrong (e.g. the part about slots having to be "simple").
>
> It would also be nice if you could write text-only emails with proper 
> multi-level quoting.
>
> Thanks,
>
> - David
>
>
> On 24.02.2009, at 10:28, Craig Fairhurst wrote:
>
>> 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
>>> [email protected]
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.agavi.org/mailman/listinfo/users


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

Reply via email to