fiorenzino / customresolver

Automatically exported from code.google.com/p/customresolver
0 stars 0 forks source link

gestione breadcrumb #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
come gestitrlo??

forse direttamente con prettyfaces nel custom resolver.
es: db://una/sezione/del/sito/id_pagina

cosi la stessa pagina puo stare in + sezioni del sito

Original issue reported on code.google.com by fiorenzino@gmail.com on 16 Apr 2010 at 11:14

GoogleCodeExporter commented 9 years ago
usare 

o 3.2 Using the Managed Query Parameter facility

o 3.5 Parsing complex / dynamic-length URLs

public class UrlParsingBean
{
    public String parseComplexUrl() throws UnsupportedEncodingException
    {
        String uri = PrettyContext.getCurrentInstance().getOriginalUri();
        List<String> categoryChain = new ArrayList<String>();

        while(uri.length() > 0)
        {
            int index = uri.indexOf('/');
            String value = uri.substring(0, index);
            categoryChain.add(URLDecoder.decode(value, "UTF-8"));
            uri = uri.substring(index);
        }

        //now load the data...

        return "/blag/viewArticle.jsf";
    }
}

Original comment by fiorenzino@gmail.com on 17 Apr 2010 at 9:55