Add a list with all inputs in the page

On our radar

Would be nice to have access to the "list" of inputs in the page, that we could iterate through and set the common properties, like Valid and ValidationMessage, for example, instead of having to access one by one.

Created on 29 Oct 2017
Comments (5)

This would be useful for advanced users, but in general the platform avoids anything that looks like or works like reflection, because it leads to code that is harder for less experienced people to understand.


You could also create a list of a record yourself, with the desired properties you need. You could also create a structure with all properties you need and add a list of that to your screen.

Agree with Justin, although it would be helpful for advanced users it would probably make the language more complex and harder to understand.


J. and Vasco,

While I agree that the main purpose of the platform is to be as easier as possible to use and maintain, this shouldn't be done at the cost of flexibility to the point of forcing its users to resort to very "obscure ways" to try to simplify their work.

For example, many times, on more length pages (usually long forms), that we usually can't avoid because of client requirements, we want to better structure and allow multiple developers to work on different sections, and we use web blocks. But now we have problems, as the page don't see the inputs in the web blocks, and the web blocks don't see the page. In order to allow properly validation and submits we have to resort to different methods that ends up being much "dirtier" than if we would be able to somehow access the inputs from the web blocks.

This is in fact already possible. The inputs that are in the web blocks are in fact part of the same form as the ones in the page, and are submitted together. We only do not have access to them. But there are methods in HttpRequestHandler that allow you to get the values of all inputs (the standard ones, at least), sent by to the serve in a Post, for example. So, it is possible to recover those values and use them.

but would be much easier, clean, maintainable and less error prone if the system provided a way to access all inputs in a list, no matter where they were declared.


The idea here is, as you can see by my answer above, to access existing inputs that are present in web blocks, for example, not keep a list of properties in the page.

Eduardo Jauch


could you still clarify it a bit, because I don't see the cleaner, maintainable and less error-prone bit.

with the current way you have strongly typed comparision, while in a list you are going to lose that, because unless you create some statics/enums around it you probably end up comparing it with a string.

Perhaps I failed to grasp your full idea, hence the clarification.