Defect on fileupload?

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

21 Jul 2016, 17:24

I'm using Sentinel and Primefaces 6. Even if i put mode=advanced and apply a label I got bug showing fileupload.

my fileupload looks like this
http://imgur.com/Y2jp5fj

for the code below

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	template="/WEB-INF/template.xhtml">
	<ui:define name="content">
		<ui:fragment
			rendered="#{!usuarioLogado.permissaoCadastro.contains('I')}">
			<ui:include src="/includeSemPermissao.xhtml" />
		</ui:fragment>

		<ui:fragment
			rendered="#{usuarioLogado.permissaoCadastro.contains('I')}">
			<div class="ContainerIndent">
				<h2>Deploy</h2>
				<h:form enctype="multipart/form-data">
					<p:fileUpload 
						fileUploadListener="#{serverBean.processaUpload}" auto="true" />
				</h:form>
				<h2>Arquivos log do servidor</h2>
				<h:form id="form">
					<h:dataTable value="#{serverBean.listOfFiles}" var="x">
						<h:column>
							<h4>
								<h:outputText value="#{x.name} " />
							</h4>
						</h:column>
						<h:column>
							<p:commandButton value="Baixar" ajax="false"
								actionListener="#{serverBean.downloadAction(x)}">
								<p:fileDownload value="#{serverBean.file}" />
							</p:commandButton>
						
							<p:commandButton value="Apagar conteúdo" ajax="true"
								update="@form" action="#{serverBean.apagarConteudo(x)}" />
							<p:commandButton value="Apagar arquivo" ajax="true"
								update="@form" action="#{serverBean.apagarArquivo(x)}" />

						</h:column>
					</h:dataTable>
				</h:form>
			</div>
		</ui:fragment>
	</ui:define>
</ui:composition>
Last edited by erickdeoliveiraleal on 21 Jul 2016, 17:43, edited 2 times in total.

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

21 Jul 2016, 17:42

this is my css file. none of this applies to fileupload, right?

Code: Select all

.VEPEMA .fc-event-inner {
	background: #006600 !important;
	background-color: green !important;
}

#login-logo img {
	height: 230px !important;
}

#login-box {
	min-height: 230px !important;
	min-width: 200px;
}

.inativo {
	background-color: #FFE6E6 !important;
}

.ativo {
	background-color: #E8FFE6 !important;
}

.margemMaior {
	margin-left: 20px;
	margin-right: 20px;
}

.ui-selectonemenu {
	min-width: 0 !important;
}

.ui-button-icon-left.fa {
	color: white;
}

.i.fa {
	margin-right: 20px;
}

.fc-view-container .fc-event {
	background-color: #1578C9;
	border-color: #1578C9;
}

.fc-view-container .fc-event:hover {
	background-color: white;
	border-color: #1578C9;
	color: #1578C9;
}

.fc-view-container .fc-month-view .fc-bg table tbody tr .fc-today {
	border-color: #1578C9 !important;
}

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 Jul 2016, 15:29

Can you please check the following css code on the style editor of browser?

Code: Select all

.ui-fileupload-choose .ui-icon-plusthick, .ui-fileupload-simple .ui-icon-plusthick {
    background-image: url("/sentinel/javax.faces.resource/images/plus-sign.svg.xhtml?ln=primefaces-sentinel") !important;
    background-position: center center !important;
    background-size: 100% auto !important;
}

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

03 Aug 2016, 20:50

aragorn wrote:Can you please check the following css code on the style editor of browser?

Code: Select all

.ui-fileupload-choose .ui-icon-plusthick, .ui-fileupload-simple .ui-icon-plusthick {
    background-image: url("/sentinel/javax.faces.resource/images/plus-sign.svg.xhtml?ln=primefaces-sentinel") !important;
    background-position: center center !important;
    background-size: 100% auto !important;
}
no, this doesn't work

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 Aug 2016, 08:31

No, please check the above css on your browser;
Image

Also, Do you have "plus-sign.svg" under webapp/resources/sentinel-layout/images?
Can you please try the following xhtml page and attach a screenshot?

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="content">
        <div class="ContainerIndent">
            <p:panel header="FileUpload Samples">
                <div class="ContainerIndent">
                    <h:form>
                        <p:fileUpload auto="true" />
                    </h:form>
                </div>
            </p:panel>
        </div>
    </ui:define>

</ui:composition>

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

04 Aug 2016, 18:12

I got the sema result with code you sent.
About the css in the inspector panel i got the following:
.ui-fileupload-buttonbar .ui-fileupload-choose input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
filter: alpha(opacity=0);
font-size: 200px;
direction: ltr;
cursor: pointer;
}
.ui-fileupload-choose input[type="file"], .ui-fileupload-simple input[type="file"] {
z-index: 999;
}
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
/* font-size: 1em; */
-moz-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
}
a, div, span, input, textarea, li, strong, button {
outline: none;
text-decoration: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
}
user agent stylesheet
input[type="file" i] {
align-items: baseline;
color: inherit;
text-align: start;
}
user agent stylesheet
input[type="hidden" i], input[type="image" i], input[type="file" i] {
-webkit-appearance: initial;
background-color: initial;
padding: initial;
border: initial;
}
user agent stylesheet
input {
-webkit-appearance: textfield;
background-color: white;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
cursor: auto;
padding: 1px;
border-width: 2px;
border-style: inset;
border-color: initial;
border-image: initial;
}
user agent stylesheet
input, textarea, keygen, select, button {
text-rendering: auto;
color: initial;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
margin: 0em 0em 0em 0em;
font: 13.3333px Arial;
}
user agent stylesheet
input, textarea, keygen, select, button, meter, progress {
-webkit-writing-mode: horizontal-tb;
}
Inherited from span.ui-button-icon-left.ui-icon.ui-c.ui-fileupload-choose
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
Inherited from div.ui-fileupload-buttonbar.ui-widget-header.ui-corner-top
.ui-widget-header {
/* border: 1px solid #3f7506; */
/* background: #3a8104 url(images/ui-bg_highlight-soft_33_3a8104_1x100.png) 50% 50% repeat-x; */
color: #ffffff;
font-weight: bold;
}
Inherited from div#j_idt163:j_idt164.ui-fileupload.ui-widget
.ui-widget .ui-widget {
/* font-size: 1em; */
font-family: 'titillium_webregular' !important;
}
.ui-widget {
font-family: 'titillium_webregular' !important;
}
Inherited from div#j_idt161_content.ui-panel-content.ui-widget-content
.ui-panel .ui-panel-content.ui-widget-content {
padding: 5px;
font-size: 14px;
}
Inherited from div#j_idt161.ui-panel.ui-widget.ui-widget-content.ui-corner-all
.ui-widget {
font-family: 'titillium_webregular' !important;
}
Inherited from div#layout-portlets-cover.fontRegular
#layout-portlets-cover {
background-color: #ffffff;
overflow-y: hidden;
padding-top: 55px;
color: #72828B;
overflow-x: auto;
}
.fontRegular {
font-family: 'titillium_webregular' !important;
}
.fontRegular {
font-family: 'titillium_webregular' !important;
}
aragorn wrote:No, please check the above css on your browser;
Image

Also, Do you have "plus-sign.svg" under webapp/resources/sentinel-layout/images?
Can you please try the following xhtml page and attach a screenshot?

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="content">
        <div class="ContainerIndent">
            <p:panel header="FileUpload Samples">
                <div class="ContainerIndent">
                    <h:form>
                        <p:fileUpload auto="true" />
                    </h:form>
                </div>
            </p:panel>
        </div>
    </ui:define>

</ui:composition>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 Aug 2016, 21:17

Please attach ui-icon css (css of the following tag) in the inspector panel like my screenshot;
<span class="ui-button-icon-left ui-icon ui-c ui-icon-plusthick">

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

05 Aug 2016, 16:52

Nothing happens. I'm using Sentinel 2.1.1 and Primefaces 6.1-Snapshot. 6.0 is algo buggy, but I think that 5.3 was ok.

erickdeoliveiraleal
Posts: 79
Joined: 25 Mar 2013, 13:00

05 Aug 2016, 17:01

Oops, looking the console

Image
but the folder is there
Image
and the image too
Image

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

09 Aug 2016, 11:30

Did you try our sample war project?

Folder structure; /src/main/webapp/resources/primefaces-sentinel/images/plus-sign.svg

Locked

Return to “Sentinel”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests