[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Weird behaviour of Tiled Area  XML
Forum Index -> Development
Author Message
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Hi,

I want to work with a tiled area, so I incorporated the Demo Workplace Example into my page, which is a bit more komplex.

After that, I created an own tile and added it as a fourth tile into the tiled area.
After that, I threw out the home address tile.
At this point something weird happend: Suddenly, the tiled area was empty. Debugging showed that the Method getPageName is not called any more. It seems to me, the framework does not even try to render the tiles any more (because in order to do that, the jsp name needs to be gotten by the framework).

In the end, I didn't even get the original example with the three tiles to work any more. But with my fourth tile, things suddenly work.

Here is an illustration of what works or not by showing the addTile-Operations...

works:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht, "33%;100");
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "33%;100");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "33%;100");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress, "33%;100");

works:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht, "33%");
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "300");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "300");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress, "300");

works:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht, "33%");
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "300");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "100%");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress);

works:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht, "200");
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "200");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "200");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress, "200");

works not:
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress);
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress);
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress);


works not:
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "33%;100");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "33%;100");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress, "33%;100");

works not:
m_tiledAreaBinding.addTile("HOME","Home Address",m_homeAddress, "300");
m_tiledAreaBinding.addTile("BUSINESS","Business Address",m_businessAddress, "300");
m_tiledAreaBinding.addTile("VACATION","Vacation Address",m_vacationAddress, "300");

works not:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht, "25%");

works not:
m_tiledAreaBinding.addTile("RVT", "Regelverstoßübersicht", m_regelverstossUebersicht);


My questions are:
1. Some of my tiles are shown like foldable areas isOpened=true, others like isOpened=false. Why can that be.
2. Within the tiled area, the fact if some tiles are rendered or not seems to be dependent on whether other tiles are present in the pane or not. That seems magic to me. How can it be.
3. What is a good strategy for setting the height attribut when calling addTile(...)? Is something like "33%;100" OK?

Thanks,

Björn
CaptainCasa

Power User
[Avatar]

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

Hi,

the HEIGHT-definitions that you pass are not the problem.

The problem seems to me that you need to be a bit careful with managing ids.
Every time you open up a tiled area and when you re-arrange the structure, then this is persisted. The location by default is: /tomcat/work/Catalina/localhost/<app>/eclntstreamstore/cctiledarea

The default compatbility direction is: you may add new areas (these are automatically added) but you must not remove areas.

If playing around with the heights it is a good idea to always remove the xml-file which keeps the current tiled-area-state and then test.

Of course you can also add an own "persistor" to the tile area binding (setPersistor) which behaves exactly the way you want, and which has own compatibility rules.

Hope, this helps for making things more visible ;-)

Regards, Björn

Björn Müller, CaptainCasa GmbH
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

What you write explains exactly what I saw. I'll have a closer look at the cctiledarea-Directory in the future.
I'd suggest you add this point to the dev guide - a beginner like me naturally gets into trouble here, when incrementally playing around.

My lesson learned here is to have a close look at the tomcat runtime directory and the recently modified or added files in this directory. If a had done this, I could have found the XML-File by myself. Or I could have grepped through the persistId I had given my tiled area.

Thanks for your help,

Björn
CaptainCasa

Power User
[Avatar]

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

Hi,

just one more information: as any other runtime information, that CaptainCasa stores, this is stored in the so called "StreamStore".

By default the StreamStore writes/reads to/from the file system, by default from some subdirectory of the servlet container's local temp directory. There is also a possibility to customize the directory, and there is a stream store implementation going to a relational database.

So, the directory tomcat/work/...etc... is just a result of the stream store "architecture". This is documentes in the Dev. Guide.

I just checked... + will also make the implementation of Tiled-Area a bit more tolerant against compatibility "violations"...

Thanks for your input!

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team