Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jvx:client:gui:concatmask_linked_celleditor [2018/11/08 22:18]
admin
jvx:client:gui:concatmask_linked_celleditor [2023/03/13 08:16] (current)
admin
Line 1: Line 1:
 ~~NOTRANS~~ ~~NOTRANS~~
-~~Title: Concat ​mask of linked cell editor~~+~~Title: Concat ​Mask of Linked Cell Editor~~
  
-The [[jvx:​client:​gui:​concatmask_linked_celleditor|linked cell editor]] is a combobox with a table in it. The table has one or more columns and it's possible to choose one value from the table as display value. Here's an example+The [[jvx:​client:​gui:​custom_linked_celleditor|linked cell editor]] is a combobox with a table in it. The table has one or more columnsand it's possible to choose one value from the table as display value. Here's an example:
  
 {{:​jvx:​client:​gui:​linkedcelleditor_standard.png?​300|}} {{:​jvx:​client:​gui:​linkedcelleditor_standard.png?​300|}}
  
-The combobox is a very special control because not all GUI technologies show more than one column in a combobox. In desktop technologies like Swing, it's not a problem to show more than one column. In web technologies it's unusual to show more than one column. Usually, only one column (= display value) will be used in a combobox. Here's an example:+The combobox is a very special control because not all GUI technologies show more than one column in a combobox. In desktop technologies like Swing, it's not a problem to show more than one column. In web technologiesit's unusual to show more than one column. Usually, only one column (= display value) will be used in a combobox. Here's an example:
  
-{{:​jvx:​client:​gui:​linkedcelleditor_html5.png?​300 |}}+{{:​jvx:​client:​gui:​linkedcelleditor_html5.png?​300|}}
  
-If you want to show multiple columns in such GUI technologies,​ you have to use a calculated column which concats the values of different columns ​in one value.+If you want to show multiple columns in such GUI technologies,​ you have to use a calculated column which concats the values of different columns ​to one column. With JVx, this can be done very easily. Simply write one line of code: 
 + 
 +  ((ILinkedCellEditor)book.getRowDefinition().getColumnDefinition("​SALU"​).getDataType().getCellEditor()).setDisplayConcatMask("​* (*)"​);​ 
 + 
 +The example sets a concatenation mask (* (*)) for the cell editor (ILinkedCellEditor) of a specific column (= SALU). The concat mask supports wildcards (= *). Every * is a column from the ColumnView. The order is defined by the ColumnView column order. It's also possible to set a simple concat mask without wildcards:​ 
 + 
 +  ((ILinkedCellEditor)book.getRowDefinition().getColumnDefinition("​SALU"​).getDataType().getCellEditor()).setDisplayConcatMask("​ "); 
 +   
 +In this case, a space will be used to separate all columns. Here's an example with a wildcard concat mask: 
 + 
 +{{:​jvx:​client:​gui:​linkedcelleditor_html5_concat.png?​300|}} 
 + 
 +It's a good idea to use the concat mask only in web environments. This can be configured with the following code: 
 + 
 +  if (getApplication().getLauncher().isWebEnvironment()) 
 +  { 
 +    //set the concat mask 
 +  }
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information