PRIMEFACES_MOBILE problem

UI Components for JSF
Post Reply
draco123
Posts: 6
Joined: 29 Aug 2014, 08:46

29 Aug 2014, 08:55

Hi guys,

I'm trying to use PrimeFaces mobile im my project, here is the codes:

Code: Select all

<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:pm="http://primefaces.org/mobile" 
    renderKitId="PRIMEFACES_MOBILE">
    
    <pm:page title="Title">
        <pm:view id="testID" >
            <p:outputPanel id="Panel">
                <h:form id="Form">
                    <pm:content>
                            content......
                    </pm:content>
                </h:form>
            </p:outputPanel>
        </pm:view>
    </pm:page>
</f:view>
when i open it in CHROME browser, it's only display a blank page, no any content...
if i remove "renderKitId="PRIMEFACES_MOBILE"", then it can display "content....", why ? anything is wrong with me?

I am using:
Tomcat 7.0.47 ,Primefacees 4.0, java faces 2.2, primefaces mobile 1.0.0 snapshot

Please help me!

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

29 Aug 2014, 12:13

Try

Code: Select all

<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:pm="http://primefaces.org/mobile" 
    renderKitId="PRIMEFACES_MOBILE">
    
    <pm:page title="Title">
       <pm:content>
            <p:outputPanel id="Panel">
                <h:form id="Form">
                            content......
                 </h:form>
            </p:outputPanel>
       </pm:content>
    </pm:page>
</f:view>

draco123
Posts: 6
Joined: 29 Aug 2014, 08:46

30 Aug 2014, 08:43

yes, it works, thank you very much.

another question:
How to adjust the size of input fields ?

Code: Select all

<pm:field >   
	<p:outputLabel for="resourceNo"	 	value="#{bundle['carresources.resourceNo']}" />
	<p:inputText id="resourceNo"  readonly="true"  	value="#{carresourcesForm.carresources.resourceNo}" />
</pm:field>
browse it ok in desktop , but this page cannot normal display in mobile phone , label and input display 2 lines.

then i change code to :

Code: Select all

<pm:field >   
			
<p:inputText id="resourceNo" label="#{bundle['carresources.resourceNo']}" readonly="true" 
	value="# {carresourcesForm.carresources.resourceNo}" />
</pm:field>
but no label display, Why?

thanks again.

by the way ,
i have changed version to Primefaces5.0 :)

draco123
Posts: 6
Joined: 29 Aug 2014, 08:46

01 Sep 2014, 04:33

so, can you help me ?

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

01 Sep 2014, 22:02

patience is a virtue... and please new questions in new topics and please use more descriptive subjects... This is the primefaces mobile forum and you would not post if you did not have a problem. So "PRIMEFACES_MOBILE problem' is kind of useless

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 35 guests