Multible commands with sendCmd button

Hello,

im still pretty new to OpenHab and i don’t know much about it yet.
But i want to create a widget in HABPanel with multible text boxes and only one button.

The Button should update all items linked to theses textboxes at once.

Right now it only sends the command for only one textbox/item.

 <div class="form-group">

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberX" ng-value="itemValue('uber_x_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberY" ng-value="itemValue('uber_y_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberZ" ng-value="itemValue('uber_z_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberL" ng-value="itemValue('uber_l_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
	       ng-model="valUberH" ng-value="itemValue('uber_h_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberB" ng-value="itemValue('uber_b_test')"></input>

<input type="text" class="form-control" no-snap-drag="true"
       ng-model="valUberM" ng-value="itemValue('uber_m_test')"></input>


<button type="button" class="btn btn-primary"
       	ng-click="sendCmd('uber_x_test', valUberX)">
  			SEND</button>
  </div>


<p>  {{itemValue('uber_x_test')}} </p>
<p>  {{itemValue('uber_y_test')}} </p>
<p>  {{itemValue('uber_z_test')}} </p>
<p>  {{itemValue('uber_l_test')}} </p>
<p>  {{itemValue('uber_h_test')}} </p>
<p>  {{itemValue('uber_b_test')}} </p>

the itemvalues at the button were just for checking and should not be included in the final widget

I don’t use HabPanel much, but I think this is best handled with either a rule or item profiles.

I don’t fully understand what you want to accomplish, so I’m assuming that you want the same value to be shared to all of the items.

With a rule, you would use the updated item as your trigger to update the others with the same value. With an item profile, you would have the additional items “follow” the channel of the main item.

Whichever approach you choose will depend on how you use the items in question.

thanks for your reply.
I want to assignt the value in each textbox to the corresponding individual item using only one button.

With a rule, you would use the updated item as your trigger to update the others with the same value. With an item profile, you would have the additional items “follow” the channel of the main item.

How do i use a rule to get the values I enter into the textbox?

Perhaps the way to do this is to send each individual values to proxy Items in openHAB as they are completed, and have a SAVE button that also sends a command to a proxy that triggers a rule to update real Items from proxy.

How can I extract the contet of the textboxes with a rule?

You would need to have your individual settings onscreen each associated with a different Item.
When you poke the “go” button, a rule can get the state of each of those Items to do whatever.

This not getting individual values from screen at “go” time, this is getting them as you change each one, but not doing anything with them until later.