pretty:urlbuffer, proposal for improvement
Tagged: urlbufffer relative
March 13, 2012 at 10:19 am #18219
URLMappingwe’re using paths, which are relative to context root, whereas urlbuffer produces absolute url, relative to server root. In some cases this may be inconvenient and lead to extra coding/rewriting. Simple example is primefaces
<p:menuitem value="Menu Item 1" url="pretty_urbuffer_var"/>which produces doubled context path – one from urlbuffer, another from primefaces.
I’d suggest to add “relative” attribute to
urlbuffercomponent which’d define the relativeness of generated url.
oswMarch 13, 2012 at 11:35 am #22261
I like this idea. Could you open a ticket for this?
Or are you perhaps interested in implementing this feature yourself? This should be very easy. See:
We are always happy to receive any kind of help and contributions.March 13, 2012 at 1:41 pm #22262
Sure I can do it, how do I become a contributor? Besides, there are at least three other files that should be changed when I’m done:
ocpsoft-pretty-faces.tldand documentation.March 13, 2012 at 2:10 pm #22263
The source code of PrettyFaces is available on GitHub:
If you want to contribute, just clone the PrettyFaces repository on GitHub and then start to develop your patch. Just commit the changes into your own clone of the repository. After you are finished, open up a pull requests. If everything is fine with your patch, we will integrate it into the code immediately.
For a more detailed description look here:
But please check that you are on the correct branch. The PrettyFaces 3.3.x code base is in a branch called
masterbranch is currently empty as we are currently discussing the structure of PrettyFaces 4.0.
Feel free to contact us if you have any questions. I’m looking forward to your patch!March 13, 2012 at 4:49 pm #22264
Christian, I’m absolutely new to git/maven but still managed to get the code and commit changes, please have a look at https://github.com/0swald/prettyfaces/tree/urlbuffer_relative_url_output. I’m afraid my IDEA config files have been also sent to repository. Btw this is my first contribution commit in my life))March 13, 2012 at 4:50 pm #22265
Lincoln Baxter IIIKeymaster
In that case congratulations are in order!March 14, 2012 at 5:11 am #22266
Awesome! Thank you so much. I’ll have a look at you changes ASAP and come back to you then.
ChristianMarch 14, 2012 at 6:28 am #22267
I reviewed your patch. It looks fine. I just merged it into the 3.x branch and pushed it upstream:
Unfortunately I was not able to preserve your username as the commit author because I had to modify the commit to remove the IDEA files. Sorry about that.
BTW: It is really nice that you also updated the documentation. That’s something even Lincoln and I sometimes forget!
Our CI server should publish a new version of the 3.3.4-SNAPSHOTS in a few minutes. So this feature will be in the official snapshots really soon.
Thank you again for your contribution. Let us know if you have any other ideas or things that you would like to work on.
ChristianMarch 14, 2012 at 7:06 am #22268
@Christian, @lincoln, I was glad to contribute to your excellent project.
Btw I cant find full snapshot jar, do I get it right that snapshot versions are now split into several jars – core, common, etc?March 14, 2012 at 7:23 am #22269
No, actually you need only one JAR file depending on your JSF version. The other modules (core, etc.) are automatically included in the JAR file for your specific JSF version:
You must be logged in to reply to this topic.