I'm using the CombinedResourceHandler of Omnifaces for many years now. For the first time I need to exclude some pages from combining resources.
Is this even possible? I found only a way to exclude resources from combining or get suppressed and removed. But this is not enough for my purpose. Thanks
Related
I am trying to crawl different websites (e-commerce websites) and extract specific information from the pages of each website (i.e. product price, quantity, date of publication, etc.).
My question is: how to configure the parsing since each website has a different HTML layout which means I need different Xpaths for the same item depending on the website? Can we add multiple parser bolts in the topology for each website? If yes, how can we assign different parsefilters.json files to each parser bolt?
You need #586. At the moment there is no way to do it but to put all your XPATH expressions regardless of the site you want to use them on in the parsefilters.json.
You can't assign different parsefilters.json to the various instances of a bolt.
UPDATE however you could have multiple XpathFilters sections within the parseFilters.json. Each could cover a specific source, however, there is currently no way of constraining which source a parse filter gets applied to. You could extend XPathFilter so that it takes some extra config e.g. regular expression a URL must match in order to be applied. That would work quite nicely I think.
I've recently added JsoupFilters which will be in the next release. These should be useful for your use case but that still doesn't solve the issue that you need an implementation of the filter that organizes the resources per host. It shouldn't be too hard to implement taking the URL filter one as a example and would also make a very nice contribution to the project.
Is there posibility to override files form.xhtml and model.xml (and template.xml) without compiling Orbeon sources ? I want to add field to form metedata, and I don't know, is it sufficient to add properly files to resource/orbeon/builder/form in my exploded .war file.
regards
Yes.
(That must have been the shortest answer I got a chance to post here!)
To expand on this a little bit, if you want to override Form Builder's form.xhtml, you can place your version in WEB-INF/resources/forms/orbeon/builder/form/form.xhtml. And of course, if there is any way to avoid this, you might want to consider it, as custom changes make it harder to upgrade, and can become quite a nuisance.
When breaking down a large spring file into smaller config files, we sometimes incorrectly import the same file twice. While it is not a problem most of the times, it becomes a problem when you have namespace handler and autoproxies involved. In many cases there are InstanceAlreadyExistsException's and double proxying. Is there a way that I can force that a file with a name is loaded once and only once. If there is no existing way, could someone point me to a starting place from where I can propose a patch that can do this?
Thanks in advance!
A colleague of mine pointed out that there was something that was proposed in SPR-1142 that does exactly this.
Instead of putting all the i18n resources into a single message file, I want to divide them into several files. Anybody can kindly tell me how can I do that? because the documentation of Play doesn't give me any idea.
Use the Messages Module, really nice for this purpose.
You can't on Play. Anyway, why would you need to do that? Makes harder to find where the keys for I18N are. If it's for "visual" purposes, just use comments (##) to create sections in the file.
I need two paginations on one page, is it possible to do this with codeigniter?!? Of course they must operate independently of one another.
Yes and no. If you want two different pagination visuals (customized renderings of the library) then sure. The problem you'll run into is by default the pagination library will pull the current page out of your $ci->uri->segments() list automatically to determine which page to mark as "active".
I do not know of a way to explicitly override this. Perhaps if you made a MY_Pagination that took an additional $config value for current page you could get it to behave like that. I haven't looked at the library's code in a while so you'd have to do some digging.
Honestly though, I'd suggest you build your own, it's not incredibly hard to do some simple math to determine what numbers to link.
Also you'll run into issues with CI's Pagination Library if you want the "current page" part to be NOT the last segment in your url. This may have been fixed lately but last time I looked it was the stop-gap for me using the library all together.
Bottom Line Invest the time in making your own if you want more than it's basic functionality, it's simple enough, just make yours reusable if you can.