0

I've read other related article on Sourceforge (ie. How to create a custom asset-attributes.hbs for each new artifact for the STORE) which helped greatly though it didn't provide specific details to overcome the following issue I have.

I have created a custom asset RXT file together with it's own overview.hbs and various partial hbs templates. I have also used the {{dump .}} command to assist with viewing the JSON format.

In the RTX one of the tables presented in the WSO2 Service Registry 'Publish tool is configured as unbounded rows made of a mix of text and options fields (6 fields (columns) in all).

I'm unsure how to present it in the 'Store' tool however as each of the fields in the row is stored as a separate JSON array. Are there any examples available of how the partial .hbs config can written to loop through each table row (ie. get row[1] of each of the field arrays and style it before then going to row[2])? Is there a way to write this into the .hbs file or do I need to change/customise the JSON transaction so that each row is it's own array of the 6 values which can then be looped through in the .hbs

Any advise or pointers to documentation and examples would be greatly appreciated. Thanks in advance for the help.

Community
  • 1
  • 1
Trem
  • 91
  • 6

2 Answers2

0

You can add your own template form for this regard. Here [1], I have detailed how to add a customised form in the Publisher tool. Hope you will be able to do the same for Store tool as well.

[1] http://blog.malintha.org/add-customized-publisher-form-for-a-custom-rxt/

malintha
  • 176
  • 3
  • 18
  • Thanks. I got it to work in the store by editing the asset.js file of the new asset by modifying the json field array so that a new field array is defined which includes the data from each row (rather than the data of each field column). Then I style the new json array in the .hbs file so that each object in the array is styled into a table row. – Trem Dec 06 '16 at 05:40
0

I got it to work in the store by editing the asset.js file of the new asset by modifying the json field array so that a new field array is defined whereby each object includes the data from each row (rather than the data of each field column). Then I style the new json array in the .hbs file so that each object in the array is styled into a table row.

Trem
  • 91
  • 6