jsf 2.1 cant import <h:inputfile - file-upload

I am trying to add to my site the tag
I have completed my site under java EE 7 jsf 2.2 and primefaces 4.0 and was working under glassfish 4 but my production envireoment will have jboss and i noticed that there is not available the java EE 7 on this application Server, so i downgrade my site to java EE and this lead me use jsf 2.1
The problem i am facing now is that i have problems with the rendering items. specially with forms that have input file tags as i get the error
<h:inputFile> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: inputFile
If i remove this the rest page works, is rendered at browser but still does not work as it should be.
in pages that i have to render differente panelgroups (with primefaces tags inside) they are rendered but the broswer hit alerts
malformedXML: During update: javax.faces.ViewState not found
i cant understand why this is happening.
I need to fix this problem an make available to my pages the inputfile tag.
If i use primefaces inputfile still the page does not work as the render stop works at all

<h:inputfile> is JSF 2.2 specific tag and is not available in JSF 2.1. But you can use upload component provided by component libraries. As you are already using primefaces, use their component.

Although this question has an accepted answer, it is not always possible to use upload components from a specific component suite. Especially not if you already use another one. Many of them use e.g. jquery under the hood and unfortunately not in a no-conflict mode. A still valid alternative then is to use the solution from BalusC: http://balusc.omnifaces.org/2009/12/uploading-files-with-jsf-20-and-servlet.html

FileUpload from Primefaces has errors and it seems that there are no plans to fix it, you can only upload the first file in each upload.

Related

Migrate from dojo to standard bootstrap admin dashboard theme

I am using a php dojo v1.4 project with mysql as backend.
The UI looks very basic.
I need to migrate this project to a standard bootstrap admin theme.
What are the steps I need to do?
If backend and general architecture of your application will remain the same, I'd suggest you to start building new UI from the scratch. When it finished, write missing functions, which were previously implemented with dojo using jquery (which comes with bootstrap) or whatever you like.
I assume, that you are not going to use dojo anymore.
If you are facing some specific difficulties, you'd better provide more details in your question.

Has anyone had any success using Dojo in Liferay 7 (Liferay DXP)

We are currently trying to include Dojo in our liferay 7 application and are running into major difficulties, as it seems the AMD loader is clashing with the AMD loader of Liferay, and its preventing Dojo's define and require from working properly.
If anyone as a solution to getting dojo into Liferay 7 I would appreciate any advice or tips you have for getting this to work.
When using dojo application together with Liferay I could suggest you:
Keep dojo loader requiring only AMD modules from dojo and not Liferay, so use dojo only for dojo and Liferay only for Liferay.
Same when building the application, you need to have two separate build processes, dojo uses it own tools called dojo/util and you won't be able to easily build a dojo app using another builder.

Site redesign in sitefinity 3.7

I need to redesign web site that has been done in Sitefinity 3.7. Current version is 6.3 ( I believe ).
I watched some tutorials about this CMS because I use it for the first time.
Can you tell me how much templating system differs in this old 3.7 version from current 6.3?
Is it possible to use Bootstrap 3?
We've been using Bootstrap in all of our recent Sitefinity implementations. I usually end up creating a vanilla, base page template off a .master page that includes references to the Bootstrap css and js, then create custom layout controls through Sitefinity's Visual Studio plugin, Thunder. Using the layouts you can easily create the markup needed for the grid layouts and components in Bootstrap so content editors can drag and drop them through the Sitefinity page edit interface. Editing the widget templates is another way to incorporate Bootstrap styling in the built in content modules.
Here is a project that has a Sitefinity Bootstrap theme, I believe the version of Bootstrap it uses is 2.31 though.
Update!
Jochem added Bootstrap version 3+ to the project, my fault for not seeing it, sorry Jochem! Direct link here

FileLimit is not working in primefaces file upload when multiple="true"

I trying to set fileLimit="4" in my application in <p:fileUpload> to validate when user uploads multiple files but not more than four. But this is not working.
When I checked primefaces showcase for this multiple=true scenario, there also not working. And the most weird thing is when I try to autocomplete in eclipse for the attributes inside <p:fileUpload> I don't see any fileLimit, fileLimitMessage etc. I am using Primefaces 3.5v.Is this a bug in Primefaces file upload?
For some reason, PrimeFaces main showcase site is showcasing current alpha/beta/RC version instead of latest stable version. You can verify this by looking at the version information in the footer of the showcase site. This is indeed confusing. Previously, all PrimeFaces alpha/beta/RC versions were showcased on a different showcase site (called PrimeFaces labs).
In your particular case, the fileLimit attribute of <p:fileUpload> is indeed added in PrimeFaces 4.0 and absent in 3.5. In order to utilize this attribute, you'd need to upgrade to PrimeFaces 4.0. It's currently only available as a snapshot (note: you're supposed to report all issues directly to them then). The final release is scheduled in a few weeks.

Can I use the dojo framework in Bottle templates, and if so, how?

I've used the dojo framework in websites with good results, and I'm trying to use it in my bottle templates with no luck. I'm loading the claro theme and the dojo javascript from the hosted version on google. None of my dijits are showing up, though. Am I unable to use external libraries with Bottle, or am I missing something basic?
Yes you can use external libraries with Bottle. Check your HTML if you have problems. If you're missing a closing tag, for example, things don't work as expected.