[SOLVED]org.primefaces:maven-jsf-plugin - hardcoded value

UI Components for JSF
Post Reply
vinche
Posts: 13
Joined: 20 Apr 2011, 11:02

10 Jul 2011, 14:19

Dear PrimeFaces folks,

First of all congratulation for your hard work :)

I want to use your maven plugin and all the feature comming with, on my project. I face a problem with some hardcoded value in your plugin.

I start to fix the problems but as I want to share my solutions with you I need your advice:
======================
Issue1 : I'm not able to give the OPTIMIZED_PACKAGE value:

Code: Select all

if(isJSF2()) {
			writer.write("\tprivate static final String OPTIMIZED_PACKAGE = \"org.primefaces.component.\";\n");
		}
getComponentFamilyy
I'dont really understand the need of this value. The only use is in the method 'handleAttribute' present in each component.

Code: Select all

String cname = this.getClass().getName();
			if(cname != null && cname.startsWith(OPTIMIZED_PACKAGE)) {
				setAttributes = new ArrayList<String>(6);
				this.getAttributes().put("javax.faces.component.UIComponentBase.attributesThatAreSet", setAttributes);
			}
Why use a dedicated value , in which cases this value will be different from COMPONENT_FAMILY (except the dot) ? In your component library there is now way to have a component with a package name different from "org.primefaces.component". I'm wrong if i think this test is useless ?

If yes why not allow to give the OPTIMIZED_PACKAGE in the same file we give the COMPONENT_FAMILY ? or build the value like this

Code: Select all

if(isJSF2()) {
			writer.write("\tprivate static final String OPTIMIZED_PACKAGE = \"" + component.getComponentFamily() + ".\";\n");
		}
======================
I face two other issue with the Widget Interface and AjaxComponent. I can't use my own.. Value are hard-coded in org.primefaces.jsfplugin.digester.Component.
I will share with you my investigation in a second post later.
Last edited by vinche on 11 Jul 2011, 13:04, edited 1 time in total.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Jul 2011, 12:02

The plugin is for internal use only, we don't have any plans to make it available for external usage, you are free to copy code and create your own plugin though.

vinche
Posts: 13
Joined: 20 Apr 2011, 11:02

11 Jul 2011, 13:02

Thank you , that what I was thinking.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

12 Jul 2011, 11:00

I see this is marked 'solved', so I personally dislike postings in it. Never the less, is there a way we can convince Prime Technology to make this change? There are people that like to enhance the Primefaces components in a kind of incubation way, so the enhancements can prove themselves before being added to the core components. Having this hardcoded value removed would help a lot in this regard of keeping things more easily in sync. Forking, as mentioned, is an option, but there are more downsides to that than advantages.

Any thoughts?

Ronald

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Jul 2011, 11:22

Creating an issue and asking for user votes can be an option.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

12 Jul 2011, 12:13

Done: http://code.google.com/p/primefaces/iss ... il?id=2225

Although the 'and asking for user votes can be an option' sounds kind of as a mission impossible. How many *users* will want this... 4, 5, 6? That would mean it is somewhere between position 80-150 on the ranking based on stars. Gathering votes to get something implemented sounds and is fine for 'normal' issues. But this is imo a different case. Like posted in another topic about shift-click, I wonder if Primefaces wants other 'users' to contribute. If so, I cannot see why gathering votes on this issue is 'required', and if contributions are not wanted, why not? These 4-6 people can help improve PF and make it better than it already is.

The matter is that I personally cannot pay for enterprise support and we do not use primefaces in our company (yet I hope). But for them making pf an option an option, certain functionality is required to be in place. I can only help out then by contributing my spare time, personally gained knowledge and lots of coffee to get things implemented.

So PLEASE consider this without the need to gather 40 votes ( 40 gmail accounts are created in no time, but I do not want to cheat ;-))

Because I'd like to help and have already implemented:

2218 10 ---- NewFeature New Medium ---- ovarak...@googlemail.com ---- Support Ctrl-, Shift- row selection in datatable (10 votes in 2 days!)

Besides that I changed the datatable with scrolling so witdths in % can be provided in combination with a % with of the datatable itself.
In addition I think it would be possible and like to contribute to have almost all functionality of the datatable in a 'new' treetable where they share the majority of the code... So you get a treetable with pagination, filterering, sorting etc...

And want to implement issues that are not even accepted, but have lots of votes:

366 36 ---- NewFeature New Medium ---- mlri...@gmail.com ---- Add fixedColumn attribute to scrollable dataTable
1347 27 ---- NewFeature New Medium ---- Ryan.Slo...@gmail.com ---- Add support for horizontal scrolling to dataTable

Ronald

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests