Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
14. Jul 2008, 20:03 CET | Link

Hi!

Right now, AFAIK, the way to externalize the navigation configuration is to use xml. But some times I would like to add some programmatic tricks (like this one) without being forced to patch seam code

The solution could be to use .groovy files to configure navigation (instead of .xml), that way they can be changed easily after development, and they can be extended at any time with any new functionality we may need...

In other words, something like Gracelets but for navigation.

What do you guys think about this?

Regards,

 
Please don't forget to rate

I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.

5 Replies:
14. Jul 2008, 20:38 CET | Link

I like that the idea with some warning. Using a Groovy DSL type document can make it just as hard to read as XML (I think XML is very readable BTW). Done right though it can look amazing and be very intuitive (like Gracelets), but done in differently it can look like something like Gant .

 
Dan Hinojosa Seam :: Groovy :: Swing Developer/Consultant/Instructor Albuquerque, NM
14. Jul 2008, 23:00 CET | Link

Hi

I don't want to have Groovy based navigation to increase readability (all I would ask is that readability stays pretty much the same), what worries me is extensibility, I want to be able to customize navigation without having to patch internal seam code (I would be equally happy if a way to add custom tags to the .pages.xml could be added to Seam (custom namespaces perhaps?))

Mmmm, basically what I would like to have is a mechanism to make it possible to easily plug my own extensions to Seam navigation.

(Currenty we have JSF Navigation, Seam Navigation, and jPDL navigation... I wonder what do I have to write in components.xml to plug my own navigation (pageflow?) strategy)

Regards,

 
Please don't forget to rate

I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.

14. Jul 2008, 23:10 CET | Link

Surely extensibility of the navigation rules and the way of specifying them are orthogonal - whatever language they are in, the extension points in Seam and JSF remain fixed. I guess being able to specify them in Groovy would allow you to add script in, but I'm not sold atm.

You can write your own rules currently - it requires extending the Pages component - you should be able to do most customization you like - if you need a method made protected, then ask in JIRA. But, its not pretty trying to understand Pages, which we should fix (probably in the Seam 3 timescale).

 

Read about how to report a bug.

14. Jul 2008, 23:34 CET | Link

Hi!

Basically I would like to do this (please tell if sounds to crazy):

I need to add certain features to current pageflow strategy (as a first step I could, for example implement my solution for JBSEAM-1943) and I do not want to patch my Seam 2.02SP1.

Why? well, I want to be able to go back to the stable Seam 2.02SP1 pageflow strategy or enable my custom pageflow strategy by just changing an option in components.xml.

That way I could create my own annotations and my own tags (JBSEAM-1943 is just a first step in that direction), or modify the provided ones, and plug them in when I need them.

So... does it seem crazy?

 
Please don't forget to rate

I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.

14. Jul 2008, 23:41 CET | Link

I understand your problem, but I don't agree that writing rules in groovy would help.

As I explained, you can customize navigation without patching Seam.

 

Read about how to report a bug.