donderdag 20 augustus 2009

Looking for parameters settings on a hst component

Finding all components with a certain parameter setting,
You can use in cms/repository:
//*[@hst:parametervalues='value']

woensdag 19 augustus 2009

Removing meta files

Note:
Removing meta.xml files for a gallery import from a dav export:
find . -iname '*.meta.xml' -exec rm '{}' \;

woensdag 5 augustus 2009

HippoOnRails: Experiment 2

Introduction


In this experiment I'll show you how you can set up your own application within 15 minutes, with Hippo on Rails.

Prerequisite


For this to work you will need to have set up a working HippoOnRails example project.

Start up


Start the cms: mvn jetty:run-war

Open up the console and add another node to the root node, call it ToDos

Start the ruby server: jruby script/server

Next open up a console and generate the code with the normal ruby scaffold:
jruby -S script/generate scaffold todo deadline:date title:string description:text

Open up the model and extend the todo model from the jcr, add the columns (plus id column) and the table name, it should end up looking link this:
The set_new_record method is necessary to edit the node values, instead of creating new values each time. This is a result of the hack were using to set up this experiment.

Don't forget to ad an id column, rails needs this to create the urls for your model.

Now fire up your webbrowser once again, point it to http://localhost:3000/todos, and see your results.

This is it, it's this easy to set up a very basic application in HippoOnRails.

If you have any problems setting this up, don't hesitate to ask for help with your HippoOnRails experiment on our forum.