on 08-12-2011 8:01 AM
Hi Experts,
I have 5 views.
Home screen
1-enter invoice
2. enter line item
3. enter additional data
4. Submit
I have a home button in submit screen where i will take the user back to home screen. but here i want to invalidate all the context of the views 1 t0 4.
i know i can invalidate them from Comp Controller Method, provided they are mapped. but many of the contexts of the views are local to views.
Is there any method to clear the view/context of the views from other view?
Any clue is highly appreciated.
Thanks,
Ajay
Hello Ajay,
You can do this by creating a event in Comp Controller and then creating event handler in all the views. In this event handler write the logic to invalidate the context nodes.
For this do the following
1. Create a event in component controller ( say INVALIDATE_CONTEXT)
2. Create a method in comp controller ( say trigger_invalidate_event) and in this method fire the INVALIDATE_CONTEXT event
3. In all four views, create an Event handler method and map it to the INVALIDATE_CONTEXT event
4. in the event handler methods, write the logic of invalidating the context nodes
5. In the 4th views Submit button event, call the Component Controllers' TRIGGER_INVALIDE_EVENT method
Thats it.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Saravanan,
>>4. in the event handler methods, write the logic of invalidating the context nodes
But where will i call this event in each view.
I can't invalidate the views data when i am navigating to next view as i might need the views data when user presses back and prev buttons in the view.
i want to clear only in submit view.
Can you pls elaborate. Thanks
Ajay
Hello Ajay.
In the Submit Button, you are gonna call the ComponentController->TRigger_Invalidate_event method (as per step 5). This method will inturn fire the INVALIDATE_CONTEXT event ( as per Step 2). Once this event is fired, the framework will call all the event handlers that are registered for this event. So as per step 3, if you have created event handlers (for the event INVALIDATE_CONTEXT) in all the views, then it will be called automatically by the framework once the event is fired from the Component Controller.
Step 3 elaboration. Go to the individual view's method tab. Enter the method name and select the 'Method Type' as event handler and then select the Component controller's event in the event column for this event handler method.
This is same like registering a event handler method for a event.
Hope this is clear.
BR, Saravanan
Hi,
In the Back Button on action of that button Before you fire plug to home screen .Set_attribute of all the content attributs to NULL.
Then fire plug.
Regards,
Vinoth R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> i know i can invalidate them from Comp Controller Method, provided they are mapped. but many of the contexts of the views are local to views.
Hi.,
This is the only way . Map the node to component controller and invalidate the node.,
else .,
in Handle Plug ( Event handler for inbound plug, You can find HANDLE<Plug_name> in Methods TAB ) of view you can clear the contents of the node., using set_attribute( '' ) or invalidate method
hope this helps u.,
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.