Re: Editable Widgets stuff
Paul Everitt <paul-+XpZaIz3/[email protected]> Mon, 10 Mar 2003 13:28:25 +0100
| Newsgroups | gmane.comp.cms.oscom.twingle.devel |
|---|---|
| Message-ID | <[email protected]> |
On Monday, Mar 10, 2003, at 11:43 Europe/Paris, Christian Stocker wrote: > Just commited a new interface for editable widgets (midaseditor, > sourceeditor, etc...) Excellent stuff. Once we get this hooked up to some live content, we'll be ahead of where we should be at the *end* of the sprint! > The following is subject to changes.... > > We now have a viewerwidget, which contains the tabs and the content of > those. All viewerwidgets should extend from > genericviewer.xml#genericviewerbinding > so this would look like > <binding id="articleviewerbinding" > extends="genericviewer.xml#genericviewerbinding"> Right. When adaption Twingle to your CMS, you should start by "subclassing" this widget. You can then override the parts you need to change. > for the articleviewer (in editorbindings.xml) > > then <xul:tabs> needs an oncommand event: > <xul:tabs > oncommand='document.getBindingParent(this).onTabsClick(this);'> > > in <xul:tabpanel>s, we need to make a widget for every "content" of a > panel: > <xul:tabpanels> > <xul:tabpanel flex="1"> > <xul:midaseditor flex="1" /> > </xul:tabpanel> > <xul:tabpanel flex="1"> > <xul:sourceeditor flex="1" /> > </xul:tabpanel> > etc.. > > each of these widgets should inherir from > genericviewer.xml#genericwidget and have to provide a method called > "update". This method has to do the update of the content of the > method. Bingo. I guess we'll have an implementation in genericviewer that does an HTTP PUT. Perhaps, if it can detect that the site/resource supports DAV, it might do a HEAD/LOCK/PUT/UNLOCK/HEAD sequence (like cadaver does). Wiring up access to live data is my focus for today. We can either do live data in the "Local Site" (in the profile dir) or wire up access to the OSCOM Test Site. The latter would mean the following steps: 1) Put some dummy content up there in a shallow hierarchy. 2) Write a static RDF for this content, with urn values set to the URL for each item. 3) Get Christian's stuff to support getting a URL from RDF resource. 4) Work on PUT (perhaps Christian has already done this). > In sourceeditor this looks just like the following: > > <method name="update"> > <body> > this.content = this.parentWidget.content; > return true; > </body> > </method> > > Furthermore, we need a property called "content". It has to have a > reader (parentWidget will read it) and can have a setter, if you want > use that internally (as above): > > <property name="content"> > <getter> > return(this.sourceFrame.value); > </getter> > <setter> > this.sourceFrame.value = val; > </setter> > </property> > > That's about it, what's needed as public methods/properties for the > moment I'll comment on this later. :) --Paul