Hi there,
This is my first post here, though I've been lurking for a couple of months now. I've started using SmartClient v8 (client-side JS only, no GWT at this time) in my first project and it's been a great toolkit so far.
The short version of my question is this: when is appropriate to use the DetailViewer object?
The longer version: I'm developing a screen that has a master/detail layout. Each master record is displayed in a grid and has a few fields. The details are displayed in multiple tabs, with the content of each tab provided by a separate datasource. This is being done because the master record is just an account number and customer name, while the details illustrate various other data concepts, depending on the type of client, the security level of the user, etc... The usual stuff. So far, so good.
The tabs are meant to display read-only data, so as to minimize transaction overhead. If the user wants to edit the data on the tab, they click on an edit button and the tab's contents are replaced with a form. Still, so far, so good.
On one of the detail tabs, I'm using a DetailViewer. Looking through the various examples and documentation, this approach was the closest that I could find to what I wanted, with the possible exception of using a table and a bunch of labels. The data feeding the DetailViewer is JSON and has a complex structure, but this also hasn't been an issue, thanks to the helpful information found elsewhere in the forum.
Here's where things start to give me a problem. One of the fields is an array of values - in this case, first and last names. I'm currently trying to figure out how to render the list. I'm also trying to figure out how to concatenate values into a single field (e.g. LastName + "," + FirstName). Ultimately, I would like to have each name in the list as a clickable field. I can get the DetailViewer to recognize the list itself, but since each item in the list is an object (lastname and firstname), the output is "[Object object]" for each item. My best guess so far was to use a DetailFormatter but I'm not sure as to its correct use for lists and concatenation. And while I'm groveling for free help, I ultimately need to filter the items in the list based on each items value. Again, I'm guessing DetailFormatter is the correct choice but I'm not sure how to use it correctly.
My question is basically is this possible to do? Where can I find the relevant information in the user documentation? Most importantly, is this even the right approach or is there a better way?
Any help is appreciated.
Thanks in advance,
Sol
This is my first post here, though I've been lurking for a couple of months now. I've started using SmartClient v8 (client-side JS only, no GWT at this time) in my first project and it's been a great toolkit so far.
The short version of my question is this: when is appropriate to use the DetailViewer object?
The longer version: I'm developing a screen that has a master/detail layout. Each master record is displayed in a grid and has a few fields. The details are displayed in multiple tabs, with the content of each tab provided by a separate datasource. This is being done because the master record is just an account number and customer name, while the details illustrate various other data concepts, depending on the type of client, the security level of the user, etc... The usual stuff. So far, so good.
The tabs are meant to display read-only data, so as to minimize transaction overhead. If the user wants to edit the data on the tab, they click on an edit button and the tab's contents are replaced with a form. Still, so far, so good.
On one of the detail tabs, I'm using a DetailViewer. Looking through the various examples and documentation, this approach was the closest that I could find to what I wanted, with the possible exception of using a table and a bunch of labels. The data feeding the DetailViewer is JSON and has a complex structure, but this also hasn't been an issue, thanks to the helpful information found elsewhere in the forum.
Here's where things start to give me a problem. One of the fields is an array of values - in this case, first and last names. I'm currently trying to figure out how to render the list. I'm also trying to figure out how to concatenate values into a single field (e.g. LastName + "," + FirstName). Ultimately, I would like to have each name in the list as a clickable field. I can get the DetailViewer to recognize the list itself, but since each item in the list is an object (lastname and firstname), the output is "[Object object]" for each item. My best guess so far was to use a DetailFormatter but I'm not sure as to its correct use for lists and concatenation. And while I'm groveling for free help, I ultimately need to filter the items in the list based on each items value. Again, I'm guessing DetailFormatter is the correct choice but I'm not sure how to use it correctly.
My question is basically is this possible to do? Where can I find the relevant information in the user documentation? Most importantly, is this even the right approach or is there a better way?
Any help is appreciated.
Thanks in advance,
Sol
Comment