You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Kevin Meyer <ke...@kmz.co.za> on 2015/11/22 16:33:02 UTC

Performing an action with multiple items on an entity?

Hi all,

I'm making reasonable progress with the core of my report-generating
proof-of-concept, but I am looking for a better solution..

What I want to do is add multiple "Project"s to a "Report" object (the
projects are found, for example, by querying the list of projects for a
customer, or greater than a certain value).

Since Isis does not support "addProjects(Collection<Project> projects)" on
the Report class, I'm using an "invokeOn" annotation on the Project class,
and a special property on the Report class to indicate a report is "open".

However, for this to work, the project instance needs to find a report to
add itself to, and I'm hacking the system by doing a search to find the
"open" report, and adding the project to that report.

Is there a more sensible solution?

Thanks,
Kevin

-- 
Kevin Meyer
Ljubljana, Slovenia



Re: Performing an action with multiple items on an entity?

Posted by Kevin Meyer <ke...@kmz.co.za>.
Hi Dan,

Let me get this basic prototype sorted, then I'd be happy to take on
implementing some solutions, be it the update to handle collections as
parameters or pasing a parameter to bulk actions..

Right now I've created a ReportSession to hold "the one" report that the
current user is working on, with some actions to flush/create and delete
ReportSessions... the invokeOn uses scratchpad to find and keep the
current report.

Cheers,
Kevin


On Sun, November 22, 2015 17:41, Dan Haywood wrote:
> I don't think there is, really.  Either we need to support collections as
>  parameters, or to allow bulk actions to take parameters.
>
> I know there are tickets for both, but neither have got high enough up
> the todo list to warrant being addressed yet.
>
> If you want to tackle this work, I'll provide some support/guidance....
>
>
> Dan
>
>
>
>
> On 22 November 2015 at 15:33, Kevin Meyer <ke...@kmz.co.za> wrote:
>
>
>> Hi all,
>>
>>
>> I'm making reasonable progress with the core of my report-generating
>> proof-of-concept, but I am looking for a better solution..
>>
>> What I want to do is add multiple "Project"s to a "Report" object (the
>> projects are found, for example, by querying the list of projects for a
>> customer, or greater than a certain value).
>>
>> Since Isis does not support "addProjects(Collection<Project> projects)"
>> on the Report class, I'm using an "invokeOn" annotation on the Project
>> class, and a special property on the Report class to indicate a report
>> is "open".
>>
>> However, for this to work, the project instance needs to find a report
>> to add itself to, and I'm hacking the system by doing a search to find
>> the "open" report, and adding the project to that report.
>>
>>
>> Is there a more sensible solution?
>>
>>
>> Thanks,
>> Kevin
>>

-- 
Kevin Meyer
Ljubljana, Slovenia



Re: Performing an action with multiple items on an entity?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
I don't think there is, really.  Either we need to support collections as
parameters, or to allow bulk actions to take parameters.

I know there are tickets for both, but neither have got high enough up the
todo list to warrant being addressed yet.

If you want to tackle this work, I'll provide some support/guidance....

Dan



On 22 November 2015 at 15:33, Kevin Meyer <ke...@kmz.co.za> wrote:

> Hi all,
>
> I'm making reasonable progress with the core of my report-generating
> proof-of-concept, but I am looking for a better solution..
>
> What I want to do is add multiple "Project"s to a "Report" object (the
> projects are found, for example, by querying the list of projects for a
> customer, or greater than a certain value).
>
> Since Isis does not support "addProjects(Collection<Project> projects)" on
> the Report class, I'm using an "invokeOn" annotation on the Project class,
> and a special property on the Report class to indicate a report is "open".
>
> However, for this to work, the project instance needs to find a report to
> add itself to, and I'm hacking the system by doing a search to find the
> "open" report, and adding the project to that report.
>
> Is there a more sensible solution?
>
> Thanks,
> Kevin
>
> --
> Kevin Meyer
> Ljubljana, Slovenia
>
>
>