On 21 April 2013 22:52, DImuthu Upeksha <dimuthu.upeks...@gmail.com> wrote:
> Sorry this is the second part of previous mail > > description : java.lang.String > category : dom.todo.ToDoItem$Category > due by : org.joda.time.LocalDate > > for description and due by properties we can set a Text box and date > picker because they have known data types. But for category, > "dom.todo.ToDoItem$Category" is not a known type. Actually what should > come here is a combo box. Problem is how can I figure it out? > > Looks like you are making good progress if you are asking these sorts of questions! To answer the question, then: if you browse to http://localhost:8080/restful/services/toDoItems/actions/newToDo you'll see that in the "parameters" map (for num=1) the "choices" array lists the available values. Internally, this corresponds to the ActionParameterChoicesFacet (there's also a PropertyChoicesFacet) in the metamodel. I like to test these things using the "Rest Console" extension for Chrome (there are many other similar extensions). So, if you specify the target url of: http://localhost:8080/restful/services/toDoItems/actions/newToDo/invoke and a body of: { "description": "Test", "category": "Professional", "dueBy": null, "cost": null } and submit as a POST, then the new object should be created. HTH Dan > On Sun, Apr 21, 2013 at 2:43 PM, DImuthu Upeksha > <dimuthu.upeks...@gmail.com> wrote: > > Hi Dan > > Yes I think that domain cache is one of the risky areas. Specially > > assigning android data types to properties of Domain objects. I have a > > rough plan for that but have some unclear areas also. > > > > Say I need to add newToDo through > > "http://localhost:8080/restful/services/toDoItems/actions/newToDo" > > So I need to add some parameters (description,category,dueBy) before > > invoking this. > > > > Then I should create an interface to fetch those parameters. > > > > What I can do is searching the data types of those params through > > "described by" link > > " > http://localhost:8080/restful/domainTypes/objstore.jdo.todo.ToDoItemsJdo/actions/newToDo > " > > > > Then I can get canonicalNames of each parameter. > > > > > > > > On Sat, Apr 20, 2013 at 2:14 PM, Dan Haywood > > <d...@haywood-associates.co.uk> wrote: > >> > >> On 20 April 2013 08:32, DImuthu Upeksha <dimuthu.upeks...@gmail.com> > wrote: > >>> > >>> > >>> 1. As I'm new to Isis project I don't know coding conventions you use. > >>> Like packaging and naming classes > >> > >> > >> Our dev env standards are documented here [1]. There are some > templates etc > >> that you can import into Eclipse. If you use some other IDE, then > sorry, > >> we don't have any for those. > >> > >> In terms of package names, if we assume that eventually your code will > >> become part of the Isis codebase, then the package name would be: > >> > >> org.apache.isis.viewer.android.xxx > >> > >> But you might want to put the code under a domain that you own > initially, eg > >> replacing "org.apache.isis" with (your equivalent of) "com.danhaywood". > >> > >> > >> > >> > >>> > >>> 3 If you can give me a existing project which has a good packaging > >>> structure, (a github link) I will be able to refer it and have a clear > >>> idea. > >> > >> > >> My best suggestion is for you to look at Isis itself [2]. In > particular, > >> look at the viewers (wicket, restfulobjects, scimpi). > >> > >> Right now I wouldn't worry about this stuff too much. It's good that > you > >> are thinking about it, but it's not where the project risk lies. If I > were > >> you I'd focus on exploring things that you think are difficult to do, > and > >> spike them. Always better to fail early than late... > >> > >> Cheers > >> Dan > >> > >> > >>> > >>> > >>> Thanks > >>> Dimuthu > >>> > >> > >> [1] http://isis.apache.org/contributors/development-environment.html > >> [2] https://github.com/apache/isis > > > > > > > > -- > > Regards > > > > W.Dimuthu Upeksha > > Undergraduate > > > > Department of Computer Science And Engineering > > > > University of Moratuwa, Sri Lanka > > > > -- > Regards > > W.Dimuthu Upeksha > Undergraduate > > Department of Computer Science And Engineering > > University of Moratuwa, Sri Lanka >