English 中文(简体)
Primefaces Dialog Focus
原标题:Primefaces Dialog Focus
  • 时间:2011-04-06 02:12:38
  •  标签:
  • primefaces

Is there a special way to include the p:focus on dialog window?

最佳回答

您可以用该方言的显示法来确定方言。

<p:dialog id="dialog" modal="true" widgetVar="ajaxDialog" width="0"
                  draggable="false" closable="false" resizable="false">
    <p:graphicImage value="./images/ajax-loader.gif" />
</p:dialog>

set the focus with

ajaxDialog.show();
问题回答

如果有方言,使用方标:焦点,你可以自动确定重点。

例:

 <p:dialog id="myDialog">
    <h:form id="myForm">
        <p:focus context="myForm"/>
           <p:inputText id="username" value="#{userBean.username}/>
    </h:form>
 </p:dialog>

当你打开方言时, 第一个明显可见的不容忽视的领域将受到重视。

参考资料:





相关问题
problem with primefaces library (jsf)

i am new to primeface. i have tried to test an example of primefaces about tag as in its documentation, this is my jsf page code: <%@ page language="java" import="java.util.*" pageEncoding="...

Loading a set of images with primefaces

I have the next code to load a set of images whose streams are in a datamodel called names. My problem is when I declare the var inside the p:datatable tag seems like has nothing. Any idea? thx! <...

Primefaces Tree set checkboxes

I have a JSF application using Primefaces. I use the multiselect tree component which includes a checkbox on each tree node. My problem is that I need to preselect the tree nodes with values coming ...

Primefaces p:fileupload component problem

I am using Primefaces 2.0.1 but the FileUpload component is not working properly. It uses JQuery uploadify behind the scenes. This is my web.xml <?xml version="1.0" encoding="UTF-8"?> <web-...

热门标签