Create a new component with dependencies between elements

Andreas Neumann shared this question 7 years ago
Answered

I have to create new UIs for some web applications. This application have a read and an edit mode. So for an attribute with a select list I need a normal input field for the read mode an a field with a select list for the edit mode. The followind screen shows this component:


62e9cc6539a7f07c10f26095c4bfc8bc


When using this component it is easy to change the width of the label. But when I want to change the width of the input field I have to change of "E_Level_Value", "Read_19", "Input_E_Level", "Edit_19" and "Category_E_Level". Is it possible to connect the size parameters of these elements so that the change of one element changes all other elements too? If yes, what have I to do? If no, is ist possible to program own widgets? If yes, how can I do this? If no, I suggest to add this functionality to JIM.

Comments (8)

photo
1

I'm afraid there is no way to do what you want. But we write it down as a good suggestion.

photo
1

Supplement to my idea:


To get a solution I suggest to link a component to the parent (parent should be a container [dynamic panel or data grid or table]). The parent must have vertical or horizontal layout. If a parent has some components and at least one of them is linked to the parent, the width (at horizontal layout of the parent) or the height (at vertical layout of the parent) will be calculated automatically as the difference of the width or height of the parent and the sum of all not linked components in the parent. If there is more than one component which ist linked to the parent, than the width or height of the linked components should be calculated with the same factor to protect the actual proportion of the different widths or heights.


In addtion it should be possible to link the width and height of the diffenent layers in a dynamic panel together.


Result will be: If you change the width or heigt of the container the child component winn be change automatically. So all my problem described in my question above will be solved very easy and you are able to create complex widgets with fixed layout rules.

photo
1

WOW. That's a complex idea indeed. But I like it! We well see what we can do but I think it looks like too complex to have it in the near future.

photo
1

I don't think that this is very complex because you already have such dependencies in JIM (e.g. in data grids)

photo
1

Well, yes and no. The complex thing is to have such a powerful feature and yet make it easy and intuitive for the user to discover it and use it.

photo
1

Ok. But I think you only need an additional checkbox in the size area. This checkbox should be enabled when a component has a parent with a vertical or horizontal layout. When checked the width or the height is locked and calculated automatically. When it is not checked you will have the current functionality.

photo
1

We will think about it. It's a really interesting feature.

photo
1

What is the result of your thinking?