Not sending kendoComboBox name when editing in kendo ui jquery - kendo-ui

I have written the following code for kendoComboBox, it does not cause any problem when creating, but when editing, only the id is displayed.
kendo
html code :
<td>
<span class="caption">Buyer: </span>
<input id="buyer" name="buyer" class="combobox-lg" data-bind="value: buyer.id" required />
</td>

Related

JSF change how f:selectItem renders

I have a tag h:selectManyCheckbox, in it a loop over a list. for each item in the list I need a checkbox. Unfortunately the format of the checkbox + label does not correspond to the table which jsf creates. I need a div around each item, like this:
<div class="form_control var_checkbox">custom
<input type="checkbox" class="checkbox" name="service" id="service_0" data-product="additional_price" data-product-add-price="100.0">
<label class="label" for="service_0">title</label>
<span class="guarantee_price">CHF 100.0</span>
</div>
but jsf renders it like this:
<table>
<tbody>
<tr>
<td><input id="addToCart:j_id_29_2:0" type="checkbox" name="addToCart:j_id_29_2" value="0"><label for="addToCart:j_id_29_2:0"> title</label></td>
<td><input id="addToCart:j_id_29_2:1" type="checkbox" name="addToCart:j_id_29_2" value="1"><label for="addToCart:j_id_29_2:1"> titel2</label></td>
</tr>
</tbody>
</table>
here's the code currently generating it:
<h:selectManyCheckbox value="${addToCartBean.selectedServicesIndexes}">
<c:forEach items="#{productServicesJSFBean.productServicePlusBeanKeySet}" var="productServicePlusKey">
<c:forEach items="#{productServicesJSFBean.productServicePlusBeans[productServicePlusKey]}" var="productServicePlus">
<div class="form_control var_checkbox">
<f:selectItem itemValue="${counter}" itemLabel="${productServicePlus.servicePlusDisplay.title}" >custom </f:selectItem>
</div>
<c:set var="counter" value="${counter + 1}"/>
</c:forEach>
</c:forEach>
</h:selectManyCheckbox>
I tried creating the checkbox by hand, but jsf doesnt pick it up. We can not use a table, it has to be in the div format. How can I change how jsf renders those selectItems. I dont want it globally, only for those here. How can I do that?
someone I sent this question to sent me this SO question, which I didnt find through google: Render selectManyCheckbox without HTML table . got it working with <h:outputLabel><h:selectBooleanCheckbox>

SpringMVC Klick on Table Row?

Hi i have spring application which shows some values from the database in a table from jsp.
Now i want to add functionality that when a user clicks on one row to know which row he has clicked to delete or edit row
How is that to be accomplished.
When you compile jsp page you can assign an id to every row. Put this id inside hidden and send it back on delete or update action.
<tr>
<td>
<form name="myform" action="..." method="...">
<input type="hidden" name="Language" value="rowNumber">
<input type="submit" value="Delete">
<br><br>
</div>
<td>
</tr>

kendo ui upload, restrict only 1 document

Would you be able to advise how you could only allow 1 document to upload in kendo ui upload. If the file have been selected, then we unable to upload the new one. Please find the code below. Thank you
<div class="configuration k-widget k-header">
<span class="infoHead">Information</span>
<p>
The Upload can be used as a drop-in replacement
for file input elements.
</p>
<p>
This "synchronous" mode does not require
special handling on the server.
</p>
</div>
<form method="post" action='#Url.Action("Submit")' style="width:45%">
<div>
#(Html.Kendo().Upload()
.Name("files")
)
<p>
<input type="submit" value="Submit" class="k-button" />
</p>
</div>
</form>
See Kendo.MVC.UI.Fluent Doc's for Multiple(System.Boolean)
#(Html.Kendo().Upload()
.Name("files")
.Multiple(false)
)
And if you are using javascript/html5 version:
$("#selctor").kendoUpload({ "multiple": false });

Bootstrap Radio buttons not working properly in firefox

I have recently started using bootstrap to create a front end to a website. I was using chrome to develop it originally. I recently started testing on firefox and I ran into a problem. I have a few radio buttons on the front page. When I click on the one I want it looks as if it is only selecting the first one and not the one I am clicking on. If I click quickly a few times it makes the selection properly. Any ideas why this is happening? The code is here :
<form action="redirector.php" action="get">
<fieldset>
<table border="1">
<tr>
<td valign="top"><b>Please select a genome:</b><br>
<label class="radio">
<input type="radio" name ="genome" value="Acral2">Acremonium Alcalophilum<br><input type="radio" name ="genome" value="Aspni3">Aspergillus niger<br><input type="radio" name ="genome" value="Glotr1_1">Gloeophyllum trabeum<br><input type="radio" name ="genome" value="Phchr1">Phanerochaete chrysosporium<br><input type="radio" name ="genome" value="PleosPC15_2">Pleurotus ostreatus<br><input type="radio" name ="genome" value="Spoth2">Sporotrichum Thermophile<br><input type="radio" name ="genome" value="Thite2">Thielavia terrestris<br> </label>
</td>
<td valign="top">
<b>View proteins with JGI annotation of type:</b><br>
<label class="radio">
<input type="radio" name ="jgiAnnotation" value=sigPInformationView>SignalP Information<br>
<input type="radio" name ="jgiAnnotation" value=ecInformationView>EC and Pathway Information<br>
<input type="radio" name ="jgiAnnotation" value=domainInformationView>Domain Information<br>
<input type="radio" name ="jgiAnnotation" value=goInformationView>Go Information<br>
</label>
<button type="submit" class="btn">Submit</button>
</fieldset>
</form>
</td>
<td valign="top">
<form action="annotationInfoView.php" action="get">
<fieldset>
<b>View single protein:</b><br>
Enter our ID number:<input type="text" name ="ourId"><br>
(i.e. jgi_Spoth2_2293939)<br>
<button type="submit" class="btn">Submit</button>
</fieldset>
</form>
</td>
</tr>
</table>
http://jsfiddle.net/CTF2s/
The problem is you have multiple radio buttons inside of a single label.
If I click quickly a few times it makes the selection properly.
This is probably because you're clicking directly on the radio button and not the text next to the radio button. This is how all browsers will behave, including Chrome.
Check out the "Checkboxes and radios" section of Twitter Bootstrap's "Forms" documentation for a working example.

why is IE8 adding a visibility:hidden style to my select tag?

I've got a strange issue with a simple select dropdown not displaying in IE8. It works fine in FF, Chrome, and IE8 in compatibility mode. It's within a scriptaculous accordion, but the accordion appears to function just fine. There is no error being thrown, either. The dropdown simply doesn't display at all. I thought it might be caused by being named 'order by', so I tried changing that, but it still didn't display. Here's the snippet when viewed with view source (see after it for the strange thing) :
<form action="/foo" method="get"><input type="hidden" id="start_date" name="start_date" value=""/>
<input type="hidden" id="end_date" name="end_date" value=""/>
<div id="control">
<div id="accordion">
<div class="accordion-title"><img alt="Application_form" border="0" src="/images/icons/application_form.gif?1277517563" /> Formatting:</div>
<div class="accordion-body">
<table border="0" width="100%">
<tr>
<td width="30%">Order By</td>
<td>
<select name="order_by">
<option value="dates">Dates</option>
<option value="activities">Activities</option>
</select>
</td>
</tr>
</table>
</div>
</div>
</form>
When I viewed this in IE8's Developer Tool, in the HTML view, the select tag has been altered to this:
<select name="order_by" style="visibility: hidden;" __msh_save_visibility="inherit">
Where is this coming from?
Use developer tools or firebug to check the cssproperties. Its probably an inheritance issue in that ff ignores
Turns out these styles are being applied by the calendar.js script. There are calendar elements after this select tag in the form, but it seems odd to me that this script is changing tags outside of where the calendar objects are. I'm pursuing this in another question.

Resources