[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: CaptainCasa  XML
Profile for CaptainCasa -> Messages posted by CaptainCasa [5519] Go to Page: Previous  1, 2, 3 , 4 ... 366, 367, 368 Next 
Author Message
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
TEXTPANE (and TEXTEDITOR) have - unfortunately - a sizing behavior which is a bit differnt to other components:

When defining WIDTH=100% and HEIGHT=100% then the TEXTPANE is sized into the "100%" area. But: the area's height does not grow when the text is too long. - To automatically determine and use the adequate height you need to define WIDTH=100% - and must not define a HEIGHT in addition:

Code:
 NOT auto-growing:
 <t:textpane ... width="100%" height="100%" .../>
 
 WITH auto-height-growing:
 <t:textpane ... width="100%" .../>
 


Now: what does this have to do with the SPANGRID?

In the SPANGRID item you add a component in the following way:
Code:
     public class GridItem extends SPANGRIDItem implements java.io.Serializable
     {
         ...
         public GridItem(...)
         {
             ...
             render();
             ...
         }
         public void render()
         {
             ...
             TEXTPANENode n = new TEXTPANENode()
                 .setBackground("#FFC0C0")
                 .setText(".{summary}")
             addContent(2,n);
             ...
         }
     ...
 

So the component as added with addContent(colspan,componentNode).

Looking into addContent we see...:
Code:
     public void addContent(int colspan, ComponentNode node)
     {
         ...
         if (node.getAttribute("width") == null)
             node.addAttribute("width","100%");
         if (node.getAttribute("height") == null)
             node.addAttribute("height","100%");
         ...
     }
 


So the component automatically receives a HEIGHT of 100% if not set. And this is good for all components - and works "as designed" for the TEXTPANE component... - which means: the TEXT is cut, the sizing is not growing by the content.

So you need to explicitly pass a height in order to overcome this behavior. You cannot set a null-height because the check against the attribute is done with value null... But: you can pass the value Integer.MIN_VALUE which is interpreted on client side in the same way as null.

Update your code to:

Code:
         public void render()
         {
             ...
             TEXTPANENode n = new TEXTPANENode()
                 .setBackground("#FFC0C0")
                 .setText(".{summary}")
                 .setHeight(Integer.MIN_VALUE);
             addContent(2,n);
             ...
         }
 


And the sizing will be correctly done!
(request by mail, responded via forum)

We have a SPANGRID with TEXTPANEs inside - and expect that the text content drives the height of the corresponding row when setting FIXGRID-DNYAMICHEIGHTSIZING to true. - But: the grid rows are always same size.

Hi,

no, this SHOWEMPTYROWS refers to the availability of a whole grid item - independet from its content.

What you could do: use "Integer" (not "int") for your number (or "Double" instead of "double", etc.)

Let's assume your GridItem by default is implemented the following way:

Code:
 public class GridItem extends FIXGRIDItem
 {
     int i_value;
     public int getValue() { return i_value; }
 }
 


You could now change to:
Code:
 public class GridItem extends FIXGRIDItem
 {
     int i_value;
     public Integer getValue() 
     {
         if (i_value != 0)
             return i_value;
         else
             return null;
     }
 }
 


A null value will not be output in a FIELD/FORMATTEDFIELD/LABEL.

Kind regards! Björn

PS: when using LABEL for output, use LABEL-FORMAT and LABEL-FORMATMASK for proper output formatting. Otherwise the number will be teechnically convertged to a string, e.g. decimal numbe will always look like "1001.9" and not e.g. "1.001,90"...
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
Please take a view into the source code of CCSplitDashboard:

Code:
     protected void save()
     {
         SplitInfo si = transferToSplitInfo();
         if (m_listener instanceof IListenerWithPersistence)
         {
             ((IListenerWithPersistence)m_listener).saveSplitInfo(m_persistId,si);
         }
         else
         {
             CCSplitDashboardLogic.saveSplitInfo(m_persistId,si);
         }
     }
 
     private void readSplitInfo()
     {
         if (m_listener instanceof IListenerWithPersistence)
         {
             m_splitInfo = ((IListenerWithPersistence)m_listener).readSplitInfo(m_persistId);
         }
         else
         {
             m_splitInfo = CCSplitDashboardLogic.readSplitInfo(m_persistId,false);
         }
         m_splitContent = new SplitContent(m_splitInfo,null,true);
     }
 


So you need to implement the listener in the following way:

Code:
 class MyListener implements CCSplitDashboard.IListener, CCSplitDashboard.IListenerWithPersistence
 {
     ...
 }
 


And then pass the listener via normal "prepare". Well, it's maybe not the super-cleanest way of passing it...

Kind regards! Björn
(request by mail - responded via forum)

The addon CCSplitDashboard provides an interface "IListenerWithPersistence" - but how to pass this listener into the CCSplitDashboard-processing?
...part of 20240108... - Kind regards, Björn
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
Hi Markus,

...also in 2024: thanks for your proposals!

Next update contains:

Code:
         String html = createHtmlText();
         OKPopup okp = OKPopup.createInstance("Some html text",html);
         okp.setTextContentType(ICCServerConstants.TEXTPANE_CONTENTTYPE_HTML);
 


Same for YESNOPopup.

Thanks + Regards! Björn

...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
Hi,
we introduced a new component TEXTEDITOR which provides the desired function with 20231211. Please check the demo workplace, "News" section.
Kind regards! Björn
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
We see that there are certain incompatibilities in the definition of the scales. Instead of "xscale" and "yscale" with some array info inside you now have to define:

Code:
         "scales": 
         {
             "x": 
             {
                 "display": true,
                 "scaleLabel": 
                 {
                     "display": true,
                     "labelString": "Month"
                 }
             },
             "y": 
             {
                 "display": true,
                 "stacked": true,
                 "scaleLabel": 
                 {
                     "display": true,
                     "labelString": "Revenue"
                 }
             }
 


We updated out demos accordingly. (Part of today's update.)

Kind regards! Björn
 
Profile for CaptainCasa -> Messages posted by CaptainCasa [5519] Go to Page: Previous  1, 2, 3 , 4 ... 366, 367, 368 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team