This question is answered.


Permlink Replies: 5 - Pages: 1 - Last Post: 23 Nov 22, 12:58 Last Post By: davidekholm Threads: [ Previous | Next ]
AndreWolff

Posts: 2,498
Registered: 14-Dec-2007
Groovy problem with java.util.logging.Level
Posted: 20 Nov 22, 01:06
 
  Click to reply to this thread Reply
I use this code:
  import java.util.logging.Level;
<%
if (folderBeforeImage) {
  JAlbum.logger.log(Level.SEVERE, "You should re-arrange your images and/or videos in folder {0}, so that the folders are located after all normal images and videos in the jAlbum Explorer", currentFolder);
%>

This is not accepted by groovy:
No such property: Level for class: Script468 in slidePagePar.htt at line number 217


What should I do to avoid this error message?
davidekholm

Posts: 4,398
Registered: 18-Oct-2002
Re: Groovy problem with java.util.logging.Level
Posted: 22 Nov 22, 11:20   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
The import statement needs to be within <% ... %> too, or replace Level with java.util.logging.Level
AndreWolff

Posts: 2,498
Registered: 14-Dec-2007
Re: Groovy problem with java.util.logging.Level
Posted: 23 Nov 22, 00:07   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The import statement needs to be within <% ... %> too, or replace Level with java.util.logging.Level
Sorry David, I did not show this above, but it is within <% ... %>, so something else gives the error message.
davidekholm

Posts: 4,398
Registered: 18-Oct-2002
Re: Groovy problem with java.util.logging.Level
Posted: 23 Nov 22, 09:07   in response to: AndreWolff in response to: AndreWolff
Correct
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
The import statement needs to be within <% ... %> too, or replace Level with java.util.logging.Level
Sorry David, I did not show this above, but it is within <% ... %>, so something else gives the error message.

So, what do you get if you write:
<%
if (folderBeforeImage) {
  JAlbum.logger.log(java.util.logging.Level.SEVERE, "You should re-arrange your images and/or videos in folder {0}, so that the folders are located after all normal images and videos in the jAlbum Explorer", currentFolder);
%>
AndreWolff

Posts: 2,498
Registered: 14-Dec-2007
Re: Groovy problem with java.util.logging.Level
Posted: 23 Nov 22, 10:15   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
So, what do you get if you write:
<%
if (folderBeforeImage) {
  JAlbum.logger.log(java.util.logging.Level.SEVERE, "You should re-arrange your images and/or videos in folder {0}, so that the folders are located after all normal images and videos in the jAlbum Explorer", currentFolder);
%>
Yes indeed David, that solves the problem.

Thanks!
davidekholm

Posts: 4,398
Registered: 18-Oct-2002
Re: Groovy problem with java.util.logging.Level
Posted: 23 Nov 22, 12:58   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
You're welcome
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums