Dario Trussardi | 23 Apr 17:42
Picon
Favicon

MASingleOptionDescription with add button

Hello All, i have one description based on MASingleOptionDescription:linkDescription ^(MASingleOptionDescription new) reference: MANazionalityModel description; selectorAccessor: 'nazione'; options: [MANazionalityModel DataBase asArray] asDynamicObject ; label: 'Nazione'; beSorted; beRequired; beEditable; beSearchable; priority: 40; yourself Now my questions are:1) In the rendering of it, where i can select one option,    i can manage add buttons to add new element to options ? 2) reference: MANazionalityModel description    What's the sense of this declaration?    When define MANazionalityModel descriptionWithOnlyOneDescription the system d'ont answer well ? Thanks,

Dario                

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Lukas Renggli | 23 Apr 21:53
Picon
Picon
Favicon

Re: MASingleOptionDescription with add button

Hi Dario
> 		selectorAccessor: 'nazione';
You should probably use a symbol, something like #nazione.

In the latest version of Magritte you can even write

	accessor: #nazione

and Magritte will take care to instantiate the right access strategy.
> 		beEditable;
> 		beSearchable;
Note, that these two properties are extensions of Pier. If you are  
outside this context they won't change anything in Magritte. Unless  
you have your own specific interpretation of these custom properties  
of course.
> 1) In the rendering of it, where i can select one option,
>     i can manage add buttons to add new element to options ?
You need to write your own view. If you are using Magritte together  
with Seaside this will probably be a subclass of  
MASingleSelectionComponent.

> 2) reference: MANazionalityModel description
>     What's the sense of this declaration?
To render the label of the referenced object.
>     When define MANazionalityModel descriptionWithOnlyOneDescription  
> the system d'ont answer well  ?
Sorry, I don't understand this question.

Cheers,
Lukas

--

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


Gmane