[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Strange folding behavior in PivotGrid  XML
Forum Index -> Development
Author Message
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hello,

when I click on a line below the actual "foldable" header line (inside an "empty" pivot icon), the whole section folds which is quite confusing.
It is even worse when the foldable header line is scrolled out of sight.

It would be better when the header line will be selected and scrolled into view after folding, or even better: if this mechanism could be switched off, so that the user can only fold a section by clicking directly on the pivot icon.

Is there any way for me to influence this behavior right now?

Regards,
Frauke
 Filename FoldPivot.JPG [Disk] Download
 Description Klick on the field marked red folds the section.
 Filesize 5 Kbytes
 Downloaded:  368 time(s)

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

yes, this is by intention - a click into the empty area collapses the corresponding "key".

I believe you anyway have your own overriden Pivot data structure...? If so, it's the "onToggle" method, that is responsible for collapsing...

Code:
     public class ItemCall
         implements Serializable
     {
         String i_key;
         public void onToggle(ActionEvent ae)
         {
             // check if this item can be toggled: items
             // that do not provide a text cannot be toggled
             String s = getK().get(i_key);
             if (s == null || s.equals(""))
             {
                 if (m_pivotList.getDelegeateToggleToUpperNode() == true)
                 {
                     FIXGRIDPivotItem prevItem = findPivotItemBeforeWithFilledKey(i_key);
                     if (prevItem != null)
                         prevItem.togglePivot(i_key);
                 }
             }
             else
             {
                 // toggle!
                 togglePivot(i_key);
             }
         }
     }
 


But, things are quite nested...: to make it easier for you, you now can set a parameter in the FIXGRIDPIVOTBinding (setFoldOnClickIntoEmptyArea(true/false)), that controls if click in empty areay are "folding clicks". Available with next update.

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

forget parts of the previous post, there is already such parameter, in FIXGRIDPivotListBinding:

Code:
     /**
      * The pivot grid arranges its contained nodes as "kind of tree". If the user clicks within the
      * key area into an empty area then by default the click is delegeated to the next node level,
      * that manages this part of the tree. Consequence: if the user clicks into an empty area
      * then the pivot-tree is shrinked/closed within this area. - By passing "false" as parameter
      * you define that no explicit action is taken if the user clicks into an empty area. This means
      * the user only can open/close tree areas by explicitly doing so on the top item of the area.
      */
     public void setDelegeateToggleToUpperNode(boolean delegeateToggleToUpperNode) { m_delegeateToggleToUpperNode = delegeateToggleToUpperNode; }
     public boolean getDelegeateToggleToUpperNode() { return m_delegeateToggleToUpperNode; }
 


Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

GREAT
That's perfect.

Thank you and best regards
Frauke
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team