on 05-29-2007 1:51 PM
I'm developing an application where there is a thread running in the webdynpro application that updates the context. But this way the view is not updated automatically. Does anybody know how you can reload your view programmatically?
Hi Salomo,
I fear I may also be misunderstanding your requirement.
I understand - you have a thread which is populating the context with new values, but because it is doing it without any user interaction, the screen is not updating...
If this is the case, then one simple way to ensure the screen updates is to raise an event in the component with the thread doing the context updating, catch the event in the view you want to refresh, fire a plug to another view, in that new view's inbound plug event handler fire a plug back to the original view that you want to refresh.
It's a bit convoluted, and there might be better ways to do it. But it works!
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Salomo,
In properties tab of ur View, Make LifeSpan as When_Visible
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm getting the idea that people don't really know what I mean.
The problem is not that the data isn't available in the context. The problem is that if you run a thread in webdynpro that updates the context the UI control isn't updated automatically.
Now I have to refresh the view myself in the browser so it will display the data available in the context. It's all about data being updated when the view is already visible. With AJAX this would be no problem at all. Isn't there a way to do just that what AJAX does?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Salomo,
Yes, all replies you get here just don't make sense.
However, your question has no solutions due to nature of WD application: it renders content only during HTTP request/response cycle at final phase (when output is rendered). The only way to initiate HTTP request is user interactions from browser. I.e., WD works similar to "regular" Web applications but not to desktop applications (like ones created using Swing).
I'd also would not recommend you to use TimedTrigger to initiate HTTP request from client side. First, any user input will be lost. Second, WD API-s was designed for single-thread access, multi thread access will lead to errors/unpredictable behavior.
Valery Silaev
SaM Solutions
Hi,
I have tried, wdContext.currentContextElement.invalidate(), view.resetview(), both does not work at all,
Use code:
Create a method in custom controller
example:
public void NewElement()
{
__Arch_Arm_Project_Create_Input create = new
__Arch_Arm_Project_Create_Input();
wdContext.node__Arch_Arm_Project_Create_Input().bind(create);
}
Call this method in either in boundplug or action in View. it clears all data and creates new element for you.
This will work!
thanks
Ravi Golla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Salomo,
Invalidate the table datasource node for the expected results.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I do this in the main component no data is available anymore. If I do this in the view controller nothing happens.
I have 2 views one view with the search criteria and one view to display the results in a table. I display them with a view set. So the second view (Search result view) needs to be reloaded/refreshed so the data will be displayed. The data is available in the context because when I type in a row number in the table to be displayed and press enter the data is displayed.
Hi Salomo,
You can simply call
wdContext.getContext().reset();
.
This will invalidate the context and also delete all the dynamically created nodes
and attributes.
Regards
Amit
reward points if found useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already tried doin this but that only removes the elements. That's not what I want. I need the newly created elements by the thread that is running to be shown in a table. This table needs to be refreshed so it can display the results. Does anybody know how you can do that?
Thnx in advance.
I tried this also but that doesn't give me the desired result. The context is updated but the view still doesn't display the result. Only if i resubmit my query by pressing on a button the table is displayed with the results from the previous search. So what I need is to refresh this table somehow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.