Hi Dan.

Yes. In parameters map there is choices list. Then I can understand
that it is a list to be shown (In gui : A combo box). But when we look
at the other two attributes (num :0 ,num :2) there is not a way to
understand what should be the input type (a text box, date picker or
other UI element). So what I understood is, we have to dig in to the
"described by" link and find out data types of other two data
parameters. Then the logic is

1. First look in to parameters map and look for properties with
"choices" tag. If so, in gui level it should be a combo box with
values in "choices" tag.
2. For other properties with not having "choices" tag you have to find
out its data types by looking in to "described by" link. [1] >> [2] >>
[3] >> [4]. Then I can find the data type. (In this case it is a
String)

Though this is a simple logic I feel bit confused. This approach may
be ok to this scenario. But may not compatible with some cases (I feel
so). Please tell me if I'm wrong.

As soon as I solve this problem I will start writing my proposal
because the application period has started.

[1] http://localhost:8080/restful/services/toDoItems/actions/newToDo
[2] 
http://localhost:8080/restful/domainTypes/objstore.jdo.todo.ToDoItemsJdo/actions/newToDo
[3] 
http://localhost:8080/restful/domainTypes/objstore.jdo.todo.ToDoItemsJdo/actions/newToDo/params/Description
[4] http://localhost:8080/restful/domainTypes/java.lang.String

Thank You
Dimuthu

On Sun, Apr 21, 2013 at 11:22 PM, Dan Haywood
<d...@haywood-associates.co.uk> wrote:
>
>
> 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
>
>



-- 
Regards

W.Dimuthu Upeksha
Undergraduate

Department of Computer Science And Engineering

University of Moratuwa, Sri Lanka

Reply via email to