You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by L Eder <ed...@gmail.com> on 2017/03/03 18:16:31 UTC
Re: [ANN] Apache Isis version 1.14.0 Released
The new feature - collection parameter - worked well in an action
button. But refuses to work in a menu entry, for example Create.
I tried the support methods, of course, and even the DomainObject
alternative, without success.
Error message:
"
Collection action parameter found without supporting choices or
autoComplete facet. Class: domainapp.dom.PPB.ComponentMenu action:
Create parameter 6
"
Anyone experienced this issue? Thanks,
Source code:
ComponentMenu.java
"
@Action(
)
@MemberOrder(sequence = "3")
public Component create(
@ParameterLayout(named="Description") final String description,
@ParameterLayout(named="Part Number") final String partNumber,
@ParameterLayout(named="First Date") final LocalDate firstDate,
@ParameterLayout(named="Last Date") final LocalDate lastDate,
@ParameterLayout(named="Category") final ComponentCategory category,
@ParameterLayout(named="Origin") final ComponentOrigin origin,
@ParameterLayout(named="Associated Models") final List<Model> models
) {
return componentrepository.create(
description,
partNumber,
firstDate,
lastDate,
category,
origin,
models);
}
// @Programmatic
public List<Model> autoComplete0Create(@MinLength(3) String searchTerm) {
return modelRepo.listAll();
}
...
@javax.inject.Inject
private ModelRepository modelRepo;
"
ComponentRepository.java
"
@Programmatic
public Component create(
final String description,
final String partNumber,
final LocalDate firstDate,
final LocalDate lastDate,
final ComponentCategory category,
final ComponentOrigin origin,
final List<Model> models) {
final Component component =
container.newTransientInstance(Component.class);
component.setDescription(description);
component.setPartNumber(partNumber);
component.setFirstDate(firstDate);
component.setLastDate(lastDate);
component.setCategory(category);
component.setOrigin(origin);
container.persistIfNotAlready(component);
return component;
}
"
2017-02-20 20:15 GMT-04:00, Dan Haywood <da...@haywood-associates.co.uk>:
> within...
>
>
> On Mon, 20 Feb 2017 at 13:01 Bilgin Ibryam <bi...@gmail.com> wrote:
>
>>
>> For the time being, I also had to disable
>>
>> isis.reflector.validator.jdoqlVariablesClause=false
>> isis.reflector.validator.explicitObjectType=false
>> isis.reflector.validator.jdoqlFromClause=false
>>
>> as the security module was complaining about some validations.
>>
>>
> The updated security module (1.14.0) should not throw any validation errors
> (hopefully).
>
>
>
>> Are there any examples/docs for how to use the new features from this
>> release, more specifically:
>>
>> ISIS-1529 - TableColumnOrderService, to allow column order to be
>> fine-tuned
>>
>
> http://isis.apache.org/guides/rgsvc.html#_rgsvc_spi_TableColumnOrderService
>
>
>
>> ISIS-709 - Support multi-select for the drop-down box
>
> ISIS-785 - Invoke action parameter with a collection of entities.
>>
>>
> http://isis.apache.org/guides/ugfun.html#_ugfun_how-tos_class-structure_actions_collection-parameter-types
>
> (these are the same feature really ... one is the metamodel change, the
> other is the Wicket UI)
>
>
> This additional doc has _not_ been changed, probably should've been (PRs
> gratefully received):
> - http://isis.apache.org/guides/rgcms.html#_rgcms_methods_prefixes_choices
> -
> http://isis.apache.org/guides/rgcms.html#_rgcms_methods_prefixes_autoComplete
>
> Thx
> Dan
>
>
>
>>
>> Cheers,
>>
>>
>> [1] http://github.com/bibryam/semat
>>
>>
>>
>
Re: [ANN] Apache Isis version 1.14.0 Released
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
The multiselect is the 7th parameter, so use autoComplete6..., not
autoComplete0...
Cheers
Dan
On Fri, 3 Mar 2017, 18:16 L Eder, <ed...@gmail.com> wrote:
The new feature - collection parameter - worked well in an action
button. But refuses to work in a menu entry, for example Create.
I tried the support methods, of course, and even the DomainObject
alternative, without success.
Error message:
"
Collection action parameter found without supporting choices or
autoComplete facet. Class: domainapp.dom.PPB.ComponentMenu action:
Create parameter 6
"
Anyone experienced this issue? Thanks,
Source code:
ComponentMenu.java
"
@Action(
)
@MemberOrder(sequence = "3")
public Component create(
@ParameterLayout(named="Description") final String description,
@ParameterLayout(named="Part Number") final String partNumber,
@ParameterLayout(named="First Date") final LocalDate firstDate,
@ParameterLayout(named="Last Date") final LocalDate lastDate,
@ParameterLayout(named="Category") final ComponentCategory
category,
@ParameterLayout(named="Origin") final ComponentOrigin origin,
@ParameterLayout(named="Associated Models") final List<Model>
models
) {
return componentrepository.create(
description,
partNumber,
firstDate,
lastDate,
category,
origin,
models);
}
// @Programmatic
public List<Model> autoComplete0Create(@MinLength(3) String searchTerm)
{
return modelRepo.listAll();
}
...
@javax.inject.Inject
private ModelRepository modelRepo;
"
ComponentRepository.java
"
@Programmatic
public Component create(
final String description,
final String partNumber,
final LocalDate firstDate,
final LocalDate lastDate,
final ComponentCategory category,
final ComponentOrigin origin,
final List<Model> models) {
final Component component =
container.newTransientInstance(Component.class);
component.setDescription(description);
component.setPartNumber(partNumber);
component.setFirstDate(firstDate);
component.setLastDate(lastDate);
component.setCategory(category);
component.setOrigin(origin);
container.persistIfNotAlready(component);
return component;
}
"
2017-02-20 20:15 GMT-04:00, Dan Haywood <da...@haywood-associates.co.uk>:
> within...
>
>
> On Mon, 20 Feb 2017 at 13:01 Bilgin Ibryam <bi...@gmail.com> wrote:
>
>>
>> For the time being, I also had to disable
>>
>> isis.reflector.validator.jdoqlVariablesClause=false
>> isis.reflector.validator.explicitObjectType=false
>> isis.reflector.validator.jdoqlFromClause=false
>>
>> as the security module was complaining about some validations.
>>
>>
> The updated security module (1.14.0) should not throw any validation
errors
> (hopefully).
>
>
>
>> Are there any examples/docs for how to use the new features from this
>> release, more specifically:
>>
>> ISIS-1529 - TableColumnOrderService, to allow column order to be
>> fine-tuned
>>
>
>
http://isis.apache.org/guides/rgsvc.html#_rgsvc_spi_TableColumnOrderService
>
>
>
>> ISIS-709 - Support multi-select for the drop-down box
>
> ISIS-785 - Invoke action parameter with a collection of entities.
>>
>>
>
http://isis.apache.org/guides/ugfun.html#_ugfun_how-tos_class-structure_actions_collection-parameter-types
>
> (these are the same feature really ... one is the metamodel change, the
> other is the Wicket UI)
>
>
> This additional doc has _not_ been changed, probably should've been (PRs
> gratefully received):
> - http://isis.apache.org/guides/rgcms.html#_rgcms_methods_prefixes_choices
> -
>
http://isis.apache.org/guides/rgcms.html#_rgcms_methods_prefixes_autoComplete
>
> Thx
> Dan
>
>
>
>>
>> Cheers,
>>
>>
>> [1] http://github.com/bibryam/semat
>>
>>
>>
>