[Seaside] Problem with Ajax evaluator

Lukas Renggli renggli at gmail.com
Mon Apr 27 16:40:08 UTC 2009


> Hi, I am having a problem with ajax. I'm using an evaluator to update some
> parts of my page, everything going well, except for a few graphics made with
> the Google charts API. All the callbacks are executed, and executes the
> rendering code correctly , but the change is not displayed until I make a
> complete refresh. Any idea what could be happening?

It sounds like the Google Charts API is not evaluated.

What version of Seaside are you using? What platform? What did FireBug say?

Lukas


>
> QuestionnaireComponent >> renderGraphicsOn: html
>
>  html div id: 'graphics'; with: [
>     html heading level: 4; with: 'Score for team'.
>    html div id: 'teamsGraphic'; with: [
>     self renderTeamsScoreGraphicOn: html.
>    ].
>    html heading level: 4; with: 'Score for metric'.
>    html div id: 'metricsGraphic'; with:[
>     self renderMetricsScoreGraphicOn: html
>    ]
>   ]
>
> QuestionnarieComponent >> renderPossibleAnswersForQuestion: question
> withIndex: index on: html
>
> html form:[
>   (html select)
>    id: index asString;
>    list: question answers;
>    labels: [:each | each text];
>    selected: (questionnaire choiceForQuestion: question) answer;
>    callback: [:value | selection := value];
>    onChange:
>     ((html evaluator)
>      triggerFormElement: index asString;
>      callback: [:script |
>       questionnaire answer: question with: selection by: self session user
> username.
>       (script element)
>        id: 'personDiv' , index asString;
>        update: [:r | r text: 'answered by ' , (questionnaire
> choiceForQuestion: question) person].
>       (script element)
>        id: 'scoreDiv';
>        update: [:r | self renderScorePanelOn: r].
>       (script element)
>        id: 'submitButton';
>        update: [:r |  self renderEvaluateButtonOn: r ].
>       (script element)
>        id: 'teamsGraphic';
>        update: [:r | self renderTeamsScoreGraphicOn: r].
>       (script element)
>        id: 'metricsGraphic';
>        update: [:r | self renderMetricsScoreGraphicOn: r].
>       (script element)
>        id: 'submitButton';
>        update: [:r |  self renderEvaluateButtonOn: r ]])]
>
> ---------------------------------------------------------------------------------------------------------------------------
>
> QuestionnaireComponent >> renderTeamsScoreGraphicOn: html
>
>  html render: teamsComponent
>
> -------------------------------------------------------------------------------------------------------------------------
>
>
> Sebastián Van Lacke
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list