[GeoNetwork-devel] View-mode workflow for tab-based UI (wrt metadata editing)

Is the View-mode workflow (events generated when the view is changed e.g. from default view to package view, classes that are called, XSLs that are used for transformation etc.) same for tab-based UI (apps/tabsearch) as it is for default (main.home) ?

If not, what are the differing points. I am only concerned with the “View mode” selection shown in the metadata editor toolbar at the top while editing metadata.

thanks in advance

Ameet

Okay found that when we change the layout for a view (order of the elements shown) in its XSL, it is reflected in the tab-based UI as well.

which means the XSLs for the views that are used in default ui also hold good for the new extjs ui, with only the presentation being different.

So now the concern narrows to how I can add my own view to the “View mode” combolist in the toolbar and link that to my custom XSL created for that view ? (Note: the new view I created is already shown in the “View mode” list when I use the default UI, but the same is not shown in the View mode list when I activate tab-based UI and this I want to make it happen)

···

On Thu, Oct 3, 2013 at 5:09 PM, Ameet Chaudhari <ameet.chaudhari@anonymised.com> wrote:

Is the View-mode workflow (events generated when the view is changed e.g. from default view to package view, classes that are called, XSLs that are used for transformation etc.) same for tab-based UI (apps/tabsearch) as it is for default (main.home) ?

If not, what are the differing points. I am only concerned with the “View mode” selection shown in the metadata editor toolbar at the top while editing metadata.

thanks in advance

Ameet


Systems Programmer
kCube Consultancy Services

Update:
I’ve been able to add my custom view to the “View mode” tool in the editor toolbar by making changes to metadata-edit.xsl but clicking on it does not apply the template I’ve defined for it. (to test I’ve included only two elements in my custom template).

Things I did:

  1. in web-inf/config-gui.xml, added my custom tab under ()

  2. defined the same in metadata.xsl where all the tabs are defined (test if current tab is custom view tab and call my custom template)

<xsl:when test=“$currTab=‘mycustomview’”>
<xsl:call-template name=“mycustomviewtabs”>
<xsl:with-param name=“schema” select=“$schema”/>
<xsl:with-param name=“edit” select=“$edit”/>
<xsl:with-param name=“dataset” select=“$dataset”/>
</xsl:call-template>
</xsl:when>

  1. called displayTab template in the same file

<xsl:if test=“/root/gui/config/metadata-tab/mycustomview”>
<xsl:call-template name=“displayTab”>
<xsl:with-param name=“tab” select=“‘mycustomview’”/>
<xsl:with-param name=“text” select=“/root/gui/strings/mycustomviewTab”/>
<xsl:with-param name=“tabLink” select=“$tabLink”/>
</xsl:call-template>
</xsl:if>

  1. included my custom template at the top in the same file
    <xsl:include href=“metadata-mycustomview.xsl”/>

  2. created the xsl (metadata-mycustomview.xsl) containing the template (mycustomviewtabs) with just two elements and saved it in the same place where other templates are saved.

  3. added labels for my custom template in strings.xml

Thing to be noted is is it is visible and works well in default UI. In the new tab-based UI, the custom template name is added in the View menu but its template is not getting called on clicking it.

Anything I missed in the above that needs to be done for the tab-based UI?

Best Regards
Ameet

···

On Thu, Oct 3, 2013 at 6:32 PM, Ameet Chaudhari <ameet.chaudhari@anonymised.com.31…> wrote:

Okay found that when we change the layout for a view (order of the elements shown) in its XSL, it is reflected in the tab-based UI as well.

which means the XSLs for the views that are used in default ui also hold good for the new extjs ui, with only the presentation being different.

So now the concern narrows to how I can add my own view to the “View mode” combolist in the toolbar and link that to my custom XSL created for that view ? (Note: the new view I created is already shown in the “View mode” list when I use the default UI, but the same is not shown in the View mode list when I activate tab-based UI and this I want to make it happen)


Systems Programmer
kCube Consultancy Services

On Thu, Oct 3, 2013 at 5:09 PM, Ameet Chaudhari <ameet.chaudhari@anonymised.com> wrote:

Is the View-mode workflow (events generated when the view is changed e.g. from default view to package view, classes that are called, XSLs that are used for transformation etc.) same for tab-based UI (apps/tabsearch) as it is for default (main.home) ?

If not, what are the differing points. I am only concerned with the “View mode” selection shown in the metadata editor toolbar at the top while editing metadata.

thanks in advance

Ameet


Systems Programmer
kCube Consultancy Services