Here is the UI scenario I am facing and if you guys have have a way around it would be much appreciated.
I have a plus shaped add button on the screen. Clicking on this makes a pop up window visible. In this pop up window you can type in the name you want to assign and click on add. On clicking add a empty text box I have on the screen will take the value I fed in the text edit box in the pop up window. Now I want to do this flow multiple times so that I can have 5-6 text boxes on screen take the value of what I am providing in the pop up window. Thanks
10 answers
Hi Varun,
I think you should consider using table element instead of text box elements to list all values you have added, since you have no way to “create” new text boxes dynamically.
You can use table element to achieve since there are actions to insert/append/delete its rows. Here’s an example:
hmm, Thanks. I will try this. I did try table, just didn’t feel the template design for table was something I liked. Anyways the way I m creating this table using text boxes is by having empty text boxes placed equidistantly and the value of text edit is something I am expecting to fill these empty text boxes. I realize my table might not have unlimited number of rows but for my purpose it’s fine. A 5 row table works fine for my purpose. Any clue how to make this addition of 5 rows possible one by one if I still use text boxes? Thanks
Maybe you could store the actual number of rows in a global property, increase it when user add row. Then, use a switch branching to check that global property, set value to correct text box according to the property value.
Okay you were right using table would be much easier. However my table is having a check box and I need to drag and drop in my table from elements, however with every row being added I also need a check box to come in that row. Is there a option of inserting checkbox dynamically on element click?
Thanks
Just like the checkbox explained above can I have hyperlink or any other element on add row to a table? Thanks
Also if I am inserting a new row at position 1, how do I get that area highlighted every-time the new row is inserted?
Sorry for questions. In this table as I mentioned I have checkboxes, and I want the users to have the option to delete rows based on check box selection. How is this possible? Thanks
So this table I have is made from a form- text edit boxes as I had mentioned in a previous message. I am curious if there is a way for me to have each row of the table to have hyperlink like detail, which basically takes the value of the table row and puts it back in the form so that I can edit it and on saving it will update the table? Thanks
-
Just wondering if this message is making sense? I can send a plot to explain what i m referring to and it might be better. Thanks
Hi varun,
Unfortunately when you insert new row into table, you can only specify its text content. You could not insert hyperlink of checkbox into the new row, at least for now.
If complex content are needed for the newly added row, you will need to use the second approach: precreate 5 rows of content and show/hide them when user add/delete the row.
This is going to be a pain for me as I just spent the entire day exploring the table options. So let me rephrase and see if I can make one feature work for this table atleast for me, i.e. somehow using the table you guys provide and making checkbox appear for every new row I insert/add. One approach which comes to my mind:
1. Create 5, or 6 checkboxes ( according to the number of rows) and make them invisible. Every time a new row is created the checkbox becomes visible. Is this possible somehow?
In future how hard is it for your teams to consider the insertion of any element type just like you guys do with text for a table row insert?
Thanks,
Varun
-
Yes, I think that approach is the only feasible one basing the current facilitis and your requirements.
To insert any type of element into table dynamically is quite complicated. ForeUI must 1) provide a way to create (or clone) element during the simulation, and 2) allows embedding element into container on the fly. The first one should be implemented in V3.0, while the second one is still under evaluation. -
so you said if I use the above approach I can use the table itself. How do I check for a newly added row in a table? I may have confused you but I am trying to avoid going to my second approach of not using table and having text boxes to form a table.
-
That's easy. The newly added row always has the index that equals to the number of rows, and the row count is a built-in property of table element. So you can just check the number of rows in the table, and set the checkbox visible so that it will be floating on the new row.
-
Okay. I will try this. Thanks
This question is now closed