• 1 reply
  • Latest Post - ‏2014-04-17T13:02:48Z by PrashantDhanker
7615 Posts

Pinned topic Tables, subviews and visibility

‏2013-01-12T01:04:56Z |
Hi everyone,

Once again, the tables bring me here.
Before all, let me introduce a little bit of context.

In BPM 8.0, in a coach view, is possible to set an element visibility in the view function like this:

Scenario: a control, p.e a textbox, in a coach view and it's ask to hide it

var controlId = 
"CONTROLID"; var views = this.context.getSubview(controlId, 

//considering that only exists one var view = views[0]   
//now, I can do it by two ways this.context.setDisplay(false, view); 
//visibility is hidden(1) 
//or var visibility = 
"NONE"; view.context.options._metadata.visibility.set(
"value",  visibility);
//visibility is hidden (2)

The first option could be find here:
And the second's one here:

Now, my problem...

Scenario: I have a table that in one column stands a control, in this case a button. The button's visibility depends of another row value, and I can get this value.

Problem 1: Using the previous cenario, it's not possible just set the controlId variable to the row's controlId
Solution: I had to get the table view first and then the subviews inside her.

So my code turn like this:

var tableControlId = 
"TABLEID"; var tableView = this.context.getSubview(tableControlId, 

//considering that only one table with this id exists   var rowsControlId = 
"ROWID"; var rowViews = tableView.context.getSubview(

true);   var visibility = 
//so if we want to hide everything 

for(var i = 0; i < rowViews.length; i++) 
//it would make sense using of this options this.context.setDisplay(false, rowViews[i]); 
//or tableView.context.setDisplay(false, rowViews[i]); 
//or rowView[i].context.options._metadata.visibility.set(
"value",  visibility) 

Problem 2: Unfortunately, none of this options can hide the button, so what am I doing wrong and what can I do to solve this problem?

Best regards and I'm waitng for your answers.

  • PrashantDhanker
    67 Posts

    Re: Tables, subviews and visibility


    I have similar scenerio:

    I want to customize the visibility of the first column in a table. What I want to achieve is: The table data should be READ ONLY however the Radio Button (Since the table is a Single select) should be EDITABLE.


    Any inputs welcomed.