[Seaside] calling components inside an updated ajax div
Cédrick Béler
cdrick65 at gmail.com
Thu Nov 27 11:15:58 UTC 2008
not sure but it might be that you need to put evalScripts: true. at
leat for the first example in the updater and if you use some js in
#renderUserDataOn:
SUUpdater>>evalScripts: aBoolean
"This determines whether <script> elements in the response text are
evaluated or not. The default implementation of Prototypes does not
evaluate script, however this implementation changes this odd
behavior."
hth,
Cédrick
2008/11/27 christian ponti <pontichristian at gmail.com>:
> Hello list,
> I have an application with a login system (basically from the tutorial)
> where the logged in user can configure some "stuff".
> The view is divided in four blocks, an administration box on the left, a
> centered working box, a modules box on the right and another bottom box.
> I have the same problem in two situation: from the administration box an
> anchor which calls a component with user configuration purposes and updates
> the central box where the component is rendered.
>
> (html anchor)
> onClick:
> ((html updater)
> id: 'central';
> callback: [:renderer | self
> renderUserDataOn: renderer]);
> with: 'Change User Data'.
>
> i can modify the user data and submit change without problem but after
> clicking the submit button the component disappear, this without the
> classical self answer.
>
> In the same way, at least in my opinion, on the right I can drag an image
> (representing my module) to the bottom box, where on dropping the code
> updates two divs, the bottom box itself where the dropped image is shown,
> and the central box where I want to be able to start the module
> configuration, calling some components.
> The updating code is:
>
> ^(html evaluator)
> triggerPassenger:
> [:value |
> self addModule: value.
> self moduleConfiguratorComponent setModule: value];
> callback:
> [:script |
> (script element)
> id: id;
> render: [:renderer | self renderModuleOn: renderer].
> (script element)
> id: 'central';
> render: [:renderer | self
> renderModuleConfiguratorOn: renderer]]
>
> the central box is diplayed but at this point when I click a submit button,
> which calls another component, as mentioned before the component disappears,
> but the called componed is not displyed.
>
> In both cases calling the components directly ends with a correct behaviour.
>
> Any idea why this happens?
>
> Christian
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
--
Cédrick
More information about the seaside
mailing list