Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Vector auf notEmpty überprüfen

Empfohlene Antworten

Hi!

Ich möchte mit Struts <logic:notEmpty> einen Vector überprüfen ob sich darin Werte befinden! Dieser liegt in einem DTO! Wenn ja soll die jsp halt etwas anzeigen!

Das Problem ist aber jetzt das die jsp immer das anzeigt was im notEmpty Tag steht auch wenn der Vector null ist!

Warum?

Gruss

Jo

Hi,

ich verstehe nicht warum das mit einem leeren Vector geht, was gibt denn isEmpty vom Vector aus?

Welche Struts Version?

http://jakarta.apache.org/struts/userGuide/struts-logic.html#notEmpty

Im blauen Bereich steht das das auch mit Collections geht.

Alternativen:

initialisiere den Vector erst wenn du auch was hineinschreibst.

Oder setze ihn wenn er leer ist auf null bevor du ihn an den request übergibst.

Gruß Jaraz

Hast du die logic tld auch includet?

  • Autor

na logisch! Sonst würd der ja auch schon wegen den logic tags meckern!

Das Problem hat sich gerade auch in Wohlgefallen aufgelöst als ich meinen Kollegen mal gefragt habe ob er ein leeres DTO in den Vector packt wenn kein Anhang vorhanden ist! JAAAA, hat er gemacht!

Jetzt nicht mehr und siehe da es funktioniert!

Dank dir trotzdem!! ;)

Gruss

Jo

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.