• 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

display name and surname

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I set up your application.I run .it is all right.
I set up login name with social security number.it is ok no problem.but I want to display another filelds ,some additional attribute for example name,surname..etc.
After adding some fields to database.

is it possible.
[originally posted on jforum.net by erdem_ustun]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is possible. You may have to also edit the corresponding SQL queries, and the htm template files of your template in use.

[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which template ,sql query.can you explain,please?
[originally posted on jforum.net by erdem_ustun]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure you need to modify any SQL queries? The only change I really see being necessary (somewhat tedious) would be to go through all the Freemarker templates and replace any instance of the user's id with their firstname and last name (and make those fields either mandatory or do a check for them and defaulting to something else in the case that they are blank).

For instance, on post_show (to show the posts in a thread):


will retrieve a user by id. Once retrieved, the template does stuff like:


So no SQL changes should be necessary, thanks to the clean, decoupled view.
[originally posted on jforum.net by msernatinger]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I actually just ended up doing something like this for a client recently. It wasn't quite as easy as I outlined above due to some pages not having the user objects in the Template's hash. I had to extend the ForumAction command and go through each Forum's LastPostInfo, get the ID, and use the DAO to get the full user object and add it to the hash. It's fairly straightforward, though.
[originally posted on jforum.net by msernatinger]
 
    Bookmark Topic Watch Topic
  • New Topic