1
votes

I make a partialRefresh on a tab container with 4 tabs:

 <xp:eventHandler event="onchange" submit="true"
                                    refreshMode="partial" refreshId="djContentPane1">
                                    <xp:this.action><![CDATA[#{javascript:viewScope.put("hideRelatedDocuments", true);}]]></xp:this.action>
   </xp:eventHandler>

The viewScope is then used to some fields which I want to hide/show. Those fields lay on the tab container.

And after this, the tab container looks strange:

enter image description here

What might be the problem? Thanks for your time.

I tried adding a mainPanel, and on this panel I added the TabContainer. Then, I updated the panel but sttill, no work. The result:

enter image description here

2

2 Answers

1
votes

You can refresh the fields to show/hide them depending on current value in combobox field if you

  • put the fields into panels which have an id and always gets rendered
  • place the panels into the Tab Panels
  • refresh all panels on onchange event of your combobox with XSP.partialRefreshPosts

Look for the sample code here.

0
votes

It's because you're refreshing the content pane. I've not pinned down the cause, but refresh either an area outside the Dojo Tab Container or a panel/div that's inside the Tab Container Pane you want to refresh.

I suspect it's something to do with Dojo then processing the response HTML. As a client-side framework, I don't think Dojo is really designed to handle replacing HTML by injection into an existing page.

Tommy Valand added a snippet to handle this problem: http://dontpanic82.blogspot.co.uk/2013/03/fix-for-partial-refresh-on-dojo-tab.html