Re: Theme problem after update to 2.3.16 -- loading parent theme templates?

2013-12-12 Thread Chris
Hi, 
struts-2.3.16-all.zip 65,6 Mo  (only )
struts-2.3.15.3-all.zip   83,2 Mo
Chris

One more thing: everything editable will be moved to struts-site (i.e.
the new plugin.md) to don't mess with things generated by Maven
So the project source code will contain only source code and JavaDocs,
the rest will be outside it.
Lukasz Lenart 
 



Le Mercredi 11 décembre 2013 22h29, Lukasz Lenart lukaszlen...@apache.org a 
écrit :
 
With 2.3.16 a proper theme inheritance mechanism was introduced - you
don't have copy the whole theme to extend it, just override file you
need, the rest will be loaded from parent theme and parent and so on.

The docs were updated to include information about 'expandTheme'
variable which should be used when you want to use that mechanism
inside your custom template.

http://struts.apache.org/release/2.3.x/docs/extending-themes.html
https://issues.apache.org/jira/browse/WW-4145


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/12/11 rgm str...@rgm.nu:
 I'm getting this error from my JBoss 7 application server:

 ERROR [freemarker.runtime] (http--0.0.0.0-8443-3) Template processing
 error: Error reading included file
 /mx/themes/~~~rgm/dynamic-attributes.ftl: freemarker.temp
 late.TemplateException: Error reading included file
 /mx/themes/~~~rgm/dynamic-attributes.ftl
         at freemarker.core.Include.accept(Include.java:167)
 [freemarker.jar:2.3.19]
         at freemarker.core.Environment.visit(Environment.java:221)
 [freemarker.jar:2.3.19]
 ---snip---

 I have a theme called rgm in a directory called mx/themes:

 $ ls -1d mx/themes/*
 mx/themes/archive
 mx/themes/css_xhtml
 mx/themes/html5
 mx/themes/rgm
 mx/themes/simple
 mx/themes/xhtml

 I've updated my copies of xhtml, css_xhtml, and simple themes from here:
 ./struts-2.3.16/src/core/src/main/resources/template/*

 My rgm theme has a theme.properties file with parent = css_xhtml, which
 itself uses parent = xhtml, which itself uses parent = simple.

 The rgm theme does not include dynamic-attributes.ftl, but the parent
 chain back to simple does.  I was under the impression that because I had
 a theme.properties declaring a parent that I didn't need to include every
 file in my theme?  I've read Extending Themes document carefully.  I had
 no trouble when using Struts 2.3.15.3.

 My struts.xml has these constants:
     constant name=struts.ui.templateDir value=mx/themes/constant
     constant name=struts.ui.theme value=rgm/constant

 Has anyone else successfully extended a theme using Struts 2.3.16 on JBoss
 7?  What am I missing?

 Sincerely,
 rgm

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

In which action, do i write boolean tests ( SGBD or LDAP )

2013-12-12 Thread Chris
Hello, 

How to organize the actions, when you just want check the password and the 
user, on a LDAP or SGBD system . For a  boolean response only. ( authorised / 
or not )
You do write all the command in the only same action , don't you ? 

struts-jquery-tree-tags issues

2013-12-12 Thread Giuliano Catrambone

Hi,
I'm trying to manage a tree using struts-jquery-tree.

In my jsp I have:

s:url var=menuTreeDataUrl action=menuTreeData/
sjt:tree
id=jsonTree
href=%{menuTreeDataUrl}
onClickTopics=treeClicked
onClick=managenode()
/

I implemented using java the menuTreeDataUrl action and the tree is 
filled

correctly.

My problem is that I do not know in the javascript managenode function
how to get information regarding the current selected node, i.e. 
like his id,

his text, ...

Could someone tell me how to retrieve those information?
Thanks
Giuliano


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Diagnosing problem loading theme.properties on JBoss 7 with Struts 2.3.16

2013-12-12 Thread rgm
I'm trying to figure out why theme.properties isn't loaded from the
filesystem on my JBoss 7 system and believe that this is a useful change to
BaseTemplateEngine.java:

private InputStream createFileInputStream(File propFile) throws
FileNotFoundException {
InputStream is = null;
if (propFile.exists()) {
is = new FileInputStream(propFile);
+} else {
+  throw new FileNotFoundException(propFile.toString());
+}
return is;
}

This change allows the following message to be seen from the calling method:
  LOG.warn(Unable to find file in filesystem [ +
propFile.getAbsolutePath() + ]);

Without this change, no warning is printed (unless there's a problem
creating the FileInputStream).

Alternately, one could remove the check for propFile.exists() entirely
and allow the constructor for FileInputStream to throw the exception itself.

-rgm