Okay, still playing with visualizations here.
I have a visualization that populates a dropdown via a file on a maintenance web page. Within the web page, there is an event that can cause an update to the file that drives the visualization. I have not found a way to get the visualization to reload programatically. I can hit F5 to manually reload the web page, which reloads the dropdown. I'd like trigger a reload of the dropdown's visualization within the event that updates the file.
Refresh/Reload Visualization
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Refresh/Reload Visualization
Field Visualizations are really little more than simple replacements for the default edit box shown for a field. They were never intended to be anything more than that. This is why they're limited to getting and setting a single property.
The sort of functionality that you're talking about requires a reusable part that can be directly addressed by the application code and that can respond to application events. This is a job for a completely separate and discrete reusable part.
Regards
The sort of functionality that you're talking about requires a reusable part that can be directly addressed by the application code and that can respond to application events. This is a job for a completely separate and discrete reusable part.
Regards
Re: Refresh/Reload Visualization
I get that. I was hoping there was a method to ask it to redraw itself, which I figure was possible, as it is pretty generic. If not, asking the parent to redraw the entire web page would be the next best bet. (which I am not sure how to do either)
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Refresh/Reload Visualization
Hi,
just out of curiousity, which one of the different types of field visualization are you using in this scenario ?
Danny
just out of curiousity, which one of the different types of field visualization are you using in this scenario ?
Danny
Re: Refresh/Reload Visualization
A VisualHost -> Reusable Part. The reusable part is a DropDown containing DepartmentID / DepartmentName. We are doing all our development on Web Forms, using the latest version 14.
The Visualization works great in several pages, but not on the one I am maintaining departments in. If I do an add, change or delete, the Visualization DropDown of department does not reflect the changes until I hit <F5> to reload the form.
I am new to Lansa, so it may be that the other choice for Visualization "New Visual Part" is more appropriate. I can't find any documentation or examples that help me out.
The Visualization works great in several pages, but not on the one I am maintaining departments in. If I do an add, change or delete, the Visualization DropDown of department does not reflect the changes until I hit <F5> to reload the form.
I am new to Lansa, so it may be that the other choice for Visualization "New Visual Part" is more appropriate. I can't find any documentation or examples that help me out.
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Refresh/Reload Visualization
Hi,
All visualizations are basically a combination of a label and a control.
If you define a *Visual_Host, you define your own panel to take the place of the control, the label is still created for you.
If you define a *Visual_Part, you define your own panel for the whole visualization, LANSA no longer creates a label for you.
The Visual_Host visualization creates an instance of the Reusable Part, which is inaccessible from your RDMLX code, as you found.
The Visual_Part visualization is different, the Reusable Part becomes the ancestor of your field class, so its methods, properties and events ARE accessible on the field instances.
I agree with Stewart that it is usually clearer if you just use a Reusable Part directly, drag and drop it onto wherever you need an instance of it. Unless you have a specific requirement to tie it to a field that I don't know about...
Hope this helps, good luck.
Danny
All visualizations are basically a combination of a label and a control.
If you define a *Visual_Host, you define your own panel to take the place of the control, the label is still created for you.
If you define a *Visual_Part, you define your own panel for the whole visualization, LANSA no longer creates a label for you.
The Visual_Host visualization creates an instance of the Reusable Part, which is inaccessible from your RDMLX code, as you found.
The Visual_Part visualization is different, the Reusable Part becomes the ancestor of your field class, so its methods, properties and events ARE accessible on the field instances.
I agree with Stewart that it is usually clearer if you just use a Reusable Part directly, drag and drop it onto wherever you need an instance of it. Unless you have a specific requirement to tie it to a field that I don't know about...
Hope this helps, good luck.
Danny