[Building Sakai] Extend Site Dataset through tool?

Steve Swinsburg steve.swinsburg at gmail.com
Wed Aug 14 18:27:20 PDT 2013


Hi,

Yep thats the code you want.
You then issue a save and the props will get saved for you.

You could modify the worksite setup tool to add a few extra form fields,
then collect them and persist them. You could also add in a new screen
altogether as part of the site creation workflow and have all of the fields
on that. The tool is written in Velocity - its pretty simple to hook in a
new vm template and then have a method to do what you need and pass control
back to the. Have a look at SiteAction.java (site-manage project) and the
various .vm files for sitesetup.

cheers,
Steve


On Thu, Aug 15, 2013 at 8:10 AM, Michael Mertins <mertins at zedat.fu-berlin.de
> wrote:

> Hi,
> thanks for your input.
>
> I see things like
>
>  ResourcePropertiesEdit rp = site.getPropertiesEdit();
>  rp.addProperty(PROP_SITE_LANGUAGE, locale_string);
>
> So I think that is a very good idea. But where would I fill the properties
> if I want every new site to have the properties (filled with a different
> value of course) and where would I expose the properties?
>
> I'm quite new to Sakai development and usually I would presume I can
> address an API and write my own program (or here tool?) to extend the
> behaviour. From what it looks like now, I could also create my own add
> site dialogue and action and site lookup but that would be also quite
> complicated if I don't know which classes I could extend. The source code
> is still all but conspicuous to me Sakai noob.
>
> Would be very happy if you could go a bit into detail.
>
>
>
> Michael
>
>
> > Hi,
> >
> > There are site properties which are designed for this sort of thing. You
> > could surface the properties through the existing UI's with a bit of code
> > to get them and present them. Then you don't need to handle any backend
> > code because the properties (ResourceProperties and
> > ResourcePropertiesEdit) handle all of that for you.
> >
> > cheers,
> > Steve
> >
> >
> >
> > On 14/08/2013, at 10:32 PM, Michael Mertins <mertins at zedat.fu-berlin.de>
> > wrote:
> >
> >> Hi,
> >> how would you generally extend the dataset of sites in Sakai? I would
> >> like
> >> to add new fields to sites in order to reflect various nomenclature
> >> requirements for our courses.
> >> Would such a thing be possible through making a tool? If so, how can I
> >> integrate the tool into the Sakai add site dialogue so it could catch
> >> the
> >> additional fields?
> >>
> >> Hope you can point me in the right direction of what's usually done in
> >> such a case.
> >>
> >> Best,
> >>
> >> Michael
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> sakai-dev mailing list
> >> sakai-dev at collab.sakaiproject.org
> >> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> >>
> >> TO UNSUBSCRIBE: send email to
> >> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> >> "unsubscribe"
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130815/fe53dc60/attachment.html 


More information about the sakai-dev mailing list