Setting check mark for SelectManyCheckbox item
I'm trying to set the check mark for a SelectManyCheckbox item from a backing bean and cannot find any explicit explanation or example to do this. This would be used to have a command button select all checkboxes and a command button to clear all checkboxes.
I've been trying to set the SelectItem value, but while log messages suggest what is desired has occurred, nothing visually changes. Here's the key parts of what I'm working with so far.
<h:selectManyCheckbox
id="patients" layout="pageDirection"
value="#{SelectBean.patientsSelected}" >
<f:selectItems value="#{SelectBean.patientSelects}" />
</h:selectManyCheckbox>
<h:commandButton type="submit" value="Select All Patients"
id="allPatients"
action="update"
actionListener="#{SelectBean.onSelectAll}" />
private Collection<SelectItem> patientSelects;
private List<String> patientsSelected;
for (int i = 0; i < 10; i++) {
value = false;
label = locationSelected + "-" + "patient" + Integer.toString(i);
patientSelects.add(new SelectItem(value, label));
public void onSelectAll(ActionEvent event) {
for (Iterator it = patientSelects.iterator(); it.hasNext();) {
SelectItem si = (SelectItem) it.next();
si.setValue(true);
}
the arrayList you suggest doesn't even contain these items.You have to prefill the patientsSelected yourself to mark preselected items.
Basic example:<h:selectManyCheckbox value="#{myBean.selectedItems}" />
<f:selectItems value="#{myBean.selectItems}" />
</h:selectManyCheckbox>MyBeanprivate List<String> selectedItems; // + getter + setter
private List<SelectItem> selectItems; // + getter + setter
// Prefill selectItems.
selectItems = new ArrayList<SelectItem>();
selectItems.add(new SelectItem("value1", "label1"));
selectItems.add(new SelectItem("value2", "label2"));
selectItems.add(new SelectItem("value3", "label3"));
selectItems.add(new SelectItem("value4", "label4"));
selectItems.add(new SelectItem("value5", "label5"));
// Preselect item #2 and #4.
selectedItems = new ArrayList<String>();
selectedItems.add("value2");
selectedItems.add("value4");
}
Similar Messages
-
Check marks or dynamic items for run-time shortcut menus
Labview version: 8.0
I'd like to create a run-time shortcut menu for my Xcontrol, that would
allow user to toggle between two states of the control. Is it possible
to either
1) dynamically apply check marks to run-time shortcut menus or
2) dynamically modify the run-time shortcut menu content
Tomi
Tomi MailaHi Tomi,
Great question. Yes, you can do what you want with run-time shortcut menus in LabVIEW 8.0. If you want to dynamically modify the menu content, you have to do it in the "Shortcut Menu Activation?" event in the facade VI of the XControl. In the event data for this event is a parameter called "MenuRef" which works with the same menu primitives that have been around since LabVIEW 5 for editing the menu bar at run-time.
With these primitives, you can add/delete/modify menu items to the shortcut menu. The items that are already in the MenuRef when this event case executes are always the ones that are statically defined, either by LabVIEW or by customizing them. You do not have control over the state of the items that LabVIEW adds, but you can remove them and add ones with the same text (just with a different tag). In your case, you would probably want to use the Insert Menu Item primitive to add an item such as "Toggle State". Give it a tag such as "USER_TOGGLE_STATE". Then you'll want to use the Set Menu Item Info primitive to set the checkmark for that item based on the state of the XControl.
Then, you'll need to add an event case for the "Shortcut Menu Selection (User)" event so you can handle the item being selected. Wire the Item Tag parameter from the event data to a case structure and add a case to look for "USER_TOGGLE_STATE". And in that case, toggle the state of your XControl. That's all you need to do!
The Dual Mode Thermomter shipping example in <LabVIEW 8.0>\examples\general\xcontrols\Dual Mode Thermometer\Simple Dual Mode Thermometer XControl.lvproj is a simple example of how you can modify the menu and respond to the items selected. It's a little different than what you want to do, but it might help you to look at it.
Good luck! Let me know if you have questions.
Robbie -
Set a variable for an item in an empty list
Hi all
I set a variable for an item in a list like this
<c:set var="item" value="${myList[0]}" />..
<c:if test="${ item != null}">
</c:if>I tested and see that the application works OK even when myList is empty but I donot know that my way is correct or not. Is there any problem happen if myList is empty?Thanks again, Balus
<c:set var="item1" value="${firstList[0]}" />
<c:set var="item2" value="${secondList[0]}" />
<c:set var="item3" value="${thirdList[0]}" />The way above is shorter the way below:
<c:if test="${not empty fistList}">
<c:set var="item1" value="${firstList[0]}" />
</c:if>
<c:if test="${not empty secondList}">
<c:set var="item2" value="${secondList[0]}" />
</c:if>
<c:if test="${not empty thirdList}">
<c:set var="item3" value="${thirdList[0]}" />
</c:if> -
A quick way to set different color for certain items in JList?
is there a quick way of setting different color for certain items in JList?
Either use HTML strings as the values in your JList (quickest, but may not be the most convenient, especially if your model isn't just text), or create your own ListCellRenderer (e.g. extend DefaultListCellRenderer).
There is no such thing as "list.setItemForeground(int index, Color c)". You'll have to use one of the methods above. -
How to set command action for each item in the popupmenuimage
Hi all,
In my canvas application,i used images for popupmenu.Now i have to set command action for each item in that popupmenuimage.I dont know whether it is possible in canvas or not.Can anyone tell me the solution for this .
Thanks,
sourabButtons is typical of a c/s application, or, in case of Web Forms, a Java applet. Instead of buttons, you have to use hyperlinks.
See:
http://otn.oracle.com/products/reports/htdocs/faq/faq_migration.htm#346
The hyperlink wil have to be to a URL that does the insert in the table. This can be a mod_plsql procedure, for instance. -
Ask for Text for Set Spotlight Comments for Finder Items
I want the text from the "Ask for Text" to go in to the "Set Spotlight Comments for Finder Items" action, but they don't seem to interact.
Any ideas?first you make a new variable using variables tab. then you add the action "set value of variable" right after the action ask for text. drag the variable you made to the variable field of that action. this will set the value of that variable to the output of the previous action.
-
Quantity conversion check failed for one item; all qty lines deleted
Hi IS Oil Experts,
Iam using the BAPI "BAPI_GOODSMVT_CREATE_OIL" for posting goods movement. I filled the additional quantities and unit of measures also in the BAPI table, But when tried to execute, Iam getting the error, "Quantity conversion check failed for one item; all qty lines deleted"
Please anybody tell me what is the error from end for resulting this message.
Thanks in advance
PrathibDear you!
I also get the issue that you meet. Can you help me to process it, Please/
Best regards, Huy. -
Remove marked for deletion items from f4 search
Dear Consultants
We have many customers, Vendor, Cost centres which are marked for deletion, and we don't want to archive them, but they keep appearing on standard f4 search on various transaction, We dont want personalise list , so is there a way we can eliminate this marked for deletion item from standard f4 search.
Your reply will be hightly appreciated.
Many Thanks
Sam RathodCan you please tell us how
-
Why won't some of my songs, that used to sync, sync to my iPhone5 now? There is an empty circle appearing to the left of the check mark in iTunes for the songs that are not properly syncing.
I've continued tests on different films, and tried my entire collection. I've found about two dozen that will play fine on the PC, but will not cooperate when streamed to either Apple TV or my iPad. I tried several more tests with the audio, and that turned out not to be a factor -- I could not replicate that on another test.
I wonder if something in the header of these files is corrupted or a flag is set incorrectly or something along those lines, as the data appears to be fine -- it's just not "handshaking" with my streaming hardware and/or the Apple Home Sharing code that powers it.
Is there any way for me to "scrub" these files and amend their headers, or get into the file and tinker with that info by hand? -
Hello.
This might sound like a basic matter, but I don't understand the use of the check marks on the small squares on the second column for each item on my library list.
I can select the usual way, i.e., click on the first line and if I need to select a group of items that are next to each other, I press the "capitals" key and click on the last item, and if I need to select a group of items scattered around, I just click on each one keeping "ctrl" pressed.
So, what is the use of the check marks, and why are all of the items on my library checked by default?
Thanks!If you have "Sync only checked items" selected in your iPod sync settings, unchecked songs will not sync. Also, unchecked songs will not play unless you specifically select them and press play. So, if you have a playlist with unchecked songs in it and you play the playlist, iTunes will skip the unchecked songs.
Mostly, I only use it to keep my holiday songs out of the way during the rest of the year. I don't find that unchecking songs alone is a useful tool in choosing what to sync to my iPods.
Best of luck. -
Setting Inventory Accounts for each Item Grops
Hi,
1.I want to set the different Inventory Accounts for each goup in "ItemGrops" In ItemMaster.
how can i set?
2. in ItemMaster-> Inventory tab->Set G/L Accounts by option
when i select the 'ItemLevel' and update it is showing error like
'"Purchase credit account not defined for this item'"
how can i rectify this error.
plz help me asap
Regards,
NagababuNagababu,
You have stated that you are trying to Set GL by Item Group. If you want to set GL by Item Group, I am wondering why you are trying to change the setting in the Item Master area by ....ItemMaster-> Inventory tab->Set G/L Accounts
If you want this setting to be a Global setting for all the Items then you have to set this in <b>Admin > System Initia.. > General Settings > Inventory Tab.... Set G/L Account by</b>
After this... you can set the different G/L Accounts for each Item Group by accessing the Item Groups itself <b>Admin>Seup>Inventory>Item Groups</b>
For each Item Group in the Accounting tab you can set the different GL Accounts relevant to that Item Group
In case for some items you want the GL's to be different (not based on the Item Group they belong to), then you could go to the Item Master > Inventory tab and change the settings to <b>Item Level</b> and Change the G/L as required.
NOTE: You do not have to specify the G/L Account for each Item individually if you are going to be using Item Groups.
Suda -
Whats the check mark for?
cant find this answer anywhere. in the movie or tv show window, second column from the left shows a check mark at the column top, and some shows/movies have a check and others do not. what does the check mark mean?
thats what I thought, but the check marks Im talking about are on the library pages. I check the items to sync on the Ipad interface. Are you saying the items not checked will not be available to sync in the Ipad interface? In other words, if I dont check it in the library interface, I cannot sync it in the ipad interface? Right now, nearly everything in my library has a check mark, but I'm certainly not syncing my whole library.
-
I have AVG spyware. I received a message to update Mozilla. Once I did the update my AVG was noted as incompatible with Mozilla. I went through the steps given to add AVG back in. It doesn't appear to be working. Normally when searching the web, AVG gives a check mark indicator on safe sites. Now it does not.
The Safe Search toolbar has not been updated by AVG. Read this from AVG: http://forums.avg.com/us-en/avg-free-forum?sec=thread&act=show&id=171434
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
Not related to your question, but...
You need to update some plug-ins:
*Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
*Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox] -
PO based invocie active check box for line items
Hi,
For PO based invoicing, we need the Blank Checkbox, which appears at Line Item Area of invoice. We need it to be blank when user begins invoicing entry process. Meaning, no lines are subject to invoice, all are inactive and Users will place checkmarks for lines they want included for invoicing. It is SAP standard design.
Do any one know how to achieve this?
regards,
Rahul MandaleHI Ujjwala,
The setting in spro in Acct assigment, u are talking about is GR Receipt or Invoice Receipts.
These are not GR Based Invoice Verification.
GR based Invoice Verification comes from either ur inforecords or vender master.
if u check or uncheck these in spro in acct assigment, then it will comes ur Deliver Tab not ur invoice Verification Tab.
one thing more, if u make it mutiple Acct assigment, then it will be Non Valuated G/R Based IV.
Hope Clear U !
REgards,
Pardeep Malik -
Set default value for listbox items - Acrobat Javascript
Hello,
I am trying to set the default value for a listbox where multiple items are selected.
If a single item is selected then this.getField("zzz").defaultValue = x; works fine, but you cannot use defaultValue for multiple indicies. The manual mentions the user or export events but I cannot see how that would work.
Any help will be appreciated.
AndrewI hope somebody can provide help with this as I'm having a similar problem.
http://www.directorygump.com
Maybe you are looking for
-
Can't find drivers to my TV Card!
I've installed new operating system on my HP Pavilion dv7-3120ew. I'm looking for TV card drivers but i can't find them anywhere... Can some one help me?
-
Editing video by half frames or less
I'm and audio guy trying to edit video, so I'm not sure if I'm using the correct terms, but can you slide video in Final Cut Pro by less than a frame? e.g. a half frame or 1/4 frame, or even miliseconds? I know that in ProTools you can "nudge" audio
-
Hi Master, Pls somebody givr me the list of CRM Tables and transaction codes to view these tables. I'm not able to find out earlier 'crm table thread' posted by me only. If anybody can help me to find it out And points will be definatly rewarded. Tha
-
Cd-rom with classic program won't load after installing classic
I tried to install a program that said it required classic support, so I installed classic from my installation disk. Classic seems to be running without any problems, but now when I put in the cd-rom for the software I was trying to install it won't
-
JMF+COMMAPI, JMF+JTAPI+XTAPI OR JMF+JTAPI+ibm'sJ323
Hi all, we are trying to develope a program for an operation center were the policemen will call the control centre from a private telephone line in the street. The operator must received the entrance calling and dispatch it to the right department,