You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Vishma Senadhi Dias <vi...@cse.mrt.ac.lk> on 2016/01/25 12:44:05 UTC

JAXB annotated classes as domain objects

Hi,
  I need some assistance with displaying web ui according to the SOAP 
response.
Simple Example:
      Let's say I have a JAXB annotated object called "Temperature". I 
have a SOAP web service which needs a place co-ordinates as an input and 
returns Temperature value as an Output. I have written a JAX-WS client 
to capture this response and send this inputs on a seperate project.

What I had planned is to create JAXB annotated Temperature object in Dom 
package and update the list via Fixtures. These Fixtures are created 
according to the response. But I cannot update Temperature List with 
JAXB annotations.

Can you please suggest a proper way to fulfill my task? Sorry if some 
details are not clear as I'm still new to this framework. I'm using 
simple archetype archetypeVersion=1.11.0 and wicket viewer.

Thanks in advance.

Re: JAXB annotated classes as domain objects

Posted by Stephen Cameron <st...@gmail.com>.
re: 'domain objects non-editable by default', how would this differ from
presently? You have to click Edit to be able to change anything on a domain
object, that can be changed, so to my mind this is already the situation.



On Fri, Jan 29, 2016 at 10:13 AM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Vishma,
> At the moment JAXB view models are immutable; only view models that
> explicitly implement ViewModel.Cloneable are "editable".
>
> That said, Willie (I think it was) also raised the same issue, and I've
> raised ISIS-1299 [1] to see if we can fix that.
>
> As an aside though, our personal experience is to use actions on objects
> rather than the edit capability... it helps drive the conversation as to
> why the business user wants to change the data.  I can see in the future
> that we might make domain objects non-editable by default (perhaps for Isis
> 2.0, in 2017 sometime).
>
> Thx
> Dan
>
>
> [1] https://issues.apache.org/jira/browse/ISIS-1299
>
> On 26 January 2016 at 05:14, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
> wrote:
>
> > Hi Dan,
> >
> > Can you please tell me a way to enter data into a view model? I cannot
> > find a way to update contents of the view model created via JAXB
> > annotations.
> >
> > On 1/25/2016 5:25 PM, Dan Haywood wrote:
> >
> >> Hi Vishma,
> >>
> >> What's the objective here... what do you want the end user to be able to
> >> do, and what do you want to be shown in the app?  What's are the domain
> >> concepts involved?
> >>
> >> Perhaps you could share some of the code you've written thus far to help
> >> us
> >> understand.  If you can upload what you have as a simple example on
> >> github,
> >> so much the better.
> >>
> >> You also mentioned fixtures ... just to say that these are intended for
> >> setting up the system for either prototyping or testing, they aren't
> >> generally intended to be for use in the "production" app itself.  Wasn't
> >> sure from your mail if this was clear to you or not.
> >>
> >> Thx
> >> Dan
> >>
> >>
> >> On 25 January 2016 at 11:44, Vishma Senadhi Dias <
> vishma.12@cse.mrt.ac.lk
> >> >
> >> wrote:
> >>
> >> Hi,
> >>>   I need some assistance with displaying web ui according to the SOAP
> >>> response.
> >>> Simple Example:
> >>>       Let's say I have a JAXB annotated object called "Temperature". I
> >>> have
> >>> a SOAP web service which needs a place co-ordinates as an input and
> >>> returns
> >>> Temperature value as an Output. I have written a JAX-WS client to
> capture
> >>> this response and send this inputs on a seperate project.
> >>>
> >>> What I had planned is to create JAXB annotated Temperature object in
> Dom
> >>> package and update the list via Fixtures. These Fixtures are created
> >>> according to the response. But I cannot update Temperature List with
> JAXB
> >>> annotations.
> >>>
> >>> Can you please suggest a proper way to fulfill my task? Sorry if some
> >>> details are not clear as I'm still new to this framework. I'm using
> >>> simple
> >>> archetype archetypeVersion=1.11.0 and wicket viewer.
> >>>
> >>> Thanks in advance.
> >>>
> >>>
> >
>

Re: JAXB annotated classes as domain objects

Posted by Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>.
Happy to hear that. Will be waiting till the 1.12.0 release.

Best Regards,
Vishma.


On 3/11/2016 4:19 AM, Dan Haywood wrote:
> fyi, I've tackled ISIS-1299, so in 1.12.0 any JAXB view models will be
> implicitly editable.
>
>
>
> On 28 January 2016 at 23:13, Dan Haywood <da...@haywood-associates.co.uk>
> wrote:
>
>> Hi Vishma,
>> At the moment JAXB view models are immutable; only view models that
>> explicitly implement ViewModel.Cloneable are "editable".
>>
>> That said, Willie (I think it was) also raised the same issue, and I've
>> raised ISIS-1299 [1] to see if we can fix that.
>>
>> As an aside though, our personal experience is to use actions on objects
>> rather than the edit capability... it helps drive the conversation as to
>> why the business user wants to change the data.  I can see in the future
>> that we might make domain objects non-editable by default (perhaps for Isis
>> 2.0, in 2017 sometime).
>>
>> Thx
>> Dan
>>
>>
>> [1] https://issues.apache.org/jira/browse/ISIS-1299
>>
>> On 26 January 2016 at 05:14, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
>> wrote:
>>
>>> Hi Dan,
>>>
>>> Can you please tell me a way to enter data into a view model? I cannot
>>> find a way to update contents of the view model created via JAXB
>>> annotations.
>>>
>>> On 1/25/2016 5:25 PM, Dan Haywood wrote:
>>>
>>>> Hi Vishma,
>>>>
>>>> What's the objective here... what do you want the end user to be able to
>>>> do, and what do you want to be shown in the app?  What's are the domain
>>>> concepts involved?
>>>>
>>>> Perhaps you could share some of the code you've written thus far to help
>>>> us
>>>> understand.  If you can upload what you have as a simple example on
>>>> github,
>>>> so much the better.
>>>>
>>>> You also mentioned fixtures ... just to say that these are intended for
>>>> setting up the system for either prototyping or testing, they aren't
>>>> generally intended to be for use in the "production" app itself.  Wasn't
>>>> sure from your mail if this was clear to you or not.
>>>>
>>>> Thx
>>>> Dan
>>>>
>>>>
>>>> On 25 January 2016 at 11:44, Vishma Senadhi Dias <
>>>> vishma.12@cse.mrt.ac.lk>
>>>> wrote:
>>>>
>>>> Hi,
>>>>>    I need some assistance with displaying web ui according to the SOAP
>>>>> response.
>>>>> Simple Example:
>>>>>        Let's say I have a JAXB annotated object called "Temperature". I
>>>>> have
>>>>> a SOAP web service which needs a place co-ordinates as an input and
>>>>> returns
>>>>> Temperature value as an Output. I have written a JAX-WS client to
>>>>> capture
>>>>> this response and send this inputs on a seperate project.
>>>>>
>>>>> What I had planned is to create JAXB annotated Temperature object in Dom
>>>>> package and update the list via Fixtures. These Fixtures are created
>>>>> according to the response. But I cannot update Temperature List with
>>>>> JAXB
>>>>> annotations.
>>>>>
>>>>> Can you please suggest a proper way to fulfill my task? Sorry if some
>>>>> details are not clear as I'm still new to this framework. I'm using
>>>>> simple
>>>>> archetype archetypeVersion=1.11.0 and wicket viewer.
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>>


Re: JAXB annotated classes as domain objects

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
fyi, I've tackled ISIS-1299, so in 1.12.0 any JAXB view models will be
implicitly editable.



On 28 January 2016 at 23:13, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Vishma,
> At the moment JAXB view models are immutable; only view models that
> explicitly implement ViewModel.Cloneable are "editable".
>
> That said, Willie (I think it was) also raised the same issue, and I've
> raised ISIS-1299 [1] to see if we can fix that.
>
> As an aside though, our personal experience is to use actions on objects
> rather than the edit capability... it helps drive the conversation as to
> why the business user wants to change the data.  I can see in the future
> that we might make domain objects non-editable by default (perhaps for Isis
> 2.0, in 2017 sometime).
>
> Thx
> Dan
>
>
> [1] https://issues.apache.org/jira/browse/ISIS-1299
>
> On 26 January 2016 at 05:14, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
> wrote:
>
>> Hi Dan,
>>
>> Can you please tell me a way to enter data into a view model? I cannot
>> find a way to update contents of the view model created via JAXB
>> annotations.
>>
>> On 1/25/2016 5:25 PM, Dan Haywood wrote:
>>
>>> Hi Vishma,
>>>
>>> What's the objective here... what do you want the end user to be able to
>>> do, and what do you want to be shown in the app?  What's are the domain
>>> concepts involved?
>>>
>>> Perhaps you could share some of the code you've written thus far to help
>>> us
>>> understand.  If you can upload what you have as a simple example on
>>> github,
>>> so much the better.
>>>
>>> You also mentioned fixtures ... just to say that these are intended for
>>> setting up the system for either prototyping or testing, they aren't
>>> generally intended to be for use in the "production" app itself.  Wasn't
>>> sure from your mail if this was clear to you or not.
>>>
>>> Thx
>>> Dan
>>>
>>>
>>> On 25 January 2016 at 11:44, Vishma Senadhi Dias <
>>> vishma.12@cse.mrt.ac.lk>
>>> wrote:
>>>
>>> Hi,
>>>>   I need some assistance with displaying web ui according to the SOAP
>>>> response.
>>>> Simple Example:
>>>>       Let's say I have a JAXB annotated object called "Temperature". I
>>>> have
>>>> a SOAP web service which needs a place co-ordinates as an input and
>>>> returns
>>>> Temperature value as an Output. I have written a JAX-WS client to
>>>> capture
>>>> this response and send this inputs on a seperate project.
>>>>
>>>> What I had planned is to create JAXB annotated Temperature object in Dom
>>>> package and update the list via Fixtures. These Fixtures are created
>>>> according to the response. But I cannot update Temperature List with
>>>> JAXB
>>>> annotations.
>>>>
>>>> Can you please suggest a proper way to fulfill my task? Sorry if some
>>>> details are not clear as I'm still new to this framework. I'm using
>>>> simple
>>>> archetype archetypeVersion=1.11.0 and wicket viewer.
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>
>

Re: JAXB annotated classes as domain objects

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Vishma,
At the moment JAXB view models are immutable; only view models that
explicitly implement ViewModel.Cloneable are "editable".

That said, Willie (I think it was) also raised the same issue, and I've
raised ISIS-1299 [1] to see if we can fix that.

As an aside though, our personal experience is to use actions on objects
rather than the edit capability... it helps drive the conversation as to
why the business user wants to change the data.  I can see in the future
that we might make domain objects non-editable by default (perhaps for Isis
2.0, in 2017 sometime).

Thx
Dan


[1] https://issues.apache.org/jira/browse/ISIS-1299

On 26 January 2016 at 05:14, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
wrote:

> Hi Dan,
>
> Can you please tell me a way to enter data into a view model? I cannot
> find a way to update contents of the view model created via JAXB
> annotations.
>
> On 1/25/2016 5:25 PM, Dan Haywood wrote:
>
>> Hi Vishma,
>>
>> What's the objective here... what do you want the end user to be able to
>> do, and what do you want to be shown in the app?  What's are the domain
>> concepts involved?
>>
>> Perhaps you could share some of the code you've written thus far to help
>> us
>> understand.  If you can upload what you have as a simple example on
>> github,
>> so much the better.
>>
>> You also mentioned fixtures ... just to say that these are intended for
>> setting up the system for either prototyping or testing, they aren't
>> generally intended to be for use in the "production" app itself.  Wasn't
>> sure from your mail if this was clear to you or not.
>>
>> Thx
>> Dan
>>
>>
>> On 25 January 2016 at 11:44, Vishma Senadhi Dias <vishma.12@cse.mrt.ac.lk
>> >
>> wrote:
>>
>> Hi,
>>>   I need some assistance with displaying web ui according to the SOAP
>>> response.
>>> Simple Example:
>>>       Let's say I have a JAXB annotated object called "Temperature". I
>>> have
>>> a SOAP web service which needs a place co-ordinates as an input and
>>> returns
>>> Temperature value as an Output. I have written a JAX-WS client to capture
>>> this response and send this inputs on a seperate project.
>>>
>>> What I had planned is to create JAXB annotated Temperature object in Dom
>>> package and update the list via Fixtures. These Fixtures are created
>>> according to the response. But I cannot update Temperature List with JAXB
>>> annotations.
>>>
>>> Can you please suggest a proper way to fulfill my task? Sorry if some
>>> details are not clear as I'm still new to this framework. I'm using
>>> simple
>>> archetype archetypeVersion=1.11.0 and wicket viewer.
>>>
>>> Thanks in advance.
>>>
>>>
>

Re: JAXB annotated classes as domain objects

Posted by Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>.
Hi Dan,

Can you please tell me a way to enter data into a view model? I cannot 
find a way to update contents of the view model created via JAXB 
annotations.

On 1/25/2016 5:25 PM, Dan Haywood wrote:
> Hi Vishma,
>
> What's the objective here... what do you want the end user to be able to
> do, and what do you want to be shown in the app?  What's are the domain
> concepts involved?
>
> Perhaps you could share some of the code you've written thus far to help us
> understand.  If you can upload what you have as a simple example on github,
> so much the better.
>
> You also mentioned fixtures ... just to say that these are intended for
> setting up the system for either prototyping or testing, they aren't
> generally intended to be for use in the "production" app itself.  Wasn't
> sure from your mail if this was clear to you or not.
>
> Thx
> Dan
>
>
> On 25 January 2016 at 11:44, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
> wrote:
>
>> Hi,
>>   I need some assistance with displaying web ui according to the SOAP
>> response.
>> Simple Example:
>>       Let's say I have a JAXB annotated object called "Temperature". I have
>> a SOAP web service which needs a place co-ordinates as an input and returns
>> Temperature value as an Output. I have written a JAX-WS client to capture
>> this response and send this inputs on a seperate project.
>>
>> What I had planned is to create JAXB annotated Temperature object in Dom
>> package and update the list via Fixtures. These Fixtures are created
>> according to the response. But I cannot update Temperature List with JAXB
>> annotations.
>>
>> Can you please suggest a proper way to fulfill my task? Sorry if some
>> details are not clear as I'm still new to this framework. I'm using simple
>> archetype archetypeVersion=1.11.0 and wicket viewer.
>>
>> Thanks in advance.
>>


Re: JAXB annotated classes as domain objects

Posted by Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>.
Hi Dan,
Thanks for replying. My objective is to use Apache ISIS to develop web 
ui for a web service. I do not need to save the data. Just need to 
display the data and update. Just a simple CRUD application. End user 
should be able to create,read,update and delete the contents of the 
domain object.

You are right about the fixtures. I have misunderstood it all the 
while.  Thanks for clearing it.
JAXB annotated classes supposed to be a view model. Is there a way that 
I can use this view model and create instances according to the SOAP 
response? User should be able to give an input using the web app(in 
Wicket view)  and the JAX-WS client will fetch results and show in the 
UI. That's my objective.

I will upload a simple example asap.
On 1/25/2016 5:25 PM, Dan Haywood wrote:
> Hi Vishma,
>
> What's the objective here... what do you want the end user to be able to
> do, and what do you want to be shown in the app?  What's are the domain
> concepts involved?
>
> Perhaps you could share some of the code you've written thus far to help us
> understand.  If you can upload what you have as a simple example on github,
> so much the better.
>
> You also mentioned fixtures ... just to say that these are intended for
> setting up the system for either prototyping or testing, they aren't
> generally intended to be for use in the "production" app itself.  Wasn't
> sure from your mail if this was clear to you or not.
>
> Thx
> Dan
>
>
> On 25 January 2016 at 11:44, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
> wrote:
>
>> Hi,
>>   I need some assistance with displaying web ui according to the SOAP
>> response.
>> Simple Example:
>>       Let's say I have a JAXB annotated object called "Temperature". I have
>> a SOAP web service which needs a place co-ordinates as an input and returns
>> Temperature value as an Output. I have written a JAX-WS client to capture
>> this response and send this inputs on a seperate project.
>>
>> What I had planned is to create JAXB annotated Temperature object in Dom
>> package and update the list via Fixtures. These Fixtures are created
>> according to the response. But I cannot update Temperature List with JAXB
>> annotations.
>>
>> Can you please suggest a proper way to fulfill my task? Sorry if some
>> details are not clear as I'm still new to this framework. I'm using simple
>> archetype archetypeVersion=1.11.0 and wicket viewer.
>>
>> Thanks in advance.
>>


Re: JAXB annotated classes as domain objects

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Vishma,

What's the objective here... what do you want the end user to be able to
do, and what do you want to be shown in the app?  What's are the domain
concepts involved?

Perhaps you could share some of the code you've written thus far to help us
understand.  If you can upload what you have as a simple example on github,
so much the better.

You also mentioned fixtures ... just to say that these are intended for
setting up the system for either prototyping or testing, they aren't
generally intended to be for use in the "production" app itself.  Wasn't
sure from your mail if this was clear to you or not.

Thx
Dan


On 25 January 2016 at 11:44, Vishma Senadhi Dias <vi...@cse.mrt.ac.lk>
wrote:

> Hi,
>  I need some assistance with displaying web ui according to the SOAP
> response.
> Simple Example:
>      Let's say I have a JAXB annotated object called "Temperature". I have
> a SOAP web service which needs a place co-ordinates as an input and returns
> Temperature value as an Output. I have written a JAX-WS client to capture
> this response and send this inputs on a seperate project.
>
> What I had planned is to create JAXB annotated Temperature object in Dom
> package and update the list via Fixtures. These Fixtures are created
> according to the response. But I cannot update Temperature List with JAXB
> annotations.
>
> Can you please suggest a proper way to fulfill my task? Sorry if some
> details are not clear as I'm still new to this framework. I'm using simple
> archetype archetypeVersion=1.11.0 and wicket viewer.
>
> Thanks in advance.
>