Autor Thema: [extLib] - Problem mit Tabs und FloatingPane  (Gelesen 1437 mal)

Offline eknori

  • @Notes Preisträger
  • Moderatoren
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 11.730
  • Geschlecht: Männlich
[extLib] - Problem mit Tabs und FloatingPane
« am: 08.08.11 - 14:26:36 »
Ich habe das Problem auch auf OpenNTF gepostet.
Dort schauen diei Entwickler aber nicht allzu häufig rein. Daher stelle ich meine Frage auch hier.

My XPage contains the following code. The code generates a TabContainer with 2 TabPanes. Each TabPane contains a custom control to display a floating panel (dojox.layout.FloatingPane)

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"
   xmlns:xe="http://www.ibm.com/xsp/coreex">
   <xc:cc_dojo />
   <xp:panel style="width: 100%; height: 700px">
      <xe:djTabContainer id="djTabContainer1" tabPosition="top"
         style="width:99%;height:700px;">
         <xe:djTabPane id="djTabPane1" title="My first Tab"
            style="width:99%;height:666px;">

            <xe:this.dojoAttributes>
               <xp:dojoAttribute value="false" name="resize">
               </xp:dojoAttribute>
            </xe:this.dojoAttributes>   

            <xc:cc_floatdiv prop_id="test1"></xc:cc_floatdiv>

         </xe:djTabPane>

         <xe:djTabPane id="djTabPane2" title="My second Tab"
            style="width:99%;height:666px;">

            <xc:cc_floatdiv prop_id="test2"></xc:cc_floatdiv>
            
         </xe:djTabPane>
      </xe:djTabContainer>
   </xp:panel>
</xp:view>

The cc_floaddiv custom control has the following code; the prop_id is a custom property on the custom control.

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
   <xp:panel dojoType="dojox.layout.FloatingPane"
      style="position:absolute;top:20px;left:10px;width:200px;height:100px;"
      id="${javascript:compositeData.prop_id;}">
      <xp:this.dojoAttributes>
         <xp:dojoAttribute name="title" value="Hello" />
         <xp:dojoAttribute name="resizable" value="true" />
         
         <!--  <xp:dojoAttribute name="resize" value="true" /> -->
         
      </xp:this.dojoAttributes>
   </xp:panel>
</xp:view>

I'm running into the following problem(s)

Szenario 1: Using the code above only the floating panel in the second TabPane is displayed. It can be moved around and resized.
The panel in the first TabPane is not displayed because <xp:dojoAttribute value="false" name="resize"> does not propagate the refresh event down the DOM to the custom control.
But this attribute is needed to prevent the panel from being moved to the initial position when switching between tabs.

Szenario 2: removing the <xp:dojoAttribute value="false" name="resize"> from the code will display both floating panes but always moves the panes to the initial position.

Szenario 3: uncommenting the attribute <xp:dojoAttribute name="resize" value="true" /> in the custom control and having the resize attribute in the XPage in place lets the floating pane display, but you cannot resize it any longer

How can I keep the position of the panel when switching between tabs AND display the floating panes on both tabs??
Egal wie tief man die Messlatte für den menschlichen Verstand auch ansetzt: jeden Tag kommt jemand und marschiert erhobenen Hauptes drunter her!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz