It's all about the answers!

Ask a question

Editor Presentation for dropdown list populated from server side query, help!


sam detweiler (12.5k6195201) | asked Feb 09 '13, 3:42 p.m.
edited Feb 11 '13, 6:34 p.m. by Millard Ellingsworth (2.5k12431)
Are there any samples of a custom editor presentation which is a dropdown list of single selectable elements?
(and also multi-select).. where the data is populated from a server side list (like the found in deliverable list)

I suppose I can go read the existing UI source.. but still need an external packaging structure..

the example in https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations is an output only thing generated in the code itself. Not data derived.

thanks for any guidance

9 answers



permanent link
Millard Ellingsworth (2.5k12431) | answered Feb 11 '13, 6:40 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
You can specify that enumerations are stored in the database (rather than the process spec) and you can use a filtered http value set provider or a script-based value provider (see https://jazz.net/library/article/1003/#value-sets).

Or do you need something beyond what those options offer? Perhaps you could say a bit more about the data and how you want to present it.

permanent link
sam detweiler (12.5k6195201) | answered Feb 11 '13, 7:17 p.m.
second time today value provider was brought up.

the 'found in' list of deliverable(s) from the project process configuration is too restrictive, and way too manual in its administration.

we also need Fixed in and Delivered Release,  all of which overlap, but are not symmetrical.

I have a new workitem type (delivery) to encapsulate the deliverable concept, and it has lots more data
but how to use it..  I have new link types as well, but they are too opaque, and hard to manage, (and the current UI shares workitem types with every project on the server.. ugh, see  restricted links)

so, I want a multi-select dropdown, which holds the object/handle/uuid/oid/?? of the workitem(s)  which match a workitem query of the subset of the delivery workitems in this project. (text string of the thing isn't enough)
 
it would ROCK to make the list of urls as OSLC links with a hover each.

the value provider could provide something, but I don't know what the use would be.  I could  get the workitem ids, or the summary text, but not present both, and finding your way back from there is hard.   I would need a multi select list of url types to combine some data, but still hard to report thru.

notice that Iteration planned is the coding phase, not the delivery phase.  some of our products do quarterly fixpack releases.. so they are accumulations of ready fixes ..We know in the future when we PLAN to release..  and in the PAST when we DID release.  there is a whole workflow around release, with approvals, etc.. and for fixes on the individual level was have some teams that cannot close a defect out until the customer signs their approval as well.  and there is a need to automation of all these movements. I just can't get all that from the release table in the project.

and yes, you can get really agile about it and say you can't release if you don't have an iteration, and .... etc..
but that is WAY too hard for everyone to execute.

permanent link
sam detweiler (12.5k6195201) | answered Apr 29 '13, 9:57 a.m.
anybody?  this is starting to heat up again

permanent link
sam detweiler (12.5k6195201) | answered Apr 29 '13, 3:30 p.m.
I really want to add my own datatype to the repository and then add my own presentations of that.. (which I think is documented).. lacking a datatype, looks like I would have to do something similar to the old multi-select string values..  define an attriute as "String', and hold some list of artifact identifier(s) there. (oid maybe)

permanent link
sam detweiler (12.5k6195201) | answered Apr 29 '13, 4:26 p.m.
maybe making progress.. with custom attribute & presentation..

where do I find the definition of the classes in the WorkItemEditorToolkit..



Comments
Ralph Schoon commented Apr 30 '13, 2:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Sam, I typically use Plugin-Spy SHIFT-ALT-F1 to spy into the Eclipse UI to find things I know is being used in the Eclipse client.


sam detweiler commented Apr 30 '13, 6:50 a.m. | edited Apr 30 '13, 7:15 a.m.

thanks.. unfortunately, that doesn't display all the elements on the page.  Found In is not identified.

I have the deliverable class
com.ibm.team.workitem.ide.ui.internal.editor.presentations.Deliverable.

and I see the list built for the Releases page.. but not for the workitem.. (least its unclear to me)

and its still unclear to me the relationship between all the parts..
plugin for an attribute type, (what gets installed on client & server), such that there is a view in the process config editor, create attribute of type,
add to workitem, create workitem, which invokes the UI component of the attribute type for that instance.. (I think).
and the class hierarchy chain of the AttributePart makes the operation almost unintelligible. (to me)


permanent link
sam detweiler (12.5k6195201) | answered Apr 30 '13, 1:01 p.m.
edited Apr 30 '13, 1:18 p.m.
Does anyone know the plugin layout here? it 'looks' like I need three plugins.  one for the registry, one for the server plugin (which handles the web UI presentation), and one for eclipse (which handles the eclipse UI presentation)
and later if this attribute has special handling for queries (query thru), I made need a query handler too (which appears to need two plugins, eclipse and web) 

I don't see how to create/install the 'attribute registry' plugin.

and secondarily, kind is a string, got it.. what attribute of what element does it need to match?



i've got these two sections of the plugin.xml
<code>
   <extension
         id="a.b.c.d"
         name="com.xx.delivery.workitem.presentation"
         point="com.ibm.team.workitem.ide.ui.editorPresentations">
      <editorPresentation
            class="com.xx.extensions.DeliverableFromWorkitem"
            id="com.xx.deliverablefromworkitem"
            needsAttribute="true">
                 <attributeType
                       deprecated="false"
                       id="string">
                 </attributeType>
      </editorPresentation>
   </extension>
   <extension
         point="com.ibm.team.workitem.common.attributeTypePresentationIdBinding">
      <attributeTypePresentationIdBinding
            attributeType="deliverablefromworkitemlist"
            presentationId="com.xx.deliverablefromworkitem">
      </attributeTypePresentationIdBinding>
   </extension>
</code>

I think  this stmt means I should remove the attributeTypePresentationIdBinding binding
 
The com.ibm.team.workitem.common.attributeTypePresentationIdBinding extension point
allows to bind a presentation id to an attribute type. Presentations configured with an attribute but without a
kind will use the presentation specified in this extension point. As our example is an additional presentation,
we will not register it to be default for boolean.



permanent link
sam detweiler (12.5k6195201) | answered May 02 '13, 11:02 a.m.
edited May 05 '13, 10:58 a.m.
Ok, finally got my class to be called..

net.. on the
<code>
<plugin>
   <extension point="com.ibm.team.workitem.ide.ui.editorPresentations">
      <editorpresentation <br="">             class="com.xx.extensions.DeliverableFromWorkitem"
            displayName="deliverablefromworkitem"
            id="com.xx.deliverablefromworkitem"
            needsAttribute="true">
                <attributetype id="smallString"/>
      </editorpresentation>
   </extension>   
</plugin>
</code>

the custom attribute must be of the type specified in the XML.
the system must SUPPORT that type, ie , you cannot 'invent' a new datatype
(that I have found yet!).

then in the PRESENTATION definition for that attribute, when the plugin is installed in Eclipse runtime you are using for the process configuration editing, the KIND

            displayName="deliverablefromworkitem"
should display in the Kind dropdown.

NOW, when u create a workitem of that type AND the tab with that presentation on it is brought to the foreground, the supporting class will be called
           
class="com.xx.extensions.DeliverableFromWorkitem"





permanent link
Martin Aeschlimann (911) | answered May 07 '13, 3:37 a.m.
JAZZ DEVELOPER
Hey Sam,
sorry, we don't really support adding new data types, nor adding custom presentations. All these extension points and APIs are internal APIs which can change any time. We also can not help you on how to use those.
Millard already summarized the supported options we have: Enumerations and http value sets.


Comments
sam detweiler commented May 07 '13, 7:27 a.m.

I am confused.. here is the documented way to add custom attribute presentations
https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations

I am thus using that model with defined extension points..
I understand that currently there is no support for adding new data types, but I can create a new presentation over an existing data type.

after working on this for a few days now, I see that combo will never really be a usable UI choice... so, like other type, I'll have to present a dialog to select things..I can use the combo to SHOW the already selected..


permanent link
Martin Aeschlimann (911) | answered May 07 '13, 8:40 a.m.
JAZZ DEVELOPER
Information on supported APIs can only be found in Tech notes and the product documentation including the Javadocs of the SDK.
Wikis are used many things, including internal documentation, unreleased features and so on. Note that the header of the wiki page (the yellow box) states that. I understand that with all that information floating around it's not always easy to figure out what is internal and what is officially supported. Don't hesitate to contact us if in doubt.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.