How can I retrieve selected checkboxes by user into a JPA application?

Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
<h:selectManyCheckbox value="#{employee.selectedItems}">
<f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
</h:selectManyCheckbox>
The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
public void seleccionarEmpleado(int id_empleado){
Query q = em.createNamedQuery("Employee.findByIdEmployee");
q.setParameter("IdEmployee", IdEmployee);
List<Empleado> listaEmple = q.getResultList();
for(IdEmployee emple1 : listaEmple){
emp.setIdEmployee(emple1 .getIdEmployeeo());
emp.setName(emple1 .getName());
emp.setLname(emple1 .getLname());
emp.setTel(emple1 .getTel());
emp.setAddress(emple1 .getDir());
emp.setTech(emple1 .getTecha());
Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
<h:selectManyCheckbox value="#{employee.selectedItems}">
<f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
</h:selectManyCheckbox>
The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
public void seleccionarEmpleado(int id_empleado){
Query q = em.createNamedQuery("Employee.findByIdEmployee");
q.setParameter("IdEmployee", IdEmployee);
List<Empleado> listaEmple = q.getResultList();
for(IdEmployee emple1 : listaEmple){
emp.setIdEmployee(emple1 .getIdEmployeeo());
emp.setName(emple1 .getName());
emp.setLname(emple1 .getLname());
emp.setTel(emple1 .getTel());
emp.setAddress(emple1 .getDir());
emp.setTech(emple1 .getTecha());
Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

Similar Messages

  • How can give only select privilge to user

    hi all
    how can give only select privilge to user
    "connect" have many sytem privilge such as
    alter session,
    create cluster,
    create database link,
    create sequence,
    create session,
    create synonyms
    create table,
    create view,
    "resource" have many sytem privilge such as
    create cluster,
    create indextype,
    create operator,
    create procedure,
    create sequence,
    create table,
    create trigger,
    create type
    i want give only select privige to user

    afzal wrote:
    hi all
    how can give only select privilge to user
    "connect" have many sytem privilge such as
    alter session,
    create cluster,
    create database link,
    create sequence,
    create session,
    create synonyms
    create table,
    create view,
    "resource" have many sytem privilge such as
    create cluster,
    create indextype,
    create operator,
    create procedure,
    create sequence,
    create table,
    create trigger,
    create type
    i want give only select privige to userFirst of all, SELECT privilege is OBJECT type of privilege. It is not a SYSTEM privilege.
    Some of the examples for granting this priv I have mentioned below:
    Examples
    Suppose you own emp table. Now you want to grant select privilege on this table to other user “SAMI”.
    grant select on emp to sami;Suppose you want to grant select privilege on emp to all other users of the database. Then
    grant select on emp to public;

  • How can I import selected photos from iPhoto into Premiere Elements on the Mac?

    I run Premiere Elements on a Mac (Lion O/S). I have more than 13,000 photos in iPhoto that I would like to be able to access from Premiere (to include shots relevant to the video I am compiling).  How do I do this?
    I also have Photoshop Elements but not yet installed it since I do not want to replicate all these photos - will consume too much hard drive space.
    I look forward to your advice.
    Thanks
    John W
    Sydney, Australia

    The way I do this on my iMac : I select the required photos in iPhoto, then I export them on a specific folder I create for the video,
    generally a subpart of the area where I have captured my HDV footage with Premiere Elelements.
    Then, I import these specific pictures in my Premiere Elements project.
    For Photoshop Elements, it has 2 parts : the organizer of your library, which requires to create a copy of your photos, and the modifier
    which you can use as a complement to iPhoto only to modify your pictures with  possibilities given by Photoshop.
    As I have enough space on external hard drive, I use Photoshop and iPhoto to have permanently a back-up copy of my pictures.
    It was my choice related to my configuration.
    Bonne chance.
    JM
    France

  • How can I sort photos from two users into one

    I have two users on my Mac and I am trying to get all my photos onto my new External hard drive.  I want one user, one photo library stored on my external hard drive.  Help!

    If you have Aperture 3.3 or later and iPhoto 9.3 or later you can merge libraries with Aperture.
    Otherwise the only way to merge Libraries is with the paid ($20) version of iPhoto Library Manager

  • I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function

    I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function or revert to the previous system. Even the typing function on IOS 7 is faulty - very slow to respond to the keyboard. I no longer enjoy using my iPhone. Can anyone assist. Thank you

    Very strange! All of my calendar events have reappeared. This has happened one week after downloading iOS 7
    The calendar however,  is not easy to use.
    The typing function on the phone has  become even slower. Have to wait for each letter to show on screen.

  • I inadvertently selected Entourage and emptied trash.  How can I retrieve or re-install Entourage?  Ned

    I inadvertently selected Entourage and emptied trash.  How can I retrieve or re-install Entourage?  Ned

    http://answers.microsoft.com/en-us/Search/Search?SearchTerm=entourage&CurrentSco pe.ForumName=mac&CurrentScope.Filter=&askingquestion=False

  • How can we retrieve the Porta User in the Webdynpro Application

    Hi,
    How can we retrieve the portal user information in the webdynpro applications?.
    Thanks in Advance
    Chandra.

    Hi Chandra,
    In the init() funtion of your View use client USER API below is the usage of it..
         String Username = "";
         IWDClientUser wdUser = null;
                   try {
                   wdUser = WDClientUser.getCurrentUser();
                   } catch (WDUMException e) {
                   e.printStackTrace();
         IUser user = wdUser.getSAPUser();      
         Username =user.getUniqueName()
    Thanks Raj.
    xxxxxxxxxxxxxxxxxxxxxxxxx
    Edited by: Armin Reichert on Feb 18, 2008 7:27 PM

  • HT201272 How can I retrieve hidden apps on purchase list? I am careless to select "hidden"

    I am careless swift the icon "hidden" on purchase list. It is disappeared. How can I retrieve it?

    Help here >  iTunes Store: Hiding and unhiding purchases

  • HT5312 HOW CAN I SWITCH TO IRELAND STORE FROM U.S STORE? plus i forgot my security questions?how can i retrieve them?

    HOW CAN I SWITCH TO IRELAND STORE FROM U.S STORE? plus i forgot my security questions?how can i retrieve them?
    my temporary pin is 2791

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.
    Change iTunes Store Country on an iDevice
    1. Tap Settings;
    2. Tap iTunes & App Stores;
    3. Tap View Apple ID;
    4. Enter your user name and password;
    5. Tap Country/Region;
    6. Tap Change Country/Region;
    7. Select the region where you will be located;
    8. Tap Done.
    Also, see How to Change Your iTunes Store Account Location | eHow.com.

  • How can I retrieve a lost password from my computer necessary to install Adobe flash player

    How can I retrieve a lost password from my computer necessary to install Adobe flash player

    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password,
         OS X- Changing or resetting an account password (Snow Leopard and earlier).
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself
        Reset OS X Password Without an OS X CD — Tech News and Analysis
        How To Create A New Administrator Account - Hack Mac

  • How can i retrieve the vallue of a component's attribute while enhancing?

    Hi...
    I am new to SAP...and am working with WEB UI Enhancement...
    Can anyone help me to know how can i retrieve the value of the Opportunity status in the component of survey ICCMP_SURVEY?
    And also, which is the field taht i need to change to make the survey non editable?
    I came across an attribute CHANGEABLE in method IS_CHANGEABLE which is being checked before the survey template is opened up..But is it possible to update this field?
    Any helpful pointers would be rewarded...
    Thanks....

    Thanks for the quick replies guys, I will work on that. Wish I could have thought of that before haha, well the only thing that I will need to check later on is gathering all the file paths within one array. Since the main gets called several times with each file selected, I have to gather them all with the serversocket and then when they are all gathered I can begin another piece of code. Dunno if that will be doable. Since I don't know if the user selects 5 or 400 at the same time, I think the serversocket will append to an arraylist every incoming file paths and the UI viewing the file paths will update itself if other file paths are appended.
    Thanks a lot, I will return on that as soon as I am finished.

  • I recently uploaded 10.8, but I have a number of VALUABLE old files which I can no longer read because "power PC applications are no longer supported.  How can I retrieve them?

    I recently uploaded 10.8, but I have a number of VALUABLE old files which I can no longer read because "power PC applications are no longer supported.  How can I retrieve them"?

    Here is a post I assembled for another with a similar problem:
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between your PPC software or Lion/Mt. Lion;
    3. Upgrade to an Intel compatible versions of your software, or find alternatives that will open your data files;
    3.  Install Snow Leopard (with Rosetta) into Parallels:
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
    NOTE 2:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • How can I retrieve values from integer array in sqlplus?

    I'm trying to write a query against OEM grid tables to come up with the result to show all scheduled backup jobs, in OEM grid, there is a table sysman.mgmt_job_schedule, one of the column DAYS is defined as TYPE SYSMAN.MGMT_JOB_INT_ARRAY AS VARRAY(5000) OF INTEGER,
    if I do select days from mgmt_job_schedule, it returns something like (2,3,4,5,,,,,,...), I want to retrieve the digits and translate them into Monday-Sunday in combination of other columns, but I'm new in varray, I don't know how can I retrieve the values in sqlplus, can you guys help me on that, My query is as follows, I got all the jobs I wanted already, just need to interpret on which day (week day) it is scheduled.
    Thanks
    select JOB_NAME, JOB_OWNER,job_type, mjs.START_TIME, DECODE(mjs.frequency_code,
    1, 'Once', 2, 'Interval', 3, 'Daily', 4, 'Weekly',
    5, 'Day of Month', 6, 'Day of Year', mjs.frequency_code) "FREQUENCY",
    mjs.days
    from mgmt_job mj, MGMT_JOB_SCHEDULE mjs
    where mj.SCHEDULE_ID=mjs.SCHEDULE_ID
    and mj.job_type='OSCommand'
    and mjs.Frequency_code in (3,4)
    and mj.is_library =0

    select job_name, job_owner, job_type, mjs.start_time,
               decode (
                    mjs.frequency_code,
                    1, 'Once',
                    2, 'Interval',
                    3, 'Daily',
                    4, 'Weekly',
                    5, 'Day of Month',
                    6, 'Day of Year',
                    mjs.frequency_code
                    "FREQUENCY", mjs.days, column_value
      from mgmt_job mj, mgmt_job_schedule mjs, table (nvl(days,sysman.mgmt_job_int_array(1,2,3,4,5,6,7)))
    where       mj.schedule_id = mjs.schedule_id
               and mj.job_type = 'OSCommand'
               and mjs.frequency_code in (3, 4)
               and mj.is_library = 0you may need to tweak the values in sysman.mgmt_job_int_array: use less or other values or simply put them null ....

  • How can we retrieve the Payload information from B2B

    Hello,
    We are trying to send the payload information back to the client for a failed BPEL Transaction from B2B's b2b_instancemessage view. We are enqueing messages to IP_OUT_QUEUE using BPEL. We see the payload coming correctly in the B2B Business Message Reports. But we don't see the payload coming in the b2b_instancemessage view for failed B2B transactions. How can we see the payload in b2b_instancemessage view for failed B2B transactions as well? or How can we retrieve the Payload information from B2B?
    Any help is greatly appreciated! Thanks. - Sam.
    Edited by: user12049162 on Dec 4, 2009 2:04 PM

    I am not sure about the PDK API to get the group name. But using LDAP API its easy to get the User Group.
    If you find the answer to get the group name using PDK API, Please update in forum. It will really help others.
    --Balaji S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How can I retrieve my account I forgot my security question?

    Please I want to make a purchase online through my iPad, but I couldn't due to some problem that is related to my ID. How can I retrieve my account? I forgot my security questions

    From an older post by King_Penguin:
    If you can't remember the answers to the security questions, then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Security' and fill in that you'd like your security questions/answers reset.
    You should get an email reply within about 24 hours (and check your Spam folder as well as your Inbox).

Maybe you are looking for