Re: Pretty:link current page mappingId

Splash Forums PrettyFaces Users Pretty:link current page mappingId Re: Pretty:link current page mappingId

#22606

You can get the ID of the current mapping with this code:

PrettyContext.getCurrentInstance().getCurrentMapping().getId()

So you could do something like this:

public class MappingBean {
public String getCurrentMappingId() {
return PrettyContext.getCurrentInstance().getCurrentMapping().getId();
}
}

And then use the value like this:

<pretty:link mappingId="#{mappingBean.currentMappingId}">
...
</pretty:link>

I hope this helps! :)