Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Add a new page

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FWIW, the error about a class cast exception is coming from a know bug in the error handling code. See:

https://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]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic