Fileupload

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

02 May 2016, 04:12

Before installing Atlas theme and layout,I wrote p:fileupload on my own with a differrent login but when after installing this theme and layout it is not working.It is working as p:fileupload in the primefaces showcase.What is the problem?
Thanks in advance!

User avatar
aragorn
Posts: 3486
Joined: 29 Jun 2013, 12:38

02 May 2016, 08:30

I tested p:fileupload with Atlas. it works fine. Exp; http://www.primefaces.org/atlas/file.xhtml
Do you get an error on browser console or IDE ?

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 06:43

After uploading the file i am saving it into my db.But when i install this theme and layout,the pic is not saving in my db

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 09:17

Is anything overrides my own p:fileupload by the theme and the layout???

User avatar
aragorn
Posts: 3486
Joined: 29 Jun 2013, 12:38

03 May 2016, 09:18

Can you please attach a sample test.xhtml and testBean.java for us to replicate?

User avatar
aragorn
Posts: 3486
Joined: 29 Jun 2013, 12:38

03 May 2016, 09:21

And can you please try this issue after removing "Style For UploadButton" block in theme.less or theme.css.?(line: 2036)

OR

Please try this param in web.xml
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>aristo</param-value>
</context-param>

instead of
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>atlas</param-value>
</context-param>

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 10:53

I tried my old templates which consists of p:layout and p:layoutunits,the fileupload is working.But when i am using the template given this layout it is not working.When i am using old templates i am losing my responsiveness.How can I resolve this issue?

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 11:02

The below includes my ui:composition and template.I think there is no issue in the p:fileupload file.

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
xmlns:b="http://bootsfaces.net/ui" xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
xmlns:common="http://xmlns.jcp.org/jsf/composite/common"
template="/WEB-INF/template.xhtml">

<ui:define name="head">

</ui:define>

<ui:define name="content">

<!-- Left Column -->
<div class="Container20 NoPadding Responsive100">
<div class="Container100">
<div class="Card ui-fluid">
<ui:include src="a.xhtml"></ui:include>
</div>
</div>
</div>


<!-- Center Column -->
<div class="Container50 NoPadding Responsive50">
<div class="Container100">
<div class="Card Flex FlexWrap">
<ui:include src="b.xhtml"></ui:include>
</div>
</div>
</div>

</ui:define>

</ui:composition>


<!DOCTYPE html>
<html 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">

<f:view contentType="text/html">
<f:loadBundle var="msg" basename="pageConstants" />
<f:facet name="postinit">
<link type="text/css" rel="stylesheet"
href="/app/javax.faces.resource/style.css.xhtml?ln=css" />
</f:facet>
<h:head>
<f:facet name="first">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
</f:facet>
<title>Sample</title>
<h:outputScript library="default"
name="js/prime/PrimeFacesMessages.js" />
<h:outputScript library="default" name="js/history.js" />
<h:outputScript name="js/equalize.js" library="atlas-layout" />
<h:outputScript name="js/layout.js" library="atlas-layout" />

<ui:insert name="head" />
</h:head>

<h:body styleClass="LeadenTopbar">
<h:form id="form" prependId="false">
<ui:include src="topbar.xhtml" />

<!-- LAYOUT MENU COVER -->
<ui:include src="layoutmenu.xhtml" />

<div id="layout-portlets-cover" class="Flex FlexWrap">
<ui:insert name="content">
Template
</ui:insert>
</div>

<ui:include src="footer.xhtml" />

<p:ajaxStatus
style="width:40px; height:40px; position:fixed; right:30px; bottom:30px; z-index:999999;">
<f:facet name="start">
<i class="fa fa-circle-o-notch fa-spin Green Fs40"></i>
</f:facet>

<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>

<h:outputStylesheet name="css/core-layout.css" library="atlas-layout" />
<h:outputStylesheet name="css/animate.css" library="atlas-layout" />
<h:outputStylesheet name="css/font-awesome.css"
library="atlas-layout" />
<h:outputStylesheet name="css/atlas-font.css" library="atlas-layout" />
<h:outputStylesheet name="css/atlas-layout.css"
library="atlas-layout" />
<h:outputStylesheet name="theme.css" library="primefaces-atlas"/>
<h:outputStylesheet library="default" name="css/application.css" />
<h:outputStylesheet name="theme.css" library="primefaces-atlas" />
<link href='https://fonts.googleapis.com/css?family=Courgette'
rel='stylesheet' type='text/css' />
<h:outputStylesheet name="theme.css" library="primefaces-atlas"/>
</h:form>
</h:body>
</f:view>
</html>

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 12:01

Even when I removed the Style For UploadButton in theme.css then i am even not able to open a file in local system.

abhishek15
Posts: 23
Joined: 23 Mar 2016, 07:36

03 May 2016, 12:26

I found the issue that is when i remove the below snippet in the template then the p:fileupload is working.
<!--LAYOUT MENU COVER
<ui:include src="layoutmenu.xhtml" /> -->

May I know what is the reason???Actually I want layoutmenu in this page so please check it once.

Locked

Return to “Atlas”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest