Default view in WebApplication

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Default view in WebApplication

Facundo Ciccioli
Hi.

I've been just trying to make the default view of an object be other
than main, and finally got it. I thought it would be enough to define
the class message #defaultView in my own WebApp (MyClassApp), but this
didn't sufficed. Looking around I ended up finding that the #view:
message sets the view instance variable to 'main' if you try to set
the view to '' (empty string). There was the problem. I'm thinking
that message should set view to self defaultView instead of the
hardcoded 'main' in the forementioned case.

Just trying to help. Sorry if I'm completely off.

Greets,
FaQ
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Default view in WebApplication

Janko Mivšek
Hi Facundo,

Facundo Ciccioli wrote:

> I've been just trying to make the default view of an object be other
> than main, and finally got it. I thought it would be enough to define
> the class message #defaultView in my own WebApp (MyClassApp), but this
> didn't sufficed. Looking around I ended up finding that the #view:
> message sets the view instance variable to 'main' if you try to set
> the view to '' (empty string). There was the problem. I'm thinking
> that message should set view to self defaultView instead of the
> hardcoded 'main' in the forementioned case.
>
> Just trying to help. Sorry if I'm completely off.

No no, good observation and I agree, we need to recheck and clean up
that code in the direction you propose.

What I'd like to know is the reason, why you changed the name of default
view from #main at all?

Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Default view in WebApplication

Facundo Ciccioli
Hi Janko.

Yours is a fair question. When I started doing the interface to my
model, it was only that: *one* interface to the model. Then they told
me that what I was doing should be an expert mode interface, and that
I had to build a "wizard" mode interface, all to the same model. So,
the old, expert interface remained in the main view, and I started
making the new one in a view called, surprisingly, wizard. After that,
they wanted to make the wizard interface the default page when
accessing the domain were the site is, hence I had to change the
default view to be wizard instead of main (among other things). I
could have swaped both views and made main become expert and wizard
become main, but that implied changing every link to those two views.
Besides, I thought: there *have to* be a way to change the default
view :P.

Speaking of which, I found something else that may have to be changed
in order to make changing the default view possible. It's the #view:
message in the WebLink class. It prevents setting the view if your are
setting it to 'main'. I changed that to verifying if you are trying to
set it to self app defaultView. I hope this doesn't bring any side
effects.

Salutations,
FaQ

2009/1/20 Janko Mivšek <[hidden email]>:

> Hi Facundo,
>
> Facundo Ciccioli wrote:
>
>> I've been just trying to make the default view of an object be other
>> than main, and finally got it. I thought it would be enough to define
>> the class message #defaultView in my own WebApp (MyClassApp), but this
>> didn't sufficed. Looking around I ended up finding that the #view:
>> message sets the view instance variable to 'main' if you try to set
>> the view to '' (empty string). There was the problem. I'm thinking
>> that message should set view to self defaultView instead of the
>> hardcoded 'main' in the forementioned case.
>>
>> Just trying to help. Sorry if I'm completely off.
>
> No no, good observation and I agree, we need to recheck and clean up
> that code in the direction you propose.
>
> What I'd like to know is the reason, why you changed the name of default
> view from #main at all?
>
> Janko
>
> --
> Janko Mivšek
> AIDA/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida
>
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida