Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 3, 2014

[MOBILE] Integrating PhoneGap (Apache Cordova) into Your Mobile Applications

Integrating PhoneGap (Apache Cordova) into Your Mobile Applications Leverage PhoneGap (Cordova) JavaScript libraries to integrate device features into your CQ5 applications for mobile devices. For example, the Camera component provides controls that interact with the device camera. Users can operate the web page controls to take photographs and upload them. The PhoneGap Build service compiles web applications consisting of HTML, CSS, and JavaScript as native mobile applications. Native applications can either contain copies of the web content, or download content from the web server. Using the application as a wrapper for live web pages, you can update content without updating the application. Also, users are not bothered with application updates. The PhoneGap Integration package provides a native iOS application that acts as a wrapper for web sites. Users can install the application to access web site content, including PhoneGap-driven device components. The application is pr

[CODES] Adobe CQ5 code snippets – Cheat Sheet

Code Snippets To get list of selectors in an array String[] selectors = slingRequest.getRequestPathInfo().getSelectors(); To get a page from a path Page page = pageManager.getPage(path); To get any containing page for a resource Page page = pageManager.getContainingPage(resourceResolver.getResource(path)); To get a session in JSP final SlingRepository repos = sling.getService(SlingRepository.class); session = repos.loginAdministrative(null); To get query object and run a query build query using search in crx explorer or crxdelite String stmt = "select * from cq:Page where jcr:path like '/content/training/%' and contains(*, '" + slingRequest.getParameter("q") + "') order by jcr:score desc"; Query query = currentNode.getSession().getWorkspace().getQueryManager().createQuery(stmt, Query.SQL); QueryResult results = query.execute(); Get node from path Node n = session.getItem(path); // where session = JCR session sessi

[CONFIGURATION] Change default start page

Change the default startup page from projects.html to welcome on login in Adobe CQ 5.6 and above. CQ5.6 introduced responsive layout and the landing page after logging into the author instance goes to the new touch friendly interface. However, as a developer I prefer the old interface where I can quicky navigate to any of the options. Author instance: So to change the landing page post login in the Author instance to go to the welcome page here’s what you need to do Go to CRX Explorer Interface http://localhost:4502/crx/explorer/browser/index.jsp Navigate to the node /libs/cq/core/config. author /com.day.cq.commons.servlets.RootMappingServlet Right click the rootmapping.target property and select edit. Change the value to /welcome.html Click Save All Publish instance: Go to CRX Explorer Interface http://localhost:4502/crx/explorer/browser/index.jsp Navigate to the node /libs/cq/core/config. publish /com.day.cq.commons.servlets.RootMappingServlet R