[Seaside] Problem with Ajax evaluator

Sebastian Van Lacke svanlacke at caesarsystems.com
Mon Apr 27 15:06:32 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?

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];
    ((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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090427/4dd2fcda/attachment.htm

More information about the seaside mailing list