[5.4a25] There is no data to display.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[5.4a25] There is no data to display.

Andreas Ernst
Hi,

i got a strange issue with the table grid. Sometimes i get the message:
'There is no data to display.'

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender


<html t:type="layout" title="${message:title} - TachyonBestellungen"
       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
       xmlns:p="tapestry:parameter">

   <table t:type="grid" source="tachyonenprodukte" row="tachyonprodukt"
rowsPerPage="50" t:model="model">
     <p:shopCell>
       <p class="rechts">
         <t:output t:value="tachyonprodukt.shop" format="summeFormat"/> €
       </p>
     </p:shopCell>
     <p:bestandCell>
       <p class="rechts">
         <t:output t:value="tachyonprodukt.bestand"
format="summeFormat1"/> St.
       </p>
     </p:bestandCell>
   </table>
</html>

public class Tachyonprodukte {

   @PersistenceContext(unitName = "de.aeits.extranet.PU")
   private EntityManager entityManager;

   @Property
   Tachyon tachyonenprodukte;

   @Property
   Tachyon tachyonprodukt;

   @Inject
   private BeanModelSource beanModelSource;
   @Inject
   private Messages messages;

   @Log
   public List<Tachyon> getTachyonenprodukte() {
     return
entityManager.createNamedQuery("Tachyon.findAllByStatusTrue").getResultList();
   }

   public BeanModel getModel() {
     BeanModel<Tachyon> model =
beanModelSource.createEditModel(Tachyon.class, messages);
     model.add("action", null);
     model.include("artnr", "artikel", "shop", "bestand");
     model.get("artnr").label("ArtNr");
     model.get("shop").label("Vk-Preis");
     return model;
   }

   public Format getSummeFormat() {
     return new DecimalFormat("#,##0.00");
   }

   public Format getSummeFormat1() {
     return new DecimalFormat("0");
   }

   @Log
   void setupRender() {
     System.out.println("TachyonProdukte - setupRender");
   }
}

After some change to the TML, save the file, and remove the changes,
save again, i got the datas.

Information:   [INFO] InternalModule.PageLoader Loaded page
'Tachyonprodukte' (de) in 981,123 ms
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] getTachyonenprodukte()
Information:   [EL Finer]: connection: 2013-11-14
11:18:59.064--ServerSession(873092013)--Thread(Thread[http-listener-1(4),5,main])--client
acquired: 1142255716
Information:   [EL Finer]: transaction: 2013-11-14
11:18:59.064--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--acquire
unit of work: 1790387230
Information:   [EL Finest]: query: 2013-11-14
11:18:59.064--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--Execute
query ReadAllQuery(name="Tachyon.findAllByStatusTrue"
referenceClass=Tachyon sql="SELECT ARTNR, ARTIKEL, ATT_ARTIKEL,
ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, STATUS, URL FROM TACHYON
WHERE (STATUS = 1)")
Information:   [EL Finest]: connection: 2013-11-14
11:18:59.065--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--Connection
acquired from connection pool [default].
Information:   [EL Fine]: sql: 2013-11-14
11:18:59.065--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--SELECT
ARTNR, ARTIKEL, ATT_ARTIKEL, ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP,
STATUS, URL FROM TACHYON WHERE (STATUS = 1)
Information:   [EL Finest]: connection: 2013-11-14
11:18:59.081--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--Connection
released to connection pool [default].
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT]
getTachyonenprodukte [[de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B1
], de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B3 ],
de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B4 ], [#### more table
datas ####]]
Information:   [INFO] AppModule.TimingFilter Request time: 2614 ms
Information:   [EL Finer]: transaction: 2013-11-14
11:18:59.633--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--release
unit of work
Information:   [EL Finer]: connection: 2013-11-14
11:18:59.633--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--client
released
Information:   [INFO] AppModule.TimingFilter Request time: 10 ms

Related databases MySQL and MaxDB, AppServers GlassFish 3.x and 4.

The very strange is, that i got two other pages without this issue.

Any ideas?
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
[hidden email] | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [5.4a25] There is no data to display.

Thiago H de Paula Figueiredo
On Thu, 14 Nov 2013 08:40:21 -0200, Andreas Ernst <[hidden email]> wrote:

> Hi,

Hi!

> i got a strange issue with the table grid. Sometimes i get the message:  
> 'There is no data to display.'

This will happen if the source parameter provides zero objects to be shown.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [5.4a25] There is no data to display.

Andreas Ernst
Am 14.11.13 12:06, schrieb Thiago H de Paula Figueiredo:

> On Thu, 14 Nov 2013 08:40:21 -0200, Andreas Ernst <[hidden email]> wrote:
>
>> Hi,
>
> Hi!
>
>> i got a strange issue with the table grid. Sometimes i get the
>> message: 'There is no data to display.'
>
> This will happen if the source parameter provides zero objects to be shown.
>

I know, but only the grid source is null. The database has datas.

No datas displayed:

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender

Datas displayed:

Information:   [INFO] InternalModule.PageLoader Loaded page
'Tachyonprodukte' (de) in 981,123 ms
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] getTachyonenprodukte()
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT]
getTachyonenprodukte [[de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B1
], de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B3 ],
de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B4 ], [#### more table
datas ####]]
Information:   [INFO] AppModule.TimingFilter Request time: 2614 ms
Information:   [EL Finer]: transaction: 2013-11-14
11:18:59.633--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--release
unit of work
Information:   [EL Finer]: connection: 2013-11-14
11:18:59.633--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--client
released
Information:   [INFO] AppModule.TimingFilter Request time: 10 ms

When no datas are displayed the method getTachyonenprodukte() is not called.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
[hidden email] | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [5.4a25] There is no data to display.

Andreas Ernst
Am 14.11.13 14:22, schrieb Andreas Ernst:

> Am 14.11.13 12:06, schrieb Thiago H de Paula Figueiredo:
>> On Thu, 14 Nov 2013 08:40:21 -0200, Andreas Ernst <[hidden email]>
>> wrote:
>>
>>> Hi,
>>
>> Hi!
>>
>>> i got a strange issue with the table grid. Sometimes i get the
>>> message: 'There is no data to display.'
>>
>> This will happen if the source parameter provides zero objects to be
>> shown.
>>
>
> I know, but only the grid source is null. The database has datas.

To make it more clear:

@Log
void setupRender() {
   List<Tachyon> produkte =
entityManager.createNamedQuery("Tachyon.findAllByStatusTrue").getResultList();
   System.out.println("Count Products: " + produkte.size());
}

######################

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   [EL Finer]: connection: 2013-11-14
14:56:52.084--ServerSession(2097590289)--Thread(Thread[http-listener-1(2),5,main])--client
acquired: 41491008
Information:   [EL Finer]: transaction: 2013-11-14
14:56:52.084--ClientSession(41491008)--Thread(Thread[http-listener-1(2),5,main])--acquire
unit of work: 1554669828
Information:   [EL Finest]: query: 2013-11-14
14:56:52.084--UnitOfWork(1554669828)--Thread(Thread[http-listener-1(2),5,main])--Execute
query ReadAllQuery(name="Tachyon.findAllByStatusTrue"
referenceClass=Tachyon sql="SELECT ARTNR, ARTIKEL, ATT_ARTIKEL,
ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, STATUS, URL FROM TACHYON
WHERE (STATUS = 1)")
Information:   [EL Finest]: connection: 2013-11-14
14:56:52.084--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--Connection
acquired from connection pool [default].
Information:   [EL Fine]: sql: 2013-11-14
14:56:52.084--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--SELECT
ARTNR, ARTIKEL, ATT_ARTIKEL, ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP,
STATUS, URL FROM TACHYON WHERE (STATUS = 1)
Information:   [EL Finest]: connection: 2013-11-14
14:56:52.106--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--Connection
released to connection pool [default].
Information:   Count Products: 406
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender

######################

As you can see, the table has 'Count Products: 406' rows, but there is
no call of getTachyonenprodukte.

That is the issue, sometimes the method is called sometimes not.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
[hidden email] | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]