• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF Scale xhtml/jsf problem  RSS feed

 
Daniel Danson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, im just a little Praktikant so i do this work for 0 Euro as a "Work Experience" my boss expects too much from me, i should write a programm to get the weight from a scale, im stuck in the configuration Page, i want to add a new item and then in the console (from Primefaces) i want the people to have the ability to choose a scale which they´ve added before.





So there is some xhtml code, but there is a problem with the Form1








<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:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Konfiguration</title>
</h:head>
<h:body>

<p:layout fullPage="true">
<p:layoutUnit position="north" header="Waagen" size="50">
</p:layoutUnit>


<p:layoutUnit position="west" size="250">

<!-- Menu erstellung -->
Konfiguration


Console


</p:layoutUnit>


<p:layoutUnit position="center" id="mainContent">
<h:form id="mainForm">




<h:form id="form1">
<p:growl id="messages" showDetail="true"/>
<p:panel header="Waage hinzufügen" style="width: 900px;">
<p:panelGrid columns="2">
<h:outputLabel for="item" value="Name: " />
<p:inputText value="#{item.item}"/>
<h:outputLabel for="qty" value="Schnittstelle: " />
<p:inputText value="#{item.qty}"/>
<h:outputLabel for="price" value="Anmerkung: " />
<p:inputText value="#{item.price}"/>
<f:facet name="footer">
<h:commandButton value="Hinzufügen" action="#{item.addAction}"/>
</f:facet>
</p:panelGrid>
<p:spacer height="230px;"/>
<p:dataTable value="#{item.orderList}" var="o" widgetVar="50" style="width: 860px;" editable="true">
<f:facet name="header">

</f:facet>
<p:ajax event="rowEdit" listener="#{item.onEdit}" update=":form1:messages" />
<p:ajax event="rowEditCancel" listener="#{item.onCancel}" update=":form1:messages" />
<p:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{o.item}" />
</f:facet>
<f:facet name="input">
<p:inputText value="#{o.item}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>

<p:column>
<f:facet name="header">
<h:outputText value="Schnittstelle" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{o.qty}" />
</f:facet>
<f:facet name="input">
<p:inputText value="#{o.qty}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>

<p:column>
<f:facet name="header">
<h:outputText value="Anmerkung" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{o.price}" />
</f:facet>
<f:facet name="input">
<p:inputText value="#{o.price}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Options" style="width:50px">
<p:rowEditor />
</p:column>
</p:dataTable>
</p:panel>
</h:form>


</h:form>
</p:layoutUnit>
</p:layout>
</h:body>
</html>

Hope someone can help me with the dropdown box for selecting a scale and that someone could help me with this upper code, thanks in advance.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Daniel!

There's a "Code" button on our message editor. You can use it to insert tags into your posted message to wrap sample Java code, XML and other pre-formatted data, which will keep the format from being destroyed and make it easier to read.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!