PDA

View Full Version : Zend2 + ExtJS integration



p.szuttenbach
7 Apr 2014, 9:22 AM
Hi, anyone has succeeded in integrating Zend Framework with ExtJS4? Maybe someone could help because I've problem after generating workspace by Sencha CMD and creating app. I've changed the layout file:


<!DOCTYPE HTML><html>
<head>
<meta charset="UTF-8">
<title>bms</title>
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<link rel="stylesheet" href="/bms/bootstrap.css">
<script src="/ext/ext-dev.js"></script>
<script src="/bms/bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="/bms/app.js"></script>
<!-- </x-compile> -->
</head>
<body></body>
</html>

Everythink works fine when building the application, but when I try to test development version without build I've got error in bootstrap.json (404 not found) because the file at path localhost/bootstrap.json doesn't exist. How I have to configure layout file to work in development mode?

slemmon
14 Apr 2014, 11:22 PM
You might run 'sencha -sdk /path/to/ext/sdk generate app AppName path/to/AppName' and use the bootstrap files, index, app.json, and hidden .sencha folder from the generated app in your existing app (make sure the app name you use when generating the app matches the app name of your existing app).

p.szuttenbach
23 Apr 2014, 9:36 AM
Hi, I've generated by Sencha cmd workspace and application in /public directory of Zend Skeleton Application, but still I've got a problem because bootstrap.js contains paths like ext/... but when I copy generated index.html content to Zend layout.phtml file paths don't contain the workspace path, when I change paths to contain workspace/app/ I've got 404 error for a lot of files because the paths in bootstrap.js aren't correct. Is there any way to configure in sencha.cfg or sth else to change the root path to application?
I've got following structure of folders:
-public
-- workspace
--- app
--- ext
--- index.html
--- bootstrap.js - in this files paths are generated as the root folder is workspace folder, but mine is public
--- and other generated files