rsacchettini / napier

Automatically exported from code.google.com/p/napier
0 stars 0 forks source link

Resolved Bugs and argument passing problems #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hey i'm happy to tell you that now at 20h20 pm after 4 or 5 hours trying to
solve bugs, it works finally!!!
The dates works with the RichUI DatePicker (very pretty and skinnable).
I have resolved the problem of the custom parameters passing between the
views and controller, vice-versa.

So to avoid searching a solution when you'll need that have a look to the
property view code and the PropertyController code, i have to comment it,
but still that even if on the screen it's just managing a poor calendar, in
the application working principle understanding, it's a big step !

So to summerize this is the thing to do : 
1) To pass a variable as request parameter : declare it in the controller's
method where you want to use it and return it as part of the map where the
domain class is passed, such as property : 
 eg : "return ['property':property, 'myVarialble1':myVarialble1,
'myVarialble2':myVarialble2]"

2) to make a reference to this param in the view, in an text input for eg,
refer to the variable using the name and/or id attribute of the element ,
and define the value attribute with the variable such as following : 
"<richui:dateChooser id="myVariable1" name="myVariable1"
format="dd.MM.yyyy" value="${myVariable1}" />

3) to get the value back from the submitted from use the params map by
calling the property corresponding to your variable : 
such as eg "def newValueOfMyVariableComingFromTheForm = params.myVariable"

It wasn't easy to understand it believe me !

See you Romain Sacchettini

Original issue reported on code.google.com by romato...@gmail.com on 19 Mar 2008 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by skhe...@gmail.com on 27 Apr 2008 at 2:58