如何在数据表中使用 PrimeNG 的默认过滤器过滤后获取行数。
[totalRecords]="totalRecords"始终显示最初获取的记录数。
即使经过过滤,totalRecords值仍然保持不变并且过滤后不会改变。
例如:最初totalRecords是50,过滤后,数据表中显示的记录数是15。但是我无法得到值15,而是得到50。
有什么办法吗?
我正在使用PrimeFaces p:咆哮.
<p:growl id="msgsInfo"
rendered="true"
showDetail="true" />
<p:growl id="msgsError"
globalOnly="true"
showDetail="true"
sticky="true" />
Run Code Online (Sandbox Code Playgroud)
我需要在第一个咆哮中显示Info消息,而在第二个我需要显示Error消息.使用globalOnly当我添加错误消息时,显示2次.
任何的想法?
我有以下JSF代码来显示使用某种模式的日期.
<f:convertDateTime pattern="E, d MMM, yyyy" timeZone="#{localeBean.timeZone}" />
Run Code Online (Sandbox Code Playgroud)
我想通过localeBean将模式传递给它.有没有办法根据区域设置确定特定模式?
public LocaleBean() {
this.defaultTimeZone = TimeZone.getDefault();
this.strLocale = Locale.getDefault().toString();
this.timeZone = defaultTimeZone.getDisplayName();
}
Run Code Online (Sandbox Code Playgroud) 当我将inputText设置为required时,我与inputText关联的outputLabel会自动添加一个星号.如何防止出现星号?
<p:outputLabel value="Target Species" for="idInputText" />
<p:inputText id="idInputText" required="true" value="#{controller.string}"/>
Run Code Online (Sandbox Code Playgroud)
我正在使用PrimeFaces 4.0
我正在使用PrimeFaces消息,我希望我的整个页面在p:messages渲染时滚动到顶部.
如何xib在多个UITableViewCell子类中共享一个?
它们都具有相同的视图界面,因此我不希望多次重复相同的xib更改单元类.
- (void)viewDidLoad
{
[super viewDidLoad];
[self.tableView registerNib:[UINib nibWithNibName:@"BaseCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"BaseCell"];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
BaseCell *baseCell = [tableView dequeueReusableCellWithIdentifier:@"BaseCell" forIndexPath:indexPath];
...
Run Code Online (Sandbox Code Playgroud)
我需要的是我的一个实例ChildCell- 这是我的一个子类BaseCell.有任何想法吗?
我想为JSF表添加过滤器,并根据过滤器值限制值.
<h:inputText id="search" value="#{accounts.searchString}"></h:inputText>
<h:commandButton value="Search" action="#{accounts.search()}">
<f:ajax execute="search" render="output"></f:ajax>
</h:commandButton>
Run Code Online (Sandbox Code Playgroud)
我想最好的方法是将过滤器值添加到SQL查询中:
SELECT * FROM CUSTOMERS ORDER BY %S %S offset ? limit ?
Run Code Online (Sandbox Code Playgroud)
完整代码:http://pastebin.com/eEeTWEqK
我如何将代码实现为链接?
PS.我这样修改了代码:
<div class="div_input_style">
<h:inputText id="search" class="input_style" value="#{accounts.searchString}"></h:inputText>
<h:commandButton class="theSpan" value="Search by title">
<f:ajax execute="search" render="output"></f:ajax>
</h:commandButton>
</div>
Run Code Online (Sandbox Code Playgroud)
public List<AccountsObj> list(int firstRow, int rowCount, String sortField, boolean sortAscending) throws SQLException
{
String SqlStatement = null;
if (ds == null)
{
throw new SQLException();
}
Connection conn = ds.getConnection();
if (conn == null) …Run Code Online (Sandbox Code Playgroud) 我正在使用Font Awesome PrimeFaces集成(使用常规图标)并且效果很好.
现在我试图通过以下方式使堆叠图标工作:
<span class="fa-stack fa-lg">
<i class="fa fa-square-o fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x"></i>
</span>
Run Code Online (Sandbox Code Playgroud)
在我使用PrimeFaces的代码示例中,我有类似的东西
<p:submenu expanded="true" label="Request" styleClass="groupmenu">
<p:menuitem value="Annual Forecast" outcome="coursesList.xhtml" icon="fa fa-pencil" />
<p:menuitem value="Forecast History" outcome="annualList.xhtml" icon="fa fa-eye" />
</p:submenu>
Run Code Online (Sandbox Code Playgroud)
我想,以取代fa-pencil及fa-eye一些堆积图标
我怎样才能实现它?谢谢
我正在使用 JSF,我想在单击按钮时在新选项卡中打开 PDF 文件。
XHTML
<p:commandButton onclick="this.form.target = '_blank'"
actionListener="#{managedBean.openFile(file)}"
ajax="false" />
Run Code Online (Sandbox Code Playgroud)
托管bean
public void openFile( File file ) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
BufferedInputStream input = null;
BufferedOutputStream output = null;
try {
// Open file.
input = new BufferedInputStream(new FileInputStream(file), 10240);
// Init servlet response.
response.reset();
// lire un fichier pdf
response.setHeader("Content-type", "application/pdf");
response.setContentLength((int)file.length());
response.setHeader("Content-disposition", "attachment; filename=" + node.getNomRepertoire());
response.setHeader("pragma", "public");
output = new BufferedOutputStream(response.getOutputStream(), 10240);
// Write file …Run Code Online (Sandbox Code Playgroud) 所以我在Java中得到了这个即时日期:“2018-05-19T22:00:00Z”。
我怎样才能获得星期几?就像星期一..
我正在尝试这个,但它不起作用:
${date?string["EEEE"]}
Run Code Online (Sandbox Code Playgroud)
谢谢
primefaces ×5
jsf ×4
java ×2
angular5 ×1
css ×1
date ×1
datetime ×1
font-awesome ×1
freemarker ×1
growl ×1
ios ×1
jsf-2 ×1
jsf-2.2 ×1
message ×1
objective-c ×1
pdf ×1
primeng ×1
scroll ×1
uitableview ×1
xib ×1