Reply To: What is the correct way to use pattern values?

Splash Forums PrettyFaces Users What is the correct way to use pattern values? Reply To: What is the correct way to use pattern values?

#27216

Peter-TI
Participant

Indirectly, yes.
The WAR module checks if an EJB module is available.
I made the modules swappable depending on project needs.

The EJB (shoestore) module returns its own url representation as a String for example:


/shoestore

The EJB shoestore module also returns a selected entity as string:


/nike/white/

(which is a shoe type and color…)

Now because the WAR recognized the´re is an EJB shoe store module.
The WAR bean moduelBean.geturl() asks the EJB shoestore the url representation;

this means I wouldn´t have to change the pretty-config.xml file undispite changing EJB Modules.
(I just wanted to try something new.)

Because:


 <pattern value="/#{moduleBean.geturl}" />

This pattern value would in this case represent:
/shoestore/nike/white/

The problem is that in this way this pattern value collects all url extensions and not just stops after: shoestore.
So what I want to achieve is that my module bean would only return the string of my available modules. After that I just want all other pattern values in pretty-faces.xml to be executed.

I guess diving into rewrite would be the best idea.
Any advise?

Thanks a lot!