Questions Tagged With databindinghttps://answers.axonivy.com/tags/databinding/?type=rssquestions tagged <span class="tag">databinding</span>enFri, 02 Jun 2017 10:49:40 -0400Number as nullhttps://answers.axonivy.com/questions/2669/number-as-null<p>Dear Ivy Team.</p> <p>We faced with the autounboxing problem. On UI side we have input field for number:<br> &lt;pe:inputNumber value=#{data.num}/&gt;<br> or &lt;p:inputText value=#{data.num}&gt;</p> <p>On data model, the field 'num' has type Number. When a user saves data, then we get value 0 in this field. Can we store null value?</p> <p>We read question:<br> <a href="http://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view">http://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view</a></p> <p>We tried set COERCE_TO_ZERO=false in: \AxonIvyDesigner6.5.0.53277\webapps\ivy\WEB-INF\web.xml</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;org.apache.el.parser.COERCE_TO_ZERO&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <p>in %JAVA_OPTS%: -Dorg.apache.el.parser.COERCE_TO_ZERO=false<br> in process code, as: System.setProperty("org.apache.el.parser.COERCE_TO_ZERO", Boolean.FALSE.toString());</p> <p>But it didn't help for us.<br> Could you correct us, what do we need do any more for Designer and then for Engine?</p> <p>Where do we need set variable <strong>ivy.vm.additional.options</strong>?</p>Maxim SFri, 02 Jun 2017 10:49:40 -0400https://answers.axonivy.com/questions/2669/number-as-nulldatabindingadd custom column into RTablehttps://answers.axonivy.com/questions/1806/add-custom-column-into-rtable<p>Hello!</p> <p>Is there a runtime possibility of creating a new column in designed ivy-RTable ? I have tried to do it with java in onLoad method of RichDialog - no success. Adding an empty column and setting header text is ok so far. I add a Custom implemented ITableCellRenderer and override the one and only method getTableCellRendererComponent(...)</p> <p>Renderer of designed ivy table column is of type ch.ivyteam.ivy.richdialog.widgets.components.renderers.TableCellRenderer. This type if for me in designer not accessible. Using debugger i have seen the table model configuration String (&gt;7000 chars) in it, but i can not edit it or create new one.</p> <p>When i try to use my custom renderer for new column, e.g. com.ulcjava.base.application.table.DefaultTableCellRenderer or ULCLabel, i am never able to render the text in this column. I have tried multiple methods (setText(), setValue(), "value" parameter...) but cell is always rendered empty. the only thing i can set is background color.</p> <p>Is there a way for such thing ?</p> <p>Thanks in advance josef koupal</p>josef_koupalTue, 14 Jun 2016 17:02:16 -0400https://answers.axonivy.com/questions/1806/add-custom-column-into-rtablertablerichdialogdatabindingauto initialisation / number 0 from JSF Viewhttps://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-view<p>Hello, we have a datatable in jsf view, one column is a number in bean. After submiting form (ivy event) we receive initialised number 0, so our validation cannot check if user inserted it manually (field is mandatory, 0 must be explicit inserted). How can we avoid the auto initialisation ?</p> <p>Karel</p>tauserThu, 03 Mar 2016 08:44:40 -0500https://answers.axonivy.com/questions/1674/auto-initialisation-number-0-from-jsf-viewdatabindingeljsfEditable Datatable and Recordsethttps://answers.axonivy.com/questions/1673/editable-datatable-and-recordset<p>Hi, I have a problem with p:datatable which has dynamic number of columns and it is editable. Data source of the table is ivy Recordset. </p> <p>The problem is when a user change some value, this change is not processed into Recordset so the Recordset remains with old values. I have tried to change the datatable to use cell editor - with no effect.</p> <p>Here is the code: <img alt="alt text" src="http://answers.axonivy.com/upfiles/datatable.PNG"></p> <h1>{lgi.prioritizationComposite.getRows()} returns a Recordset</h1> <p>Do you have any idea what is wrong? In HTML dialog demos there is an example of datatable and recordset. But I see nothing special in it.</p> <p>Thanks Matej</p>matej_smetanaWed, 02 Mar 2016 13:35:37 -0500https://answers.axonivy.com/questions/1673/editable-datatable-and-recordsetrecordsetdatabindingprimefacesHow can I circumvent NullPointerException in data bindings?https://answers.axonivy.com/questions/438/how-can-i-circumvent-nullpointerexception-in-data-bindings<p>I try to select an entry in a combo depending on a value in a record set like that: </p> <pre><code>panel.comboCountry.selectedIndex &lt;- Integer.parseInt(in.EmployeeList.getField(in.RowId,"country").toString())-1 </code></pre> <p>This works properly, but if <code>NULL</code> is stored in the recordset, then Ivy throws a NullPointerException. </p> <p>How can I circumvent this?</p>Yves JarczykThu, 12 Jan 2012 11:22:39 -0500https://answers.axonivy.com/questions/438/how-can-i-circumvent-nullpointerexception-in-data-bindingsrichdialogdatabinding