0

my Primefaces form seem to be OK in web-browser (Firefox), anyway in Eclipse internal browser it is too wide (maybe like 4 screens wide). I dont think that problem is in code, anyway attached.

Eclipse : enter image description here

Firefox : enter image description here

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

<h:head>
<h:outputScript library="javax.faces" name="jsf.js"/>
</h:head>

<h:body>


<br/>
<br/>

    <h:form prependId="false" id="form" styleClass="styleGreen">
    <p:panel id="panel" header="Login" style="width: 400px; position:relative; left:100px">

        <br/>
        <p:panelGrid columns="2">

            <p:outputLabel for="articleCount" value="Count"/>
            <p:inputText id="articleCount" value="#{articleBean.articleCount}" requiered="true" requiredMessage="Enter Count"/>     

            <p:outputLabel for="articleName" value="Name"/>
            <p:inputText id="articleName" value="#{articleBean.articleName}" requiered="true" requiredMessage="Enter Name"/>

            <p:outputLabel for="articleDescription" value="Description"/>
            <p:inputText id="articleDescription" value="#{articleBean.articleDescription}" requiered="true" requiredMessage="Enter Description"/>

        </p:panelGrid>

        <br/><br/>
        <p:commandButton id="saveBtn" value="Save" icon="ui-icon-save" action="#{articleBean.save}"/>
        <p:commandButton id="cancelBtn" value="Cancel" action="index"/>             


    </p:panel> 

    </h:form>

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Josef Vancura
  • 1,053
  • 10
  • 18
  • 1
    Then try using a real browser in eclipse. You can also configure it to use FF, IE or other. Waste of your time to find the cause in an unclear browser regarding specs compliancy. – Kukeltje Jul 30 '16 at 10:54
  • 1
    Oh and btw, including the jsf script manually is weird and should never be needed – Kukeltje Jul 30 '16 at 10:55
  • 1
    And don't use prependId to false http://stackoverflow.com/a/7416770/6546865 – SiMag Jul 30 '16 at 15:36

1 Answers1

2

Eclipse's internal web browser is an epic fail. Don't ever use it if you respect Web Standards.

Change it to the external system default web browser.

enter image description here

Or just don't use Run on Server option in the project, but just add the project to the server via Add/Remove projects in server's context menu and then start the server and finally manually open the page of interest in your favourite webbrowser, if necessary via a bookmark.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555