-
29 Jun 2012 7:14 AM #1
Variables inside Proxy URLs - Another issue with escaped values within Architect
Variables inside Proxy URLs - Another issue with escaped values within Architect
Hey, got an API with multiple languages to translate the content coming through on the server side (smaller locale files and different set of data etc).
So my URL would be something like:
api.mobile.com/en/events/1
api.mobile.com/de/events/1
api.mobile.com/es/events/1
The thing is..... you can't put variables inside a Proxy URL because values are escaped as String.
What I would like to do is something along the lines of:
But as you know this transforms into:Code:api.mobile.com/' + Ux.locale.manager.getLanguage() + '/events
Sorry if I come across a little frustrated about this sort of thing but I'm constantly hitting walls with what's possible in Architect. I think it's a little crazy that my company spent $399 on an application with so many limitations and bugs.Code:api.mobile.com/\' + Ux.locale.manager.getLanguage() + \'/events
I think I've had these errors opening Architect for about a month now:
I've had many times where it's not cascaded changes (had to delete and recreate parts and even spent a day once trying to fix when I couldn't save my project)Code:TypeError: 'undefined' is not an object Source Class: undefined Line 0
My project looks crazy since about a month ago when having to use my own Resources (CSS/JS)
Alot of the times my Views are just blank screens.
At the moment it's not possible for someone to create an entire application using Architect. At some point towards the end of my project I'm going to have to abandon it so I can get around what's not possible.
-
2 Aug 2012 8:20 PM #2
Cannot agree more
Cannot agree more
Lacking of flexibility is the most pain when you are trying to develop the whole app using Architect. I think it should give people more freedom and creativity not too much constraints and limitations.
-
3 Aug 2012 3:36 AM #3
-
3 Aug 2012 4:40 AM #4
I've made a little hack (atm I'm using it for locale changing) and it might be helpful:
http://www.sencha.com/forum/showthre...l=1#post863022
-
3 Aug 2012 6:24 AM #5
-
3 Aug 2012 8:31 AM #6
If your server code is solely for your application, why just don't change a little?
api.mobile.com/events/1?lang=en
Use REST proxy and send the lang parameter via extraParams. As matter of fact IMHO that that's the correct "precedence" events > event > event content in some lang.
When you use tools like SA there are some scenarios in which with you must do small changes to overcome tool's limitations.
Regards.UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!


Reply With Quote

.