Wouldn't it be a hack to implement it this way?

    PREmbeddedRenderer >> visitQuestionnaire: aStructure
        (aStructure viewComponentClass on: self context)
            structure: aStructure;
            renderContentOn: html

Specifically I'm not sure about #structure: setter for QuestionnaireView... I had to do the following there:

    QuestionnaireView >>

        renderContentOn: html
          self components do: [:each |
            html render: each]
 
        components
          | pollStructure pollCommand pollComponent |
          ^ self polls
            collect: [:each |
              pollStructure := self context structure: each command: POVoteCommand new.
              pollCommand := pollStructure command.
              pollComponent := pollCommand description asComponentOn: pollCommand.
              "..."
              pollComponent]

        polls
          ^ self structure childrenDecoration children
       
        structure
          ^ structure ifNil: [self context structure]

It works so far but I doubt it's a correct away... Though I can't explain/understand why...

One (not the only?) problem is "WAComponentsNotFoundError" while posting the form. It's because #children method of QuestionnaireView is not invoked at all... Any suggestions? Shouldn't I create a special PRWidget for this case? Or go some other way?


--
Dennis Schetinin