Search Results

Search found 21262 results on 851 pages for 'multiple checkbox'.

Page 1/851 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Struts2 Populating Checkbox from Arraylist of Objects

    - by user2972139
    I'm sure that I'm doing something dumb but I've been going craze over the last couple of days trying to get my checkboxes filled out inside an iterator that goes over an arraylist of object. Here is my object: public class EmailObject { int emailId; String emailAddress; public int getEmailId() { return emailId; } public void setEmailId(int emailId) { this.emailId = emailId; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; } } In my action class, I create an arraylist of the above EmailObjects. On my jsp page, I can get checkboxes through a checkboxlist (but this isn't good for me because I want it to be vertical and don't want to mess with the struts styles) <s:checkboxlist name="selectedEmails" list="userEmails" listValue="emailAddress" listKey="emailId" /> I can also iterate over the arraylist userEmails and display the values: <s:iterator value="userEmails" var="thisEmailData"> <s:property value="emailId"/> <s:property value="emailAddress"/> </s:iterator> But I can't get it to display the emailId when iterating over the arraylist userEmails. I tried all of these: <s:iterator value="userEmails" var="thisEmailData"> <tr><td><s:property value="emailId"/></td></tr> <tr><td> <s:checkbox fieldValue="%{#emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="#emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="thisEmailData.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="userEmails.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="#thisEmailData.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="#userEmails.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="%{#thisEmailData.emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="%{#userEmails.emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox fieldValue="emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="%{#emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="#emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="thisEmailData.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="userEmails.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="#thisEmailData.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="#userEmails.emailId" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="%{#thisEmailData.emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="%{#userEmails.emailId}" name="emailAddressesCB" theme="simple" ></s:checkbox> <s:checkbox value="emailId" name="emailAddressesCB" theme="simple" > </s:checkbox> <s:property value="emailAddress"/> </td></tr> </s:iterator> </td></tr> </s:iterator> From the above, the value field is never filled with the value of the emailId. I know I'm missing something basic. What is it? THANK YOU.

    Read the article

  • Remove a hover class from a checkbox once clicked

    - by seangeraghty
    I am trying to remove a hover class applied to a checkbox via CSS once the box has been clicked. Does anyone know how to do this? JSFiddle http://jsfiddle.net/sa9fe/ The checkbox code is: <div> <input type="checkbox" id="checkbox-1-1" class="regular-checkbox flaticon-boxing3" /> <input type="checkbox" id="checkbox-1-2" class="regular-checkbox" /> <input type="checkbox" id="checkbox-1-3" class="regular-checkbox" /> <input type="checkbox" id="checkbox-1-4" class="regular-checkbox" /> </div> And the CSS for the checkbox are as follows: .regular-checkbox { vertical-align: middle; text-align: center; margin-left: auto; margin-right: auto; align: center; color: #39c; width: 140px; height: 140px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; background-color: #fff; border: solid 1px #ccc; -webkit-appearance: none; background-color: #fff; display: inline-block; position: relative;} .regular-checkbox:checked { background-color: #39c; color: #fff !important;} .regular-checkbox:hover { background-color: #f0f7f9;} .regular-checkbox:checked:after { color: #fff; position: absolute; top: 0px; left: 3px; color: #99a1a7; } So any suggestions? Also does anyone know how to change the highlight because at the moment it seems to highlight the edges of the box at a border radius of 3px whereas the boxes I am using are 6px. Thanks Sean (newbie to coding)

    Read the article

  • Checkbox does not change when clicked directly on it

    - by Matt McCormick
    I have a table of data and have one checkbox per row for the user to select the item. I'm using the following jQuery code to allow the user to select the item by clicking anywhere in the row: $("tbody tr").click(function() { var checkbox = $(this).find(':checkbox'); checkbox.attr('checked', !checkbox.attr('checked')); }); The problem is if I click directly on the checkbox, nothing happens. ie. if the checkbox is not checked, it remains unchecked. If I click anywhere else in the row, the checkbox changes status. I'm thinking that the jQuery code is causing the action to be performed twice. If I click on the checkbox, the checkbox will change but then the jQuery code for clicking on the row will be performed and the checkbox will be changed back. Not sure if that is actually happening but that is my guess. How can I get a checkbox to be toggled when a user clicks on a row and the same thing if they click directly on the checkbox?

    Read the article

  • WPF CheckBox style with the TextWrapping

    - by Shurup
    I need you a TextWrapping in the WPF CheckBox. Please look at this two samples: <CheckBox> <TextBlock TextWrapping="Wrap" Text="_This is a long piece of text attached to a checkbox."/> </CheckBox> <CheckBox> <AccessText TextWrapping="Wrap" Text="_This is a long piece of text attached to a checkbox."/> </CheckBox> If I use a TextBlock in the Content of the CheckBox, the check element (vertical alignment is top) and the text displays properly, but not the accelerator. If I use an AccessText in the Content of the CheckBox, the check element displays wrong (vertical alignment is center). How to change the style of the elements to display this CheckBox correct?

    Read the article

  • Get checkbox with specific value

    - by PalAla
    I want to get checkbox with specfic value and make it checked.. I make like this $(":checkbox").filter({"value":5}).attr("checked","true");? and here is the html ?<input type="checkbox" name="priv"????????????????????????????? value="1"?????????????????/> <input type="checkbox" name="priv" value="2"/> <input type="checkbox" name="priv" value="3"/> <input type="checkbox" name="priv" value="4"/> <input type="checkbox" name="priv" value="5"/> <input type="checkbox" name="priv" value="6"/> <input type="checkbox" name="priv" value="7"/> <input type="checkbox" name="priv" value="8"/>? here's a demo of the problem

    Read the article

  • How does the CheckBox obtain it's respective drawables?

    - by alex2k8
    The CheckBox class extends the CompoundButton, but add nothing to it. But some how it obtains it's respective look. I found some declarations in Android sources, but wonder how they are mapped to CheckBox class? public class CheckBox extends CompoundButton { public CheckBox(Context context) { this(context, null); } public CheckBox(Context context, AttributeSet attrs) { this(context, attrs, com.android.internal.R.attr.checkboxStyle); } public CheckBox(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } } Styles <style name="Theme"> <item name="checkboxStyle">@android:style/Widget.CompoundButton.CheckBox</item> </style> <style name="Widget.CompoundButton.CheckBox"> <item name="android:background">@android:drawable/btn_check_label_background</item> <item name="android:button">@android:drawable/btn_check</item> </style> EDIT: Probably I was not clear... I understand how the drawable assigned to Widget.CompoundButton.CheckBox style, but how this style assigned to CheckBox class? I see the ".CheckBox" in the style name, but is this naming convention really what makes the trick? If so, what are the rules? If I derive MyCheckBox from CompoundButton, can I just define the Widget.CompoundButton.MyCheckBox style and it will work?

    Read the article

  • jquery click event handler is called twice for a checkbox

    - by Martin
    I have a problem with the following code in an ASPX page: <script type="text/javascript"> $(document).ready(function() { $('.test').click(function() { alert("click") }) }); </script> <asp:CheckBox runat="server" Text="Checkbox XYZ" CssClass="test" ID="cb1" /> In the browser (FF3.5 / IE8) I have the following problem: if I click the checkbox (the small square), it works as expected if I click the checkbox's text ("Checkbox XYZ"), then the click event is fired twice, and the alert is shown twice I guess this has to do with the way the checkbox is rendered to HTML, which is like this: <span class="test"> <input id="ctl00_c1_cb1" type="checkbox" name="ctl00$c1$cb1" checked="checked" /> <label for="ctl00_c1_cb1">Checkbox XYZ</label> </span> How do I correctly setup the click event handler to prevent it from being called twice?

    Read the article

  • Getting multiple checkboxes from FormCollection element

    - by FreshCode
    Given multiple HTML checkboxes: <input type="checkbox" name="catIDs" value="1" /> <input type="checkbox" name="catIDs" value="2" /> ... <input type="checkbox" name="catIDs" value="100" /> How do I retrive an array of integers from a FormCollection in an action: public ActionResult Edit(FormCollection form) { int [] catIDs = (IEnumerable<int>)form["catIDs"]; // ??? // alternatively: foreach (int catID in form["catIDs"] as *SOME CAST*) { // ... } return View(); } Note: I read the related questions and I don't want to change my action parameters, eg. Edit(int [] catIDs).

    Read the article

  • Android visibility issue with checkbox

    - by fxi
    Hi all! I´m using a checkbox in my code that when its checked it makes a textview and a editText visibles, but if I uncheck de checkbox they continue being visible instead of dissapear. Here is the code: final CheckBox save = (CheckBox) findViewById(R.id.checkbox); save.setOnClickListener(new OnClickListener() { public void onClick(View v) { // Perform action on clicks, depending on whether it's now checked if (((CheckBox) v).isChecked()) { nameText.setVisibility(1); editName.setVisibility(1); } else { nameText.setVisibility(0); editName.setVisibility(0); } } }); And part of the xml which is inside an Relative Layout: <LinearLayout android:id="@+id/linearLayout3" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below = "@+id/linearLayout2"> <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/name" android:visibility="invisible"/> <EditText android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:visibility="invisible"/> <CheckBox android:id="@+id/checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/save" /> </LinearLayout> What should i do to make the textView and EditText dissapear when i uncheck the checkbox? Thank you!

    Read the article

  • Multiple checkbox values search javascript

    - by JV10
    I have a list of keywords, and I've created a checkbox for each. My template has a form wrapping the content, so I can't have a nested form around the checkbox list. How can I send the selected checkbox values to my search results page? The form that wraps the content doesn't have any actions or methods applied: <form id="BoostMasterForm" runat="server"> This the HTML markup of my checkbox list: <div class="checkboxes"> <ul> <li> <input type="checkbox" name="search" class="options" value="one"> <label>one</label> </li> <li> <input type="checkbox" name="search" class="options" value="two"> <label>two</label> </li> <li> <input type="checkbox" name="search" class="options" value="three"> <label>three</label> </li> </ul> <input type="submit" value="Submit"/> </div> How can I use javascript or jQuery to submit the values of the multiple checkbox selections and on submit action them to the following URL: '/imagery/image-search.aspx' The resulting URL for a search where option 1 and 3 are submitted should be: '/imagery/image-search.aspx?search=one%20three' I'm using this javascript that I found on another post, however I need it to append the form an the action and the method. My website is ASP, where this post is for a PHP site: Sending multiple checkbox options $('.options').click(function() { var selectedItems = new Array(); $(".checkboxes input:checkbox[name=search]:checked").each(function() {selectedItems.push($(this).val());}); var data = selectedItems.join('|'); $("#opts").val(data); }); If anyone can help, it'd be greatly appreciated. Cheers, JV

    Read the article

  • C# DataSet CheckBox Column With DevExpress DataGrid

    - by Goober
    Scenario I have a DevExpress DataGrid which is bound to a DataSet in C#. I want to populate each dataset row to contain a string in the first column and a checkbox in the second. My code below doesn't work quite how I want it to, and I'm not sure why..... The Code As you can see I've declared a dataset, but when I try and pass in a new checkbox object to the 2nd column it just displays the system name for the checkbox. DataSet prodTypeDS = new Dataset(); DataTable prodTypeDT = prodTypeDS.Tables.Add(); prodTypeDT.Columns.Add("MurexID", typeof(string)); prodTypeDT.Columns.Add("Haganise",typeof(CheckBox)); //WHY DOES THIS NOT WORK? //(Displays "System.Windows.Forms.CheckBox, CheckState: 0") //Instead of a checkbox. CheckBox c = new CheckBox(); prodTypeDS.Tables[0].Rows.Add("Test",c); //This doesn't work either.... prodTypeDS.Tables[0].Rows.Add("Test",c.CheckState); ......I hope this is just because it's a DevExpress datagrid....

    Read the article

  • select one checkbox from multiple MAIN Checkboxes,disable all other MAIN boxes,n enable child checkbox

    - by harshil
    <input type="checkbox" id="chkMain" /> <input type="checkbox" id="chkMain1" /> <input type="checkbox" id="chkMain2" /> <input class="child" type="checkbox" id="chk1" disabled="true" /> <input class="child" type="checkbox" id="chk2" disabled="true" /> <input class="child" type="checkbox" id="chk3" disabled="true" /> <input class="child" type="checkbox" id="chk4" disabled="true" /> <input class="child" type="checkbox" id="chk5" disabled="true" /> <input class="child" type="checkbox" id="chk6" disabled="true" /> <input class="child" type="checkbox" id="chk7" disabled="true" /> $(function(){ $("input[id^=chkMain]").click ( function() { if( !$(this).is ( ":checked" ) ){ $(".child").attr ( "disabled" , true ); } else{ $(".child").removeAttr ( "disabled" ); } }); }); this enables all the child boxes when either chkMain or chkMain1 or chkMain2 are checked. what i want is: when chkMain is checked the code should disable chkMain1 and chkMain2 but enabling child boxes. or when chkMain1 is checked the code should disable chkMain and chkMain2 but enabling child boxes.

    Read the article

  • MySQL query using multiple criteria from checkboxes

    - by jungle_programmer
    I would like to do a multiple search query usig multiple checkboxes which represent particular textboxes. How do i create a mysql query which will be filtering the checked and unchecked checkboxes (probably using if statements)? The query should be able to filter the checked and ucnchecked boxes and query them using the AND condition. Thanks

    Read the article

  • Multiple render targets and pixel shader outputs terminology

    - by Rei Miyasaka
    I'm a little confused on the jargon: does Multiple Render Targets (MRT) refer to outputting from a pixel shader to multiple elements in a struct? That is, when one says "MRT is to write to multiple textures", are multiple elements interleaved in a single output texture, or do you specify multiple discrete output textures? By the way, from what I understand, at least for DX9, all the elements of this struct need to be of the same size. Does this restriction still apply to DX11?

    Read the article

  • MVC2 Checkbox problem...

    - by BitFiddler
    When I used the html Helper Checkbox, it produces 2 form elements. I understand why this is, and I have no problem with it except: The un-checking of the checkbox does not seem to be in sync with the 'hidden' value. What I mean is that when I have a bunch of checkboxes being generated in a loop: <%=Html.CheckBox("model.MarketCategories[" & i & "].Value", category.Value)%> and the user deselects and checkbox and the category.Value is FALSE, the code being generated is: <input checked="checked" id="model_MarketCategories_0__Value" name="model.MarketCategories[0].Value" type="checkbox" value="true" /> <input name="model.MarketCategories[0].Value" type="hidden" value="false" /> This is wrong since the Value is False the checkbox should NOT be checked. Any ideas why this is happening?

    Read the article

  • Multi Select Checkbox using ListView

    - by Parsa
    I have a CheckBox in the header of ListView. I write a code to select all Checkboxes in ItemTemplate automatically when the user select the checkBox in the header of ListView. This code is useful, when you bind your ListView in DataPager_PreRender. protected void DataPager1_PreRender(object sender, EventArgs e) { //get the user id of the current user Guid userGuid = (Guid)Membership.GetUser().ProviderUserKey; ListView1.DataSource = MyClass.MyStaticMethod(userGuid.ToString()); ListView1.DataBind(); } protected void ListView1_ItemCreated(object sender, ListViewItemEventArgs e) { //Find the checkBox in each Row CheckBox checkBoxRow = e.Item.FindControl("CheckBoxRow") as CheckBox; //Assign the value of checkBoxHeader to the checkBoxRow checkBoxRow.Checked = CheckBoxHeader.Checked; } protected void ListView1_PagePropertiesChanged(object sender, EventArgs e) { // assign false value to the CheckBoxHeader when user click on the DataPager // so if checkboxheader is true in the page 1, when user select Page 2,this check box will be false // therefore all checkbox rows will be false in the new page. if (CheckBoxHeader.Checked == true) CheckBoxHeader.Checked = false; }

    Read the article

  • ListView from cursor with checkbox

    - by ekawas
    Hi, I have a Listview that looks like the following: checkbox:textview {0 .. n} I have a OnCheckChangedListener that listens for checkbox changes (checkbox has focusable set to false as recommended by http://www.mousetech.com/blog/?p=74). The behaviour that I am looking for is that users can click the checkbox to set its state, and they can click on the listview item to get a description. Currently, checkbox state is saved properly and if you click on an item, then it shows a description. However, if you first change a state and then click to get the description, the checkbox reverts to a prior state. In fact all checkboxes revert back to a prior state. Anyone know how i can get this working? Thanks.

    Read the article

  • Checked status not updated in CheckBox template

    - by Simon
    Hey there. I'm trying to create an hyperlink that changes its text depending on a boolean value. I thought I could leverage the IsChecked method of a CheckBox. So I wrote this ControlTemplate for a CheckBox: <CheckBox Checked="CheckBox_Checked" IsChecked="{Binding Path=SomeBool, Mode=TwoWay}"> <CheckBox.Template> <ControlTemplate TargetType="{x:Type CheckBox}"> <BulletDecorator> <BulletDecorator.Bullet> <TextBlock> <Hyperlink> <TextBlock x:Name="TextBoxHyperlink">Unchecked</TextBlock> </Hyperlink> </TextBlock> </BulletDecorator.Bullet> <ContentPresenter /> </BulletDecorator> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="TextBoxHyperlink" Property="Text" Value="Checked" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </CheckBox.Template> </CheckBox> But when I click on the hyperlink, nothing happens. The checked status is not changed and the Text property of the TextBlock is not updated. Any ideas?

    Read the article

  • CheckBox won't toggle in Android ListView with focusable="false"

    - by user3563124
    I'm creating a ListView with a custom Adapter for displaying my entries. Each row contains a checkbox, and my adapter contains the following code: CheckBox cb = (CheckBox) v.findViewById(R.id.item_sold); cb.setChecked(p.isSold); setupCheckboxListener(cb, v, position); ... private void setupCheckboxListener(CheckBox check, final View v, final int position) { check.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { CheckBox cb = (CheckBox) v; if (cb.isChecked()) { System.out.println("Should become false!"); cb.setChecked(false); } else { System.out.println("Should become true!"); cb.setChecked(true); } } }); My row XML file includes the following: <CheckBox android:id="@+id/item_sold" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.10" android:layout_gravity="center" android:gravity="center" android:focusable="false" android:clickable="false"/> But anytime I press one of the checkboxes, check.isChecked() returns true, even if the box is unchecked. I even checked to make sure that the checkboxes were distinct and weren't picking up just the last value/etc. Setting up the listeners inline instead of in a method doesn't seem to help, either. It's literally just the isChecked() condition that isn't working appropriately - it seems to always give me the inverse value. Setting an onClick on the row is not acceptable in this case because I need to allow row selection for something else. What could be causing this issue?

    Read the article

  • Shared volume for data (multiple MDF) and another shared volume for logs (multiple LDF)

    - by hagensoft
    I have 3 instances of SQL Server 2008, each on different machines with multiple databases on each instance. I have 2 separate LUNS on my SAN for MDF and LDF files. The NDX and TempDB files run on the local drive on each machine. Is it O.K. for the 3 instances to share a same volume for the data files and another volume for the log files? I don't have thin provisioning on the SAN so I would like to not constaint disk space creating multiple volumes because I was adviced that I should create a volume (drive letter) for each instance, if not for each database. I am aware that I should split my logs and data files at least. No instance would share the actual database files, just the space on drive. Any help is appretiated.

    Read the article

  • multiple domains, one static IP address and latency

    - by shirish
    how is latency affected when multiple domains are using one single static IP address ? The scenario is in shared web-hosting By latency meaning the DNS lookup the client has to do. As far as I understand it, the browser would hit the root servers to try to figure out the IP Address and it belongs where and then when it comes to the correct server, it probably looks up some sort of table to determine which site names much and show that site as such via browser to the user. Is my understanding correct or backwards or what ?

    Read the article

  • using checkbox yo update MySql table

    - by Martin
    Hi All I have been searching round the internet for days on this matter but I keep coming up against a brick wall. What I have is a table full of checkboxes inside an admin area acting as a monthly "to-do" list. It's essentially a worksheet of 30 or so things to do each month that must be checked off each month and notes added if applicable. I have managed to get the checkboxes to update via mysql and be shown somewhere as a list of ticks. I simply did this my setting the value to 1 and on submission it updates the sql table. I have to cover my bases here and also offer the option to un-tick items if they have been ticked b y mistake. But I cant figure out how this is done. Below is my checking code... any help on this matter would be great. <?php $currentTask = ''; echo "<tr class='tr'>"; while ($seolistRow = mysql_fetch_array($seolistRes)) { $taskValue = $seolistRow["taskValue"]; $worksheetID = $seolistRow["worksheetID"]; $taskName = $seolistRow["taskName"]; $taskInfo = $seolistRow["taskInfo"]; if ($taskValue == 1) { $taskDone = "<input type='checkbox' value='1' class='checkbox' name='checkbox".$worksheetID."' id=checkbox'".$worksheetID."' checked='checked' /><div class='taskinfo'>".$taskInfo."</div>"; } else { $taskDone = "<input type='checkbox' value='0' class='checkbox' name='checkbox".$worksheetID."' id='checkbox".$worksheetID."' />"; } if ($currentTask != $taskName) { echo "</tr>"; echo "<tr class='tr'>"; echo "<td class='task'>".$taskName."</td>"; } echo "<td class='tick'>".$taskDone."</td>"; $currentTask = $taskName; } echo "</tr>"; ?>

    Read the article

  • Checkbox gets reset in WPF Datagrid when sorting

    - by user464420
    I have a WPF application with DataGrid The DataGrid contains 4 columns with a checkbox template column on the first column the problem is when i check some of the checkbox on the items, the checkbox would got reset when i sort a certain column. For example i check the checkbox on the row 2 it gets unchecked when i sort the datagrid. been searching for similar case like this for a while but haven't seen one Thanks,

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >