Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: Is there a way to pass params to dispatch? #7

Open
zam6ak opened this issue Nov 12, 2012 · 1 comment
Open

Q: Is there a way to pass params to dispatch? #7

zam6ak opened this issue Nov 12, 2012 · 1 comment
Assignees

Comments

@zam6ak
Copy link

zam6ak commented Nov 12, 2012

Hi Bruno

I am trying out v2 of the Router, and have noticed that override for controller's render() method is not no longer in your example. Now, you are using dispatch() event to automate rendering....

But I noticed that view generation is rather rigid in a sense where view is inferred from names of controllers and its action e.g.:

viewClass   = Ext.ClassManager.get('SinglePage.view.' + controller + '.' + action);

My question is following:
Is there a way to pass in extra params to dispatch event from action?
This would allow me to pass in view xtype, viewmodel, weather I want it in a tab or dialog/window, should it be modal or not, closeable or not, etc, etc....I agree that rendering process should be left for each app to do, but it would be nice to be able to automate it....

My current solution is that I am still using override for controller render() method which accepts extra params, and then every controller action that maps to a route has to call it (a bit of a pain). If I could somehow send view xtype and view config to dispatch() that would be great...

@brunotavares
Copy link
Owner

This is a good point. I'll give some thoughts. If you have something feel free to do a pull request.

@ghost ghost assigned brunotavares Dec 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants