Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

A Day with Roller

I put a whole sh*tload of hours into Roller today - around 14 to be precise! My main goals where to get password encryption enabled and Remember Me re-implemented as a more secure feature. I managed to accomplish both and did so much typing in the process that my fingers hurt.

Other things I managed to accomplish:

  • Added ability to put a period (.) in a page name. Also modified BasePageServlet to set contentType appropriately for those "pages" ending in .xml, .js and .css. This should allow pages to be created for CSS and JavaScript, and then included in your pages with <link> and <script>.
  • Moved Calendar in Weblog editor to top right (was at bottom left) - making it easier to view and navigate to different days.
  • Fixed comments and spam stuff that Lance added.
  • Fixed pop-up Calendar on Weblog Edit screen to be properly positioned in IE and Mozilla.
  • Added up and down arrow buttons to allow expanding and contracting (taller and shorter) of weblog textarea. Persisted user's preference with a cookie.
  • Various UI enhancements to make the Editor UI look good in both IE and Mozilla (on Windows XP).

Phew - I'm ready for a beer! You can checkout our demo instance if you'd like to try out the latest code.

Posted in Roller at Mar 20 2004, 10:14:00 PM MST 24 Comments
Comments:

The interface was quite strange as when I selected I am in Denmark (not language-related, I would not mind an English userinterface) it gave me Dutch text.

Posted by Niklas Saers on March 21, 2004 at 09:38 AM MST #

Matt, I am still unable to login after creating a new user.

Posted by Lance on March 21, 2004 at 01:59 PM MST #

Niklas - I agree that the i18n needs some work. I get Dutch in Safari and I never indicated any such language preference. It's like it's not reading the proper locale from my browser.

Lance - I just tried creating a new user, and you're right - I was unable to login. I shut down the server, cleared the work and logs directory and started everything back up - and I was able to login. All database tables seem to have been correctly populated and I didn't have any issues with this yesterday. This leads me to believe it's just a "Raible's server setup" issue and nothing more (hopefully).

Posted by Matt Raible on March 21, 2004 at 02:20 PM MST #

For a while I had my blog using a <link> tag to include my CSS. To sidestep the whole content type problem, I just included a type="text/css" attribute in the tag. The problem I ran into though was that when I hit my "Weblog" page, it then loads the "CSS" page. Seems that Roller remebers the last page loaded in my session, because when I login, it dumped me onto my "CSS" page instead of my "Weblog" page. Right now I'm storing my CSS as a resource, which works but doesn't let me take advantage of Velocity. I was hoping to store colors/fonts/borders in the velocity context, and then insert them into various places in the CSS. (Am I the only one that thinks this is a huge missing piece of the CSS spec? ie: being able to set "background1" to "#ffffff" and "background2" to "#909090". Then if you want to change the colors, you only have to do it in one place in the CSS file.)

Posted by James A. Hillyerd on March 23, 2004 at 12:23 AM MST #

Matt, I am trying to create a Tamil (spoken in southern India) language using jroller. I was able to add weblog categories in my language, but I don't know how to change the "ALL" in the categories when using the showWeblogCategoryChooser() macro. Is there a way I could edit these macros to tweak to my needs? TIA

Posted by dyno on March 23, 2004 at 05:53 AM MST #

Sorry hit 'enter' before completing! Entered my email and URL info!

Posted by dyno on March 23, 2004 at 05:54 AM MST #

It's in web/WEB-INF/classes/website.vm There are likely several (many) places in the velocimacros that need the i18n touch, and in the taglibs as well.

Posted by Lance on March 23, 2004 at 12:19 PM MST #

Okay, now I have a little more time to read dyno's issue more closely. To 'fix' this in JRoller you need to override the appropriate velocity macro in your Weblog page (put it at the top):
#macro( showWeblogSubcategoryChooser $parentCategory )
    #set( $rawUrl = "$ctxPath/page/$userName" )
    
    <div class="rWeblogCategoryChooser">
    #set( $weblogUrl = $rawUrl )
    #set( $chosenCat = "" )
    #if( $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
    	#set( $chosenCat = $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
        <a href="$weblogUrl" class="rUnchosenCategory">All</a>
    #else
        <span class="rChosenCategory">All</span>
    #end

    #if ( $req.getParameter($PAGEID_KEY)  )
        #set( $pageParam = "&$PAGEID_KEY=$req.getParameter($PAGEID_KEY)" )
    #end
    #set( $cats = $pageModel.getWeblogCategories($parentCategory) )
    #foreach( $cat in $cats )
    	## $pageHelper.strutsUrlHelper() wasn't working, so do it manually
		#set( $catParam = "?$WEBLOGCATEGORYNAME_KEY=$cat.path" )
        #set( $weblogUrl = "$rawUrl$catParam$!pageParam" )
        |
        #if( $chosenCat == $cat.path )
            <span class="rChosenCategory">$cat.Name</span>
        #else
            <a href="$weblogUrl" class="rUnchosenCategory">$cat.Name</a>
        #end
    #end
    </div>
#end
Find the word "All" and replace it as appropriate. There are probably several places that would need changing as well for various other labels. Question to the audience: Have you ever done I18N in Velocity?

Posted by Lance on March 23, 2004 at 02:08 PM MST #

I've done i18n in Velocity - just stuff Struts MessageResources object (or a ResourceBundle) into the context and call methods: messages.getMessage(key) or bundle.getString(key).

Posted by Matt Raible on March 23, 2004 at 02:15 PM MST #

Thanks Lance. I tried putting that on top of the weblog page (on top of !doctype tag) but still the word 'All' is not replaced. I just tried to replace "All" with "Everything" but still disn't change. Any tips? Matt, can you please explain me use the MessageResouces or point me in the right direction. I am very new to Velocity. TIA

Posted by dyno on March 23, 2004 at 04:01 PM MST #

[Trackback] Recently a user asked for help making his JRoller blog display some template text in Tamil (a language in southern India). My suggestion should work (though he says it isn't working) - but is really just a hack. Matt's suggestion would be a definat...

Posted by Vanity Foul on March 23, 2004 at 05:02 PM MST #

James A. Hillyerd: you are absolutely right, and I tried to do something of the sort myself some time ago. I ended up with the same solution as you, with no *right* answer. By the way, the "Roller remembers the last page you were on" will no longer be applied to user-created pages so that part won't be an issue (once JRoller upgrades to Rolller 0.9.9 - once it's released).

Posted by Lance on March 23, 2004 at 05:08 PM MST #

Lance... Call me stupid. I got that fixed, I had a typo in the macro name.
But the problem I face now is that when I click on each of the categories it goes to the page http://jroller.com/page/dyno?catname=>Someparameter>. Since I am using a different language, my url appears like this... http://jroller.com/page/dyno?catname=1%20???????
So no matter whichever category I click I get the contents that are to be displayed at http://jroller.com/page/dyno. So I think, we should be going against the category id rather than category name. What is the parameter name to specify category id?
TIA

Posted by dyno on March 23, 2004 at 07:35 PM MST #

I don't think it'll work against the category id (I don't think that part of the api is exposed). Do the category names display okay in your page? You are likely running about against Roller's (currently) limited support for international character sets. We're working on fixing it in the next release, but the database has to be configured to cooperate as well (which means an upgrade for JRoller to mysql 4.1). Try Matt's demo but the evidence is that it doesn't work there either (running mysql 3.23).

Posted by Lance on March 23, 2004 at 07:54 PM MST #

Thanks Lance. I have the the screenshot (of the current blog) of what I see at http://jroller.com/resources/dyno/dynoblogScnShot.png. Is there a way around this issue?
I'll test at Matts demo and let you know.
Thanks

Posted by dyno on March 23, 2004 at 08:45 PM MST #

The demo instance doesn't allow me to login? Is the authentication working fine?

Posted by dyno on March 23, 2004 at 09:51 PM MST #

Silly question: did you create a user account? This was working yesterday ;-)

Posted by Lance on March 24, 2004 at 12:46 AM MST #

Dave is the category guru, we should bring this up with him: make the category chooser work with the Category ID in addition to Category Name.

Posted by Lance on March 24, 2004 at 12:47 AM MST #

:) . Yes I did create a new account. http://demo.raibledesigns.com/roller/page/dyno . But it comes back as "Wrong username and password combination". And I am using the right password.
And just checked Dave roller blog... he says that internationalization is supported in Roller 0.9.9 (http://www.rollerweblogger.org/page/roller/20040307#thanks_jaap). Which version is Jroller.com currently using?
TIA
dyno

Posted by dyno on March 24, 2004 at 01:20 AM MST #

JRoller is on 0.9.8.x, but demo.raibledesigns.com is 0.9.9-dev. ?: is your username on "demo" mixed case? I was just able to login: lance/test.

Posted by Lance on March 24, 2004 at 08:29 PM MST #

Oh, and Dave's mention of i18n is for the labels in the user interface. I18N for the weblog pages is something we're working on in 0.9.9, but hasn't been sufficiently tested I'm afraid.

Posted by Lance on March 24, 2004 at 08:31 PM MST #

I am able to log in now. Don't knwo what happened yesterday??!!
But today' experience is bad... even the unicode Tamil text post which worked in the current release seems to be screwed in the demo. I hope jroller doesn't go into the new release without fixing this :( .

dyno

Posted by dyno on March 24, 2004 at 09:58 PM MST #

Try this site: cheap airline tickets
discount airline tickets
cheap airfare
cheap air fare

Posted by pete on July 22, 2004 at 10:09 PM MDT #

????????????????????????? How to count the numbers of the doc of a kind of Categories

Posted by 221.222.167.114 on February 28, 2006 at 01:45 PM MST #

Post a Comment:
  • HTML Syntax: Allowed