Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Blogs

  • Bram de Kruijff
  • Ivo Ladage
  • Mark van Cuijk
  • Martin van Mierloo
  • Martijn van Berkum
  • Michel Teunissen
  • Patrick Atoon

Recent blogs

RSS - Blogs
March 9, 2010
State of OSGi in the Java world
March 4, 2010
Reach more people with Google Translate
March 3, 2010
Get My Advice
February 26, 2010
What? Where!?!
February 11, 2010
Split it!

All Blogs...


Lacking chemistry

April 14, 2008

Ever tried sticking some page design to GX WebManager? Seems easy enough, doesn't it?

I have taught quite a few students how to do it and they all manage very well. However, they all invariably hit the invisible wall called "page sections".

At first glance, these things are the most handy inventions ever. I mean, the power of a page anywhere on a page! In fact, even at second, third and the rest of the glances they keep up this appearance. Let's face it, you just have to put some of these to good use.

And that's where things go tits up. While creating page sections and assigning them to pages is a piece of cake, getting the @#%^@&^!@ things to actually appear on your homebrew JSP design is hell!

Programmers and page sections are clearly lacking chemistry.


Unless you know The Secret!


And what do you know... I just happen to know this Secret. And since I don't feel like writing a book about it I will just dedicate this blog entry to it.


First things first: create page sections and labels

To get a firm grasp on things we need a good base population. The WM Community Edition ships with a nice set of page sections, as can be seen in the screenshot. There are blocks meant for use in the header, the left and the right side of the page and they are grouped together in the page section hierarchy. Oh, yeah! Be sure to check that the page sections are published! You won't be the first one to fall for that trap.



Three labels have been created: "header", "left" and "right". The labels have been assigned to the respective page sections.

Second: create page parts in WM for use in JSP

For this, you need to go to "Format > Presentation > Page parts". If the option is not available in the menu, try going to "Configure > Web Initiative configuration... > Functionalities" and make sure the "Design" checkbox is selected.


From the select pulldown menu, pick the option "< Create new page part >". Give the new page part the description "myHeaderPageSections" and the same identifier. Assign the presentation "WM Page sections". Under "Additional block settings" select the label "header".


Repeat the process to create page parts "myLeftPageSections" and "myRightPageSections", make sure you assign the correct presentation and select the corresponding label.


Third: make JSP refer to the new page parts

Scan your myPerfectPage.jsp to look for the correct spots to insert page section HTML. For example, put the following line where you want the header blocks to appear:

 

<wm:pagePart label="myHeaderPageSections" />


Do the same for the left and right bits.

Oh, and make sure the myPerfectPage.jsp is used on your testpage ("File > Properties > Design...")!


Fourth: assign page sections to pages

Our journey has almost come to an end. Everything has been prepared:

  • There are published page sections with labels assigned
  • There are page parts that make use of one of the labels
  • The JSP design refers to the page parts.


Now all that remains is to assign page sections to the page! Go to "File > Properties > Assign page sections to page..." and assign a page section.




Preview the page, and presto...

Congratulations! You have mastered The Secret!


Looks like you're back with another one of those block rockin' beats!


Later,



Patrick


About the Author

Return to all blogs

 

Patrick Atoon

Patrick Atoon has gained nuff respect as one of the most experienced web architects in the GX Webmanager community or even the global hip hop community for that matter.

Read all Patricks blog entries

Other blog entries:

February 26, 2010
What? Where!?!
September 3, 2009
Do the Right Thing
June 18, 2009
wm:link secrets
March 2, 2009
Server side represent! (Part 2)
February 4, 2009
Server side represent!
January 15, 2009
Making cache
December 9, 2008
Like A Version
August 19, 2008
Stop making sense
August 4, 2008
Namaste!
July 7, 2008
Japanese encore (日本のアンコール)


Share:

del.icio.us
digg
Technorati
Slashdot
Reddit
YahooMyWeb
NewsVine
ekudos
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.