Hi all,<br>i have always the same issue in different projects:<br>a component (collectionComponent) render a page divided in two, a box on the left with some button and a list of items, a box on the right which is basically an id to update with an embedded component (cardComponent).<br>
With a (new card) button on the left, the application calls cardComponent wich appears correctly on the right box. The cardComponent is nothing more then a bunch of input text, an upload file form and two buttons (save and cancel).<br>
<br>The following two methods are defined in collectionComponent:<br><br>renderNewCardButtonOn: html<br> <br> (html button)<br> onClick:<br> ((html updater)<br> id: 'cards';<br>
callback: [:r | r render: (self cardComponent: OLCard new)];<br> evalScripts: true);<br> text: 'N'<br><br>cardComponent: aCard<br> <br> cardComponent isNil<br>
ifTrue:<br> [cardComponent := OLCardComponent new.<br> cardComponent<br> card: aCard;<br> collection: self collection]<br> ifFalse:<br> [cardComponent<br>
card: aCard;<br> collection: self collection].<br> ^cardComponent<br><br><br>This is the part that manages the file uploading inside cardComponent.<br><br>renderImageFileUploadOn: html<br>
<br> html<br> tableRow:<br> [html<br> tableData: 'Copertina';<br> tableData:<br> [(html form)<br> multipart;<br>
with:<br> [html fileUpload callback: [:f | coverFile := f].<br> html break.<br> html submitButton text: 'Carica']]]<br>
<br>********************************<br><br>When I hit the upload file button the form disappears instead of letting the user save the model.<br><br><br>My question: it is possible to have such behaviour or when i use an embedded component (via a JS update) i should expect only to be able to render it?<br>
<br><br>Christian<br>