File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Add a new page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Add a new page" Watch "Add a new page" New topic
Author

Add a new page

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,
I would add a new page in JForum but I don't understand the mechanism that lies behind the link, for exmple how is "${contextPath}/${moduleName}/permissions/${node.id}${extension}" formed?
I have to add a page, what are the files I have to modify?
Thanks, bye bye.
[originally posted on jforum.net by abdujaparov]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,
I don't understand how JForum link a page. In my case I have to add a page in the group management of JForum.
I have added this line into the templatesMapping.properties:



Then I inseted into TemplateKeys.java this line:


Then I have inserted into the GroupAction.java this method:


And then I created the page group_import_user.htm:


So I would that when I clink on the link defined in group_list.htm in this way:


JForum opens the group_import_user.htm an shows me Hello.

But I receive this error:


The link generated by JForum is: Importa utenti /jforum/adminGroups/importUser/X.page
where X is the number of the line of the group.

Please could someone help me?
Thanks, bye bye.
[originally posted on jforum.net by abdujaparov]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
FWIW, the error about a class cast exception is coming from a know bug in the error handling code. See:

http://www.coderanch.com/t/578221 #19661

That said, I think that you need to add the group_id parameter definition to the urlPattern.properties file. E.g.,

adminGroups.insertUser.1 = group_id

This file maps the parameter locations to the tags used to get the parameter.. e.g. getIntParameter("group_id").

In the dimm past, jforumURLs used to be a single servlet URL with query strings instead of a .page mapping. E.g.,
/jforum?module=groups&action=insertUser&group_id=1. There is still some legacy code that uses this format. So the urlPattern file maps positional parameters into "named" query parameters so both forms work.
[originally posted on jforum.net by monroe]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add a new page