binding

Equivalent Spring custom Collection property editor when using JSF

不羁的心 提交于 2019-12-25 03:44:12
问题 I would like to know how to use Converters in Java Server Faces similar to Spring collection property editor Suppose the following model public class Group { private String name; List<User> users = new ArrayList<User>(); // getter's and setter's } And equivalent form <form ...> <h1>Group form</h1> <label for="name">Enter name</label> <input type="text" name="name"/> <label for="users">Select users</label> <!--value attribute stores userId--> <input type="checkbox" value="1" name="users"/>

Optional vs Bound value assigning var from array

谁说我不能喝 提交于 2019-12-25 03:43:14
问题 I want to check if there is a value in a array and if so assign to a String using a if-left statement: if let scoreValue = scoreValueArray[element!]{ // do something with scoreValue } Error: Bound value in a conditional binding must be of optional type So tried changing the ! to ? but error persists. Any input appreciated. scoreValueArray is an array of strings, where a String value is appended to array if a condition is met, then array is saved to NSUserdefaults. So element is a int which

GWTP: onUnbind() never called after closing a presenter

只谈情不闲聊 提交于 2019-12-25 03:29:32
问题 I have a GWTP MyPresenter that registers a handler at onBind(), and it works perfectly. The problem is when I leave the presenter using the BACK arrow on the browser. The onUnbind() is never called (I tried with an breakpoint overriding the method, but is never executed). So that this handler is never unregistered. What is wrong? Thanks. public class MyPresenter extends PresenterWidget<ViewDiagramPresenter.MyView> { [...] @Override protected void onBind() { super.onBind(); registerHandler

Which is faster to use binding using converter or update in a property changed callback?

こ雲淡風輕ζ 提交于 2019-12-25 03:28:30
问题 I need fast updates, so I was wondering which one is faster and more efficient. 回答1: I performed some measurements, and can proclaim, that using a converter in a binding is cheaper than not using it. We're talking about 9% time saving. Probably, finding / creating a default converter takes more time than taking an instance of a converter from a resource... 来源: https://stackoverflow.com/questions/8872600/which-is-faster-to-use-binding-using-converter-or-update-in-a-property-changed-c

Binding InputValidation additional data using DependencyProperty

[亡魂溺海] 提交于 2019-12-25 03:14:13
问题 kind of missing here something: I'm using input Validation in a datatemplate (which works) and need to supply additional data to the validation (which doesn't work). Using "hard-coded" values (see comment in code below) works, using the binding doesn't. The datatemplate is applied to elements (which have a "value", "low_lim" and "high_lim" properties) displayed in an listView (this also works). I think I just can't wrap my head around binding. May be I just looked to long at this problem. If

Extjs 6.5.3 Binding hidden property of widgetcolumn from record values

烈酒焚心 提交于 2019-12-25 03:14:12
问题 I want to show/hide widgetcolumn of a grid with a property of my record. I tried to do that with binding my value : { xtype: 'grid', bind: { store: 'ActionList' }, border: true, flex: 2, name: 'actionList', title: this.titleActionGrid, columns: [{ xtype: 'widgetcolumn', height: 50, width: 65, widget: { xtype: 'button', text: '{sActionTitle}', scale: 'large', height: 45, width: 45, margin: 5 }, bind: { hidden: '{bIsHidden}' } }] } that didn't work so i search on internet and i find this fiddle

KnockOut JS - Binding a button to an item in a collection

巧了我就是萌 提交于 2019-12-25 02:58:43
问题 This is a slightly tricky question to put into words. Basically I've been trying to build a shopping cart page in KnockoutJS based on one of the examples in the the KnockoutJS website (http://knockoutjs.com/examples/cartEditor.html). However I wanted to make use of jQueryUI sliders so that I could adjust the values of each product in my cart. This I've managed to get working OK and I can add a product (in this case Motorcars) to my basket and adjust the value and also increase/decrease the

Windows authentication with Silverlight custom binding

半城伤御伤魂 提交于 2019-12-25 02:55:34
问题 I am trying to set up security within a web.config file for a WCF service hosted in IIS but keep getting the error message: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. I have read Nicholas Allen’s blog (link text) and it appears that this is the route that I need to take. However, I am using “binaryMessageEncoding” in a customBinding for my Silverlight service, and as such, I’m not sure how to

How to bind to WPF DataGridColumn in MVVM from ContextMenu?

拥有回忆 提交于 2019-12-25 02:24:32
问题 I have a DataGrid with different Columns (TextBox, Combobox, DataPicker, etc.) displaying Data via MVVM. Now I want to have ContextMenu on each ColumnHeader to Group by the selected column, but I can't access the Binding Source (Binding Path) of the Column to tell ViewModell which column it has to Group. When I open the context menu for the first time it works fine, but when I open the context menu once again, it still passes the SortMemberPath from the first time. What am I doing wrong? XAML

Angular - How to get input value at ngFor loop with one way binding

核能气质少年 提交于 2019-12-25 01:44:18
问题 Can you give me a way to get input value at ngFor loop with one way binding? <div *ngFor="let d of dataList"> <input #inputValue type="text" [ngValue]="d.value"> <button *ngIf="!d.open" (click)="d.open = true">change</button> <button *ngIf="d.open" (click)="save(d.id, NEWVALUE); d.open = false;">save</button> <button *ngIf="d.open" (click)="d.open = false">cancel</button> </div>` How can I set NEWVALUE? with two-way binding is easy. but after click cancel, value already changed as I don't