fileUpload alignment issue in h:panelGrid

UI Components for JSF
Post Reply
tasosioan7
Posts: 27
Joined: 28 Nov 2014, 13:47

12 Dec 2014, 11:30

Hi to all.

I was wondering why fileUpload doesn't align correctly like other elements inside a h:panelgrid

The panelgrid code is:

Code: Select all

<h:panelGrid style="background-color:#C0C0C0" cellpadding="20"
							cellspacing="20" columns="2">

							<p:inputText id="inputText" style="width:100px;"
								value="#{quickProvisioningController.textFileChosen}"
								disabled="#{quickProvisioningController.manualEntryButtonActivationState}" />

							<p:fileUpload id="fileUpload" style="translateY(-10px);"
								fileUploadListener="#{quickProvisioningController.loadFileToStringList}"
								mode="advanced" auto="true" update="inputText"
								allowTypes="/(\.|\/)(txt)$/"
								disabled="#{quickProvisioningController.manualEntryButtonActivationState}" />

							<p:commandButton id="manualEntry" value="Manual entry" 
								disabled="#{!quickProvisioningController.manualEntryButtonActivationState}">
							</p:commandButton>

						</h:panelGrid>
And it looks like this:

Image
JSF Mojarra 2.2.6
Primefaces 5.0
JbossWildfly 8.1
Chrome 39

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

12 Dec 2014, 11:38

cellPadding/cellSpacing?

tasosioan7
Posts: 27
Joined: 28 Nov 2014, 13:47

12 Dec 2014, 13:58

Yes, they are irrelevant with the problem. I tried removing or edit these. Besides, I want these for UI look and feel stuff.

I found a workaround, by wrapping fileUpload in a h:panelGroup, and also put an empty h:outputText above fileUpload,
so now it looks fine.
JSF Mojarra 2.2.6
Primefaces 5.0
JbossWildfly 8.1
Chrome 39

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests