我的应用程序中有一个数据表.一列有大量数据,增加了表格的宽度.
我想将数据拆分为该列中的两行或更多行.
我试过设置该列的宽度,但数据没有拆分,也没有显示总数据.
<p:column headerText="#{msgs['exception.label.exceptionMsg']}" width="200">
<h:outputText value="#{exception.exceptionMsg}"/>
</p:column>
Run Code Online (Sandbox Code Playgroud)
我该如何拆分数据?
有没有办法ajax更新特定组件,如<h:form>
支持bean?
我尝试了以下使用RequestContext#execute()
,
RequestContext context = RequestContext.getCurrentInstance();
context.execute("monitorVehicleForm.update()");
Run Code Online (Sandbox Code Playgroud)
然而,这似乎没有任何影响.
我用它<p:media>
来显示静态PDF内容.
<p:media value="/resource/test.pdf"
width="100%" height="300px" player="pdf">
</p:media>
Run Code Online (Sandbox Code Playgroud)
如何更改它以显示动态内容?
在我的应用程序中,我需要找到一些(3个或更多)GPS点的中点.
我发现两点之间的距离如下
public class DistanceOfGeoPoints {
public static long distanceinKMeters(double dblLat, double dblNewLat, double dblLong, double dblNewLong)
{
try
{
//double dblDistance = 180 / (dblPI * Math.Acos(Math.Sin(dblLat) * Math.Sin(dblNewLat) + Math.Cos(dblLat) * Math.Cos(dblNewLat) * Math.Cos(dblLong - dblNewLong)));
double dblDegree2Radius = Math.PI / 180;
double dbllongdiff = (dblNewLong - dblLong) * dblDegree2Radius;
double dbllatdiff = (dblNewLat - dblLat) * dblDegree2Radius;
double a = Math.pow(Math.sin(dbllatdiff / 2.0), 2) + Math.cos(dblNewLat * dblDegree2Radius) * Math.cos(dblLat * dblDegree2Radius) * Math.pow(Math.sin(dbllongdiff / 2.0), 2); …
Run Code Online (Sandbox Code Playgroud) 在p:对话框中addCommodityDlg
我有一些文本字段.我正在尝试显示这些字段的验证消息.但没有实现它.
码:
<p:dialog id="addCommodityDlg" widgetVar="createCommodity"
width="625" height="400" modal="true" header="Add Items">
<h:panelGrid columns="3">
<h:outputLabel value="ID" />
<h:inputText value="#{deliveryOderController.selectedCommodity.commodityId}"
id="commodityIdTF" required="true" />
<p:message for="commodityIdTF"/>
<h:outputLabel value="Name"/>
<h:inputText value="#{deliveryOderController.selectedCommodity.commodityName}"
id="commodityNameTF"/>
<p:message for="commodityNameTF"/>
</h:panelGrid>
<p:commandLink styleClass="saveButtonLnk"
actionListener="#{deliveryOderController.saveItems}"
update=":createDOForm:transportUnitPnl">
</p:commandLink>
</p:dialog>
Run Code Online (Sandbox Code Playgroud)
如何在p:对话框中显示验证消息?
我有这个规范,当显示错误消息(使用时<p:message>
)由于验证消息或其他一些事情,它应该在一段时间后自动关闭.
我怎样才能做到这一点?
我正在使用primefaces
请给我一个解决方案
我想显示一个关闭按钮,显示在最后一列的一行上(当鼠标悬停在该行上时)我不希望关闭按钮始终可见但只是鼠标悬停在上面.
如果有人有一个非常感激的例子.
我怎样才能将一个arugument传递给听众方法?
我试过这样的:
<p:poll interval="3" listener="#{vehicleController.onPoll('12')}"
update="vehicleDataList"/>
Run Code Online (Sandbox Code Playgroud)
和
<p:poll interval="3" listener="#{vehicleController.onPoll(vehicle.vehicleLicense)}"
update="vehicleDataList"/>
Run Code Online (Sandbox Code Playgroud)
但它抛出以下异常:
javax.servlet.ServletException: /monitorVehicles/vehiclesList.xhtml
Failed to parse the expression [#{vehicleController.onPoll('12')}]
Run Code Online (Sandbox Code Playgroud)
我怎么能得到这个?