Hi Rob,
Rob Rothwell wrote:
> Are ViewTabs meant to be used when you have several views you want to
> display within a single WebApplication? Does anyone have an example?
> When I create the following, clicking on ANY of the tabs simply takes me
> to #viewMain:
> MyApp>>tabComponent
> | e |
> e := ViewTabs new.
> e addView: #viewMain description: 'Tab1'.
> e addView: #viewDiagnosis description: 'Tab2'.
> e addView: #viewProcedures description: 'Tab3'.
> ^ e
View name is #main, #diagnosis etc, while #viewMain is a method name to
show that view. This is the reason above code don't work. Otherwise code
is correct and yes, ViewTabs are perfect for switching between views on
the same App, that is, between views of the same domain object.
Janko
>
> and
>
> MyApp>>viewMain
> |e|
> e := WebElement newId: #content.
> e addTextH1: 'My Application'.
> e addBreak.
> e add: self tabComponent.
> e addText: 'Main View'.
> self pageFrameWith: e title: 'My Application'
>
> MyApp>>viewDiagnosis
> |e|
> e := WebElement newId: #content.
> e addTextH1: 'My Application'.
> e addBreak.
> e add: self tabComponent.
> e addText: 'Diagnosis View'.
> self pageFrameWith: e title: 'My Application'
>
>
> MyApp>>viewProcedures
> |e|
> e := WebElement newId: #content.
> e addTextH1: 'My Application'.
> e addBreak.
> e add: self tabComponent.
> e addText: 'Procedure View'.
> self pageFrameWith: e title: 'My Application'
>
> Rob
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
>
Aida@...
>
http://lists.aidaweb.si/mailman/listinfo/aida--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida