Adding an instance when using dash:ValueTableViewer

95 views
Skip to first unread message

Tim Smith

unread,
Aug 12, 2022, 1:20:24 PM8/12/22
to TopBraid Suite Users
Hi,

I often use dash:ValueTableViewer to provide a richer experience for the user by bringing relevant details of the the objects to a single page vs the user having to click into each instance as would be required using the default list-like display.

However, when using a shape like this example:

pgont:Amalgamationable-composedOf_Table_view
  a sh:PropertyShape ;
  sh:path pgont:composedOf ;
  dash:composite true ;
  dash:viewer dash:ValueTableViewer ;
  sh:deactivated false ;
  sh:description "Things this instance is composed of or owns."@en ;
  sh:group pgont:StructurePropertyGroup ;
  sh:name "composed Of"@en ;
  sh:node pgont:ComposedOfTableView ;
  sh:nodeKind sh:IRI ;
  sh:order "10"^^xsd:decimal ;
.

It becomes impossible for the user to add a new triple using the composedOf property.  The ComposedOfTableView node shape does a great job of displaying the components of the parent instance and specified details.  However, the user cannot add a new object as the child of the parent.  

While making a dash:ValueTableEditor would be extremely useful, I appreciate the complexity such an endeavor would entail given the range of possible node shapes.  However, in my case, I only need the user to add a single instance using the composedOf property, not fill-out a row in the ValueTableViewer.

Is there away to enable this interaction?

If I didn't want to use dash:ValueTableEditor, I would use a simple shape like:

pgont:Amalgamationable-composedOf
  a sh:PropertyShape ;
  sh:path pgont:composedOf ;
  sh:class pgont:Amalgamationable ;
  sh:deactivated true ;
  sh:description "Things that this object is composed of.  e.g. Logical Systems, Attributes, Constraints, Physical Systems, etc..." ;
  sh:name "composed Of" ;
.

However, the two shapes cannot co-exist on the same class or EDG will get confused (you'll note that this one is deactivated).

At the moment, I cannot find a way to show my users the details they need while at the same time, enabling them to add more instances to the parent using the pgont:composedOf property.  (Well, short of creating another node shape for the same class and having the user flip between the the views)

Thank you for your thoughts,

Tim

Holger Knublauch

unread,
Aug 14, 2022, 12:37:05 PM8/14/22
to topbrai...@googlegroups.com
Hi Tim

I believe I see what you mean. The dash:ValueTableViewer does NOT allow you to add new instances because

1) It doesn't even show up unless there already is a value
2) It doesn't have a New button, not even in Edit mode.

If I understand these issues correctly, I can file a dev ticket for myself to try to fix this for 7.4.
One potential fix would be to always make it visible in edit mode, and add a Plus button.
Another potential fix would be to just use the AutoComplete widget in edit mode.

Thanks,
Holger


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/73c708d1-078a-4e21-ac7c-b4cdb247d64bn%40googlegroups.com.

Matt Goldberg

unread,
Aug 14, 2022, 12:52:31 PM8/14/22
to topbrai...@googlegroups.com
Another thing about the ValueTableViewer that I have found that could be useful in some occasions where the resources in the table are first class citizens, i.e. not just blank nodes created for the sake of being in a table: it would be nice if there existed a second version of that viewer that behaved the same way with an addition of a column prepended to the table that shows the link to the resource with the label like the default viewer (dash:LabelViewer I think), which not only would show the label for resources in the table but also would make it much easier to navigate to the page for the resources in the table.

Tim Smith

unread,
Aug 14, 2022, 1:10:32 PM8/14/22
to topbrai...@googlegroups.com
Hi Holger, 

Either solution would be great!  

Thanks,

Tim


On Sun, Aug 14, 2022, 12:37 PM Holger Knublauch <hol...@topquadrant.com> wrote:

Holger Knublauch

unread,
Aug 15, 2022, 8:52:46 AM8/15/22
to topbrai...@googlegroups.com
To add a link column, add a property shape such as

ex:MyTableColumns-link
  a sh:PropertyShape ;
  sh:path ex:link ;
  sh:name "link" ;
  sh:nodeKind sh:IRI ;
  sh:order "0"^^xsd:decimal ;
  sh:values sh:this .

to the node shape that declares the columns. The trick is to add an inferred value pointing at the focus node itself.

In the absence of this, the table viewer could indeed just have a button to automatically have such a column visible, as I guess it's a common requirement. Or, as you say, we could introduce a variation of that viewer that does it automatically.

Meanwhile, I guess the work-around above is probably good enough. Note that you could reuse the same property shape in all your table viewer node shapes, so overhead can be minimal.

Holger


Marie Valadez

unread,
Feb 28, 2024, 9:00:07 PMFeb 28
to TopBraid Suite Users
Following up on this message. Was a version of a table ever introduced where you could edit/add new instances to it? This seems to be a helpful feature. The DetailsViewer/DetailsEditor can get pretty lengthy for a blank node and would be visually and user friendly if there was a way to put these into an editable table.

Holger Knublauch

unread,
Feb 29, 2024, 5:25:57 AMFeb 29
to 'Richard Nagelmaeker' via TopBraid Suite Users
Hi Marie,

no, the form-based tables are not editable yet. With 7.8 we have introduced inline editing of the Search Panel results

PastedGraphic-1.png

and the infrastructure there could potentially be reused to implement something similar for editing instances of ValueTableViewer. But we do not have that on our TODO list at the moment. As usual, you can use our customer portal to suggest new features, and use leverages like Premium Support to maybe impact prioritization.

Holger


-- 
The topics of this mailing list include TopBraid EDG and related technologies such as SHACL.
To post to this group, send email to topbrai...@googlegroups.com
--- 

You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Rebecca Jackson

unread,
Mar 1, 2024, 12:23:34 PMMar 1
to TopBraid Suite Users
Hi Holger! We will move forward with a support ticket to request this feature, but I just would like to clarify something before we do... you have stated that the ValueTableViewer DOES NOT have the ability to create new instances, yet we have set up a NodeShape for a table and see a "New" button here:

Screen Shot 2024-03-01 at 9.19.01 AM.png

The "New" button creates a new instance of the table shape (which has dash:applicableToClass for the target "description" instance), which should never actually be instantiated... could you provide some insight as to how this "New" button is constructed?

Holger Knublauch

unread,
Mar 2, 2024, 9:11:40 AMMar 2
to topbrai...@googlegroups.com
Hi Rebecca,

yes the table has a New button if the allowed type (sh:class) of values is one of the classes that can be instantiated for your asset collection type. I didn't say there is no New button, but that the cells of the table cannot be edited directly there.

HTH
Holger



On 1 Mar 2024, at 5:23 pm, Rebecca Jackson <rjac...@imohealth.com> wrote:

Hi Holger! We will move forward with a support ticket to request this feature, but I just would like to clarify something before we do... you have stated that the ValueTableViewer DOES NOT have the ability to create new instances, yet we have set up a NodeShape for a table and see a "New" button here:
Reply all
Reply to author
Forward
0 new messages