[Seaside] [Mewa & Seaside Application]

Adrian Lienhard adi at netstyle.ch
Sun May 16 10:56:56 CEST 2004


Hi German

I'm not sure if I fully understand what you try to do...
As far as I understand your problem you want to get some web pages from 
the net and display them in your application. What might be a solution, 
is doing the iteration over your urls in the MyClassUI and not in the 
model. You would only ask the model to fetch the page (and do whatever 
needs to be done) and return it. MyClassUI can then set up and store 
the components that will render the pages.

Cheers,
Adrian


On May 15, 2004, at 8:38 PM, German Arduino wrote:

> Hi Guys:
>
> I'm developing a Mewa & Seaside (2.3.2 version) app and have the next 
> question:
>
> I've a class named MyClassUI that is a subclass of WAComponent, and in 
> it's #renderContentOn: method I've something like this:
>
> anchorWithAction: [self myMethod: viewer metaobject 
> baseobject]			text: 'Execute'.
>
> #myMethod:
>
> myMethod: aTask
> 	(self confirm: 'Do you really want to start the Task to
> 	' , aTask instVar1 instVarName asString , '?')
> 		ifTrue: [self session domainmodel myModelMethod: aTask.
> 			self initialize]
>
> In my model I've somthing like this:
>
> myModelMethod: aTask
> 	| aTemp1 aTemp2 |
> 	aTemp1 := aTask instVar1.
> 	aTemp2 := aTask instVar2.
> 	sTemp1
> 		do: [:aTemp2 | self myModelMethod2: aTemp1 with: aTemp2]
>
> And, finally:
>
> myModelMethod2: aTemp1 with: aTemp2
> 	| httpString aReturnPage |
> 	" some processing here "
> 		aReturnPage := HTTPSocket httpShowPage: httpString.
> 			^ aReturnPage]
>
> For each element of the collection aTemp2 I must to execute 
> #myModelMethod2 (HTTPSocket httpShowPage httpString (with a GET string 
> over a web site)) and I want to show the return of each of these 
> HTTPSockets commands in a page of the application.
>
> I don't wants to violate the MVC paradigm writing renderings in the 
> Model, but can't figure out how to solve this question.
>
> Actually the app is a tabbed app and in the rendering of the 
> MyClassUI, the user can press "Execute", the #self confirm show the 
> question and, if the user press OK, then #myModelMethod and 
> #myModelMethod2 of the model are executed and the return page of each 
> #myModelMethod2 is that I must to show to the user.
>
> I hope all the previous be "understandable".
>
> Any help will be appreciated.
>
> Regards.
>
> gsa.
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
>
___________________
Adrian Lienhard
www.adrian-lienhard.ch
www.netstyle.ch



More information about the Seaside mailing list