[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 [5112] Go to Page: 1, 2, 3  ...  339, 340, 341 Next 
Author Message
(from mail conversation)

There is the default function FIXGRIDListBinding.onOpenGridExportFunctions(ActionEvent) that you can bind to a button/icon/... and that opens up a dialog to export the grid content into various formats.

You may also bind the individual grid export functions directly into some own processing by using the APIs:

Code:
 FIXGRIDListBinding m_grid = ...;
 
 ...
 ...
 m_grid.getExporter().exportToXMLWholeGrid(false);
 m_grid.getExporter().exportToXLSXWholeGrid(false);
 etc.
 


The parameter false means that all items are exported. When passing "true" then only the currently selected lines are exported.

Kind regards! Björn
Hi Klas,

our mobile demos are just normal CaptainCasa pages - of course checked to run on small screen sizes.

In mobile scenarios the screen is scaled automatically to reflect the client device's resolution. You can also explicitly define a scaling of your dialoge by e.g. appending "?ccscale=1.25" to your URL.

Please check in the demo workplace: Containers > Adaptice COntainers > Flexible Lines - this is the most efficient and simplest way to create adaptive layouts: you just have to separate your screen in "parts" (e.g. using PANE/BOX/FODABLEPANE/...) and arrange them in a ROWFLEXLINE. The client will automatically arrange in new lines according to available screen space. There are also nice (?) examples in Containers > Adaptice COntainers-Examples.

With images: yes you can reference images in IMAGE-component with external, absolute URLs as well. Please then explicitly define height and width (IMAGE SRC="http://www.xxx.yyy/image.png" HEIGHT... WIDTH...)

If you have images that are managed e.g. in database (or which you keep in some area in the file system): use class TempFileManager to directly bring them as URL into you screens. TempFileManager allows to pass a some byte[] array and converts this into a URL so that the browser can access this info.

Hope, this is the info you are looking for...?

Regards, Björn
...and: the same is true for faces-config.xml:

Here the header part that does not cause problem messages with Eclipse is:

Code:
 <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
               xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee <a href="http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" target="_blank" rel="nofollow">http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd</a>"
               version="2.2">    
 


Again, the files "before" are correct!!! So you do not have to change (and can remove the problem messages in Eclipse...).

Kind regards, Björn
Hi Markus,

thanks for this post...

The big question is: why does Eclipse show these errors - because the web.xml is totally correct. This is also mentioned in the link you refer to: "The overall interesting question is why Eclipse stopped working for the former web.xml even though it seems that it was totally correct. Only the namespaces and version number changed, but that worked for years in the past."

Kind regards! Björn


PS: Just for all, the relevant part of the link mentioned by Markus is to replace:

Code:
 <web-app    xmlns="http://java.sun.com/xml/ns/javaee"
             xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                                 <a href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" target="_blank" rel="nofollow">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>"
             id="WebApp_ID" version="3.0">
 


with

Code:
 <web-app    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
             xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                                 <a href="http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" target="_blank" rel="nofollow">http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd</a>"
             id="WebApp_ID" version="3.1">
 
...we found the problem...

Swing has a function component.getLocationOnScreen() returning an X/Y value. With this coordinate we loop through the screen definitions + check in which screen the coordinate is locacted.

Due to the horizontal scrolling in your grid, Swing returns a location which is outside the current screen and is located on the other screen already... We now check the screen coordinates of the component against the screen coordinates that hold the component... - so that the window coordinates overrule the component coordinates...

OK, after some long time I had the pleasure (?) to debug through Swing code again...!

Thanks for your example, which helped a lot. The update is part of next update. (Or earlier on your request.)

Kind regards! Björn
...we took a look in the meantime. The reason for the mis-calculation is the horizontal scrolling inside the grid (you placed a 6000 pixel wide column)... This confuses the positioning a bit...

Thanks for your example. We try to find a solution that does not put too much fire into the Swing client...

Regards, Björn
(from mail conversation)

You can call setLeft(int) and setTop(int) on a Modal/ModelessPopup instance. How can you position the popup "in the edges"?

Solution: just pass a much too high value in both of the methods - the client will automatically move the popup position into the visible area.

So, for "right top" you call:
Code:
 ModalPopup p = ...;
 p.setLeft(100000);
 p.setTop(0);
 


For other types of positioning: please check the popup demos in the demo workplace. You can e.g. open a popup relative to a certain component that you can address by its ID-value.

Regards, Björn
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
(from mail conversation)

Use case is: a FIXGRID has a PERSISTID - this means: its sort status (and columns sequence and column widths) will be saved per user.

When you load the grid with data at point of time the grid is built up and them select the first item...:


Code:
 FIXGRIDListBinding<...> m_grid = new FIXGRIDListBinding();
 ...
 ...
 m_gird.getItems().add(...);
 m_gird.getItems().add(...);
 m_gird.getItems().add(...);
 m_gird.getItems().add(...);
 ...
 m_grid.selectItem(0);
 


...then the grid will not show the first item - because the sorting is applied during the build up.

You need to be part of the build-up processing. There are two way:

Code:
     FIXGRIDListBinding<GridItem> m_grid = new FIXGRIDListBinding<GridItem>()
     {
         @Override
         public void initialize()
         {
             super.initialize();
             selectItem(0);
         }
     };
 


or (since 20220110):

Code:
         m_grid.addConfiguredByLayoutListener(new IConfiguredByLayoutListener()
         {
             @Override
             public void onInitializationByLayoutFinished()
             {
                 m_grid.selectItem(0);
             }
         });
 


Kind regards! Björn
...no trick, just normal processing: please check demo workplace (https://www.captaincasademo.com/ccdemos/workplace.workplaceRisc.risc):

General > Workplace Management > Content Lifecycle

Or, for fast readers:

Code:
     class MyLifecycleListener extends WorkpageDefaultLifecycleListener
     {
         public boolean close()
         {
             protocol("close()");
             if (m_dataWasChanged == false)
                 return true;
             else
             {
                 YESNOPopup.createInstance("UnsavedData",
                                           "Data was changed. Do you really want to exit?",
                                           new YESNOPopup.IYesNoListener()
                                           {
                                               public void reactOnNo()
                                               {
                                               }
                                               public void reactOnYes()
                                               {
                                                   getWorkpageContainer().closeWorkpageForced(getWorkpage());
                                               }
                                           });
                 return false;
             }
         }
 
 


Kind regards! Björn
Hi,

yes, you need to access IWorkpageContainer:

Code:
         getOwningDispatcher().getWorkpageContainer().getAllWorkpages()
 


This will return the number of workpages in the current "main" workpage container. In case you split up the workpage containers (e.g. by drag drop of workpages) you need to call:

Code:
         getOwningDispatcher().getWorkpageContainer().getAllWorkpagesIncludingSubWorkpageContainers()
 


Kind regards, Björn
OK, so the relevant stacktrace is:


Code:
 Caused by: java.lang.ClassNotFoundException: javax.mail.Authenticator
                                               	at java.net.URLClassLoader.findClass(Unknown Source)
                                               	at java.lang.ClassLoader.loadClass(Unknown Source)
                                               	at java.lang.ClassLoader.loadClass(Unknown Source)
                                               	... 50 more
 


If running project without Maven: add all .jar files that you added (esp. the one containing the mail-processing) to <project>/webcontent/WEB-INF/lib. Then reload the server, so that the .jar file(s) are located in tomcat/webapps/<yourapp>/WEB-INF/lib.

Then there are better chances! ;-)

If using Maven: rerun Maven ("clean package"), then reload in CaptainCasa toolset. Check that your .jar files of the target/directory are correclty transferred to the tomcat/webapps/<yourapp>/WEB-INF/lib directory.

Hope this helps!

Björn
...thanks for this info - you are clearly located in a client-roudtrip (or in other words: forget my previous assumptions...)

The logs are written to:

tomcat/works/Catalina/localhost/<yourapp> by default. There are rotating logs so pick the log with the newest date...

Could you check there?

Thanks! - Björn

PS: in the logging configuration (=> can be conifgured in tools in project configuration ==> Logging) you can set the log to output to console directly. For development this is often the nicest option.
Hi Klas,

I assume that the sending of the mail is not done within a UI-request-response-thread - but in some parallel thread.

So I assume that the message is coming from the Statusbar-output that you are doing in the program.

Regards! Björn

PS: If my assumptions are wrong: please add the full stack trace.
...is available in the download area.

Details about changes: http://www.captaincasa.com/docu/eclnt_changelog
 
Profile for CaptainCasa -> Messages posted by CaptainCasa [5112] Go to Page: 1, 2, 3  ...  339, 340, 341 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team