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 891787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:56:41+00:00 2026-05-15T13:56:41+00:00

For my application I want to have users with different permissions. One permission would

  • 0

For my application I want to have users with different permissions. One permission would allow a user to view the data from my database, while another permission would allow them to edit the data. On log in I would check their permission to determine wether they can edit the data. I am looking for some way to disable the entirety of my page if the user has the read-only permission. Is there a simple way to disable everything within the <h:form> tag? I would need to be able to disable multiple pages, hopefully by just looking at one boolean in by backingbean. Any help would be greatly appreciated.

-EDIT-
Is there any containers or like that I could wrap around my inputs that could be set to disabled? This way I would only need to reference the diable in one place and could also leave each field to set its own disable property if that is needed in other logic I have?

  • 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-05-15T13:56:42+00:00Added an answer on May 15, 2026 at 1:56 pm

    You can disable the buttons, links, input fields (everything that allows editing) etc… pointing them all to the same value in the backing bean.

    <h:inputText disabled="#{!bean.permissionToWrite}">
    

    I don’t know any way to disable everything contained in a form, but you may not want to do that because you may want the user to submit search queries (i.e. a search box) withing the form.

    Update: answering to the comment of Alex Larzelere.

    IMHO in this case is better to use disabled rather than rendered because you may want to display the value of a field to the user in an inputText box, but not let him to modify it. If you don’t render it, he can’t see it. You could use outputText as well to display it but then you have to maintain two elements instead of one.

    Update answering to the edit in the question:
    You can wrap your components inside a h:panelGroup for example and render it or not depending on your logic, but you can’t disable the input fields that are inside from the h:panelGroup, you have to do it individually.

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

Sidebar

Related Questions

i have created an application which show data from user current location. I want
I have database application, I want to allow the user to restore the deleted
In my web application we have many users.I want to set permission for each
We have a server application that we want to restrict non-users from triggerring it
I have an application in which I want to authenticate a user from a
We have an ASP.NET application that manages it's own User, Roles and Permission database
I want to build a web application where users can register and have a
I want to have functionality on my application that lets a user check off
I have sales application. When the user click on EditText the popup calculator want
I have a silverlight application that contains Bing map. I want when the user

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.