Hi ,
I have created a custom theme in Eclipse Luna , using 3.0 Development branch.
I followed the steps as in "
http://wiki.idempiere.org/en/Add_your_theme"
Added the following to end of VM arguments " -DZK_THEME=srctTheme"
On the browser , Once I click on the login Icon , it does not take me to login page but lands in an error (
http://localhost:8080/webui/)
HTTP ERROR 500
--------------
Problem accessing /webui/. Reason:
Server Error
Caused by:
org.zkoss.zk.ui.UiException: Page not found: /theme/srctTheme/preference.zul
at org.zkoss.zk.ui.http.ExecutionImpl.getPageDefinition(ExecutionImpl.java:379)
at org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:251)
at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:243)
at org.zkoss.zul.Include.afterCompose(Include.java:448)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:878)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:217)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
at org.adempiere.webui.session.WebUIServlet.doGet(WebUIServlet.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.adempiere.webui.session.WebUIServlet.service(WebUIServlet.java:108)
I double confirmed that my custom theme MANIFEST.MF has "Fragment-Host: org.adempiere.ui.zk;bundle-version="3.0.0"
I checked the steps several times and repeated the steps couple of times , just to be sure.
I did not fully understand why theme folder should be added to bundle classpath in fragment plugin , but I tried both adding it and not adding it.
I also tried including the theme folder of fragment project in binary build option selection.
I checked the osgi console by giving ss and my fragment is showing as "RESOLVED"and correctly attached to the master( "org.adempiere.ui.zk_3.0.0.qualifier" )
As per my understanding when fragment MANIFEST.MF refers the parent , all the contents should fall into parents classpath and should be loadable with something similar to "getResourceAsStream".
Iam thinking that ZK include tag should be doing something similar to getResourceAsStream .
Also confirmed my understanding by putting some coding inside ThemeManager.getTheme to check if the custom fragment is accessible , it seems to be accessible.
I tested with something like below:
String path2 = "/theme/srctTheme/preference.zul";
InputStream is2 = ThemeManager.class.getResourceAsStream(path2);
in = new BufferedReader( new InputStreamReader(is2));
String lineText = in.readLine();
int i = 0;
while(lineText!=null && i<11){
System.out.println("Theme Manager :"+lineText);
lineText = in.readLine();
i++;
}
Not sure what Iam missing here.May be Iam missing some basic/fundamental point here or doing something silly.
I have not started digging into Buckminster or ZK yet , but strongly felt this may not be related to Buck or ZK , so posting it.
Any guidance or hints will be very useful.
NOTE:
I have created a theme folder directly inside the fragment plugin and created a folder called srctTheme and copied the contents of theme/default into it.
This folder name "srctTheme" is the same as the plugin-id in the manifest file and VM argument used for launching the server product.
Thanks
Jagan