Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7925791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:27:42+00:00 2026-06-03T18:27:42+00:00

Currently my code is like <h:panelGroup rendered=#{templatePrescriptionMaintenanceBackingBean.allSelectedMedicationList != null && !empty templatePrescriptionMaintenanceBackingBean.allSelectedMedicationList}> <b>List of

  • 0

Currently my code is like

<h:panelGroup rendered="#{templatePrescriptionMaintenanceBackingBean.allSelectedMedicationList != null && !empty templatePrescriptionMaintenanceBackingBean.allSelectedMedicationList}">
        <b>List of Selected Drugs</b> // and some other stuff
</h:panelGroup> 

Now allSelectedMedicationList will do lot of process in backend. Calling webservice and adding data in current DB and so on…

Now issue arise when I need to check null or empty – 2 times that method called here. Once again when I use same method with datatable it will call again 1 more time.
I think to create one method or something for JSF it self that will check null and empty at same time and return list. Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:27:46+00:00Added an answer on June 3, 2026 at 6:27 pm

    The operator “empty” already does what you want, you don’t need to also check null.

    From http://docs.oracle.com/javaee/5/tutorial/doc/bnahq.html#bnaik:

    Empty: The empty operator is a prefix operation that can be used to determine whether a value is null or empty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm refactoring some code that currently looks like this: $$('#wrapper > div').each(function(e){ if((e.id!='header') &&
I'm currently using prototype, with some code like: function in_viewport(foo) { var offset =
My code currently looks like this <% if (request != null) { bustOut; }
I currently use code like this that works at refitting the bitmaps for different
Using dotnet 2.0. I currently have code like this : DataView dv = new
Currently my code looks like this: <div id=content> <div id=1> <img src= alt= onmouseover=document.getElementById('1').style.visibility
My code currently looks like this: a = 3 b = 4 c =
My code currently looks like this: private Foo myFoo; public Foo CurrentFoo { get
My code currently looks like this: <div style=position: fixed; width: 35.25%; height: 6.75%; left:
Currently, my code is like this: for control in self.controls(): self.connect(control, SIGNAL('clicked()'), lambda: self.button(control.objectName()))

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.