How can I evaluate if a collection is empty or not with struts logic tag?

How can I evaluate if a collection is empty or not with struts logic tag?
I tried with logic empty tag. but the tag evaluated if a collection is null or not.
I would like to do like this below.
List list = new ArrayList();
set(list);
<logic:XXXX name="someForm" property="list">
The list size is 0.
</logic>thanks in advance.

U can use :
<logic:present name="urform" property="urlist">
</logic:present>
to check "urlist" is empty or not

Similar Messages

  • How can we check whether a ResultSet is EMPTY or NOT ?

    i'm getting some data inside ResulSet (using JDBC inside Servlet).
    now i want to redirect response according to ResultSet...., if ResultSet is EMPTY then on diff page, else on different page...
    how can i check whether a ResultSet is empty or not...
    i've used next() , wasNull() methods ,,, but not solving the purpose...
    thanx in advance...

    What you could do is to ask the database fora
    record count and check that for zero.
    How?????You just do an SQL statement but instead of the list of fields after SELECT you put
    SELECT count(*) FROM ...... WHERE .....
    That returns a single integer value into the resultset giving the number of matching records currently in the database.
    The trouble is you can't be certain that when you subsequently access the records the number won't have changed, because databases are generally accessible to more than one process at a time and some other process might add or delete a record between counting and retrieving or, for that matter, during the process of retrieval.
    Also the count is likely to take more time than just doing rs.next() and seeing if you get a record.
    Since you seem to be in a servlet environment you should consider doing the database query and the first rs.next() at the top of the servlet/JSP that presents the results and, if there are no records, using getServletContext.getRequestDispatcher(...).forward(request, response) to swich to your error page if it returns false.
    So the stucture looks like:
    rs = stmt.executeQuery(......);
    if(!rs.next())
          getServletContext().getRequestDispatcher("/noresultspage.jsp").forward(request, response);
    else {
         do   {
             .... display result data
          } while(rs.next());
        }

  • In Lightroom mobile how can move photos within the collection????

    In Lightroom mobile how can move photos within the collection????

    What you can do is to move (or copy) a photo form one collection to another. This can be triggered via the top right app menu item from grid view. Same menu is available when you open up an image for editing. Hope that helps. -Guido

  • How can I evaluate "S1" (S1.mp3) as an element?

    I have a Button named "Bt1P" that when I click on it, the Sound "S1" starts to play
    (Note "S1" is the Linkage class specified for "S1.mp3" in the library)
    This is the code that works:
    Bt1P.addEventListener (MouseEvent.MOUSE_DOWN, Bt1PDown);
    function Bt1PDown (event:MouseEvent):void {
        var playSound = new S1();
        playSound.play();     
    But In case I want to play for example "S2" (S2.mp3) instead of "S1" (S1.mp3),
    how can I evaluate the "S1" as an element?
    For example I tried this code:
        var test:String = "S" + 1
        var playSound = new this[test];  // instead of S1
    and it didn't work.... here is the Error:
    Error #1007: Instantiation attempted on a non-constructor.
    at Asmaa_fla::MainTimeline/Bt1PDown()
    Anyone has a suggestion please??

    "S"+1 would be an error waiting to be reported, mixing data types ("S"+String(1) would be better, though wouldn't make sense as a realistic bit of code unless 1 was in variable form).
    But you can dynamically load a class using a string value....
    var ClassRef:Class = Class(getDefinitionByName("S1"));
    var  playSound:* = new ClassRef();

  • How can you evaluate a graphed point in numbers

    After you make a graph and incorporate a trendline. How can you evaluate that trend line at a specific x/y value point, even if it is not a graphed point in your table?

    If you know the constants from the trendline then you can use them to extrapolate.  To get the constants check the "Show Equation" box in the Chart Inspector > Series > Trendline
    On the graph you will see the equation for the trendline:
    In this case the equation is "y=2.6x + 2"
    I added a new column to the data table and named is "Y extrapolated".
    Then I highlighted the graph
    Then click on the "sprocket " for the X values in the data table and select the "Share X Values"
    Then click and hold the little circle at the bottom right corner of the selection in the table (to add the new column to the graph), then drag to the right one colum (my column is green).
    Then in the new column add the formula as shown:
    C7=2.6*A7+2
    select C7 and fill down  as need (by clicking and holding on the little circle at the bottom right of the selected cell).
    I hope this helps

  • How can I download everything on my Ipod to an account with a new name?

    How can I download everything on my Ipod to an account with a new name?  (my wife has been putting songs and books on her Ipod using my account, and she now would like to setup an account using her name)

    Hello stephencadmaster,
    While you cannot transfer purchases to a different Apple ID, you can utilize Family Sharing. I've linked to an article that explains how to share content between Apple IDs using this feature:
    Family Sharing - Apple Support
    All your family’s purchases, on all your family’s devices.
    Once you’ve set up Family Sharing, all the eligible songs, albums, movies, TV shows, books, and apps ever purchased by family members are immediately available to everyone else in the family. And, of course, so are new purchases. The content appears automatically in the Purchased tab in iTunes, iBooks, or the App Store for each family member. Just select the family member whose collection you’d like to browse, then download and play the content you choose. Other family members can access your collection in the same way. If you want to keep some purchases private, you can choose to hide individual items.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • How can I set my WebI filters to Null and not Null

    Folks,
    I have created a report in WebI and now I am to set up some filters as Null and some Not Null.
    How can I set my WebI filters to Null and not Null?
    Regards,
    Bashir Awan

    Hi,
    As you said you could do it at the report level and also at the universe level.
    One more way is to create the filters in the universe levele and add them in thequery filter.
    Ex: in the filter you need to write :
    Column1 is null and and column 2 is not null etc.
    Hope this will help.
    If this did't  solve your problem then please explain it in detail.
    Cheers,
    Ravichandra K

  • How can I delete some music from my iCloud but not from my iTunes in my computer? please??

    how can I delete some music from my iCloud but not from my iTunes in my computer? please??

    iCloud doesn't store your music.

  • I have an old mpg video file, taken with a very early model "smart phone", that opens and plays fine in my newly "rebuilt" iPhoto library. I cannot open, edit it or share it with any other software. How can I fix it, to be able to do anything with it?

    I have an old mpg video file, taken with a very early model "smart phone", that opens and plays fine in my newly "rebuilt" iPhoto library. I cannot open, edit it or share it with any other software. How can I fix it, to be able to do anything with it?
    Detail:
    I've recently purchaced a 4TB Thunderbolt drive to store my "vast" music and photo libraries. iPhoto had an issue reading the moved library, so I bought and used iPhoto Library Manager to "rebuild" it. Apart from much of the original data such as date taken & camera used etc, it appears to be working well. The aforementioned mpg video was taken some 9 years ago, using an early model "iMate" smart phone, and opens and plays fine on iPhoto, but I cannot open it with anything else, (I've tried iMovie, VLC players, Wondershare and Handbrake) nor can I share it. I just want to edit it, and share it with family.
    Any help would be appreciated...

    No - not iMovie, VLC, Wondershare or Handbrake... Quick time starts with a "CONVERTING", then I get
    I've looked at the "tell me more" links, tried downloading some of the movie players there. I'm begining to think the file is corrupt.
    Thanks for getting back to me again though - appreciate it...

  • How can I convert multiple files at one time and not one at a time

    How can I convert multiple files at one time and not one at a time

    Hi Plissey1950,
    Sorry for the lengthy delay to a response.  Are you trying to convert multiple files to individual PDF files at the same time? (not combine them).  If so, you'll need to use Adobe Acrobat for this function. The CreatePDF service does not have the ability to convert multiple files to multiple individual PDF files.
    Thanks,
    David

  • I've moved my Aperture library to another computer, and masters are referencing an old path name.  How can I update these references?  Reloctating masters does not work in this case :(

    I've moved my Aperture library from one computer to another using Finder.
    I merged the library with one which was already on the computer.
    Now, the photos I imported have reference to the old path name on my old computer.
    How can I update these references as "Relocate Masters" does not work in this case?

    Just one suggestion to be able to reconnect all at once:
    Create a smart album containing the images with missing masters:
    File -> New ->  Smart Album,     and add a rule: File Status is "Missing"     (or File Status is "offline")
    Then select the images in this album and go to the File menu:
    and select:   File -> Locate referenced File
    If you are lucky, Aperture will reconnect all at once, if you point the first image version to its counterpart.

  • How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account an

    How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently
    it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account and in the past syncing was no problem.  What setting has changed?

    The phone number format as well as the date language and format and the time format are controlled by the Region Format setting. Go to Settings > General >International > Region Format.  When you change a region format, you can go back one page (to International) and see an example of the date/time/phone number format that your selected region format will produce.

  • In iTunes 11.0.2.26, an Albums search by track names returns albums as if they only have one track on them, but I still want to access the entire album. How can I have the search results show the entire album (with just the searched for name highlighted)?

    Hello, all.
    In iTunes 11.0.2.26, an Albums search by track names returns albums as if they only have one track on them, but I still want to access the entire album. How can I have the search results show the entire album (with just the searched for name highlighted)? For instance, I'm wanting to play an album with a particular track on it or I'm searching for albums that include that track. iTunes incorrectly assumes that all I'm after is that one track and then incorrectly displays the album as if there is only one ttrack on it. This is a bonkers default setting. Can I change this?

    Click the search magnifying glass and uncheck "Search entire library".
    Type in the name of the track.
    Click the album of interest to show tracks.
    Select the track.
    Press the X in the search box to clear the search.
    Double click the track you want to start playing first.
    tt2

  • How can i use Itunes to update more than one IPad with more than one owner

    How can i use Itunes to update more than one IPad with more than one owner?  I own an IPad and my wife owns an IPad.  I want to use my system to update both IPads.  We have different Apple Accounts and different applications.  Is this possible?

    Of course, that is too easy.  I am such a bonehead.

  • How can I migrate an Aperture library from an external HDD with Mac OS Extended (Journaled, Encrypted) format?

    How can I migrate an Aperture library from an external HDD with Mac OS Extended (Journaled, Encrypted) format?
    I used to store my pictures on an external hard drive using the latest version of Aperture. Now I tried migrating my Aperture library to Photos. However, after a short moment an error message popped up telling me that "Photos was unable to make a copy of your library before preparing it. Photos does not have the necessary permissions...".
    My external HDD doesn't need any permission repairs nor is the system prohibited to read from or write to it.
    Thanks for any advice in advance!
    Gohtac

    My guess is that the encryption is the problem for the new app.

Maybe you are looking for

  • IPhone 5 power button doesn't work

    My power button doesn't work and I still have the warranty and I wanted to know that if apple replaces my iPhone will I have to renew my contract with Verizon

  • Sd card not formatted after ovi maps update

    Hi. I have a problem with my N82 Series Nokia. I wanted to update my maps via Ovi Software. I do this and it worked fine. Afterwards I tried to check the new maps but only a green area appeared. I accessed the sd card in the phone and only get the me

  • Use of purchased film connected to interactive whiteboard

    Hi, I bought a film from iTunes to play on my iPad in classroom as I'm a teacher. When I connected my iPad2 to the Hitachi interactive starboard I got a 'not authorised' and couldn't use it! Is there any way I can link properly so as to be able to co

  • Addon installation error

    Hi All, I am upgrading BI system from BI cont 7.03 to BI cont 7.04, installation is not starting complaining Following messages are thrown in the SAINT. OCS package SAPK-7040INBICONT does not match the current software component vector BI_CONT,704 =

  • Feature request: a smarter phonebook

    Hi, Today we struggle daily with numerous lists of data on devices: thousands of songs in an mp3 player, or countless emails, or just the files in your computer. And the tools for managing those lists are never good enough. When it comes to phonebook