| || |
Any Guidance Custom Table controls?
My application has a web page which includes a dropdown selection list followed by a set of HtmlTables. Each table looks similar, but may be slightly different. The tables are used to set the access control for a particular feature in the product.
Each table appears to the user with n rows, where the first column is text (e.g. "View:") followed by 3 more colums which are radio buttons labeled "Allow" "Deny" "Not Set".
Silk tags each HtmlTable as MyTable[x], where x is a number representing the xth instance of the table in the page. Silk sees each HtmlTable as having two columns. The first column contains n rows of Text. The second column contains n * 3 rows of radiobuttons. For example, there are n "Allow" radiobuttons, each with a tag something like Allow.
Just to complicate matters, if you change the value of the dropdown list, you'll get a different set of these tables. Also, the rows that appear in each table may be different (e.g. some contain "Create", where others will not, but it is predetermined which tables will display which rows).
I would like to be able to define a control "ACLClass" to represent the tables, so that in the declaration for my page, I just declare each table as this type of control (ACLClass AllBusinessObjects). The control should have methods that will allow me to get and set the values of the radio buttons (e.g. MyPage.Projects.SetACL("View","Edit")).
I've tried to define a generic control (window) called ACLClass that contains all of the possible user-perceived rows (e.g. View: Allow, Deny, Not Set). But, I run into a few problems.
-- I don't know how to attach the permissions (Allow, Deny, Not Set) to the right (View) because the tag for each permission varies depending on which rows appear in the table. Allow could be for edit on one table, but for Create on another.
-- different tables will have the same tag because as you change the dropdown value, different tables appear, but the tags are reused. (I thought I could just declare a new page for each value of the dropdown, but again, the tag for the page doesn't change, do I don't know how to uniquely identify the page)
In an attempt to programatically determine the contents of each table, I tried using GetRowChildren. This failed with the radio buttons, "Error: Agent returned an invalid response" (I have a call into Segue to find out why).
Either I'm using the wrong strategy here, or i'm just not using this one correctly. Any suggestions for how I can generically declare these tables and create get/set methods for them?
Re: Any Guidance Custom Table controls?
Silk got the capabalities of working with dynamic content even u have not captured the page. If you are sure of the table generation pattern code accordingly. Let me know if you need any help.