-
1. popup onload
boy18nj Mar 3, 2011 5:24 PM (in response to snaker)Use jquery-
Example
<
script
type
=
"text/javascript"
>
jQuery(document).ready(function() {
jQuery('#sequences').find('input[type=button]').each(function(i) {
jQuery(this).click(function() {
});
-
2. popup onload
snaker Mar 4, 2011 3:43 AM (in response to boy18nj)I put that code in my page but it do nothing...
there is somo ajax method in richfacer for it?
-
3. Re: popup onload
ilya40umov Mar 4, 2011 4:00 AM (in response to snaker)1 of 1 people found this helpfulLook at http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_jQuery.html
It has what indeed you wanted(if you wanted to show popup by JS command):
onload
— applying a query when a document is loaded;In RF 3.3.3 modalPanel has an attribute "showWhenRendered":
showWhenRendered false false javax.el.ValueExpression
(must evaluate toboolean
)If "true" value for this attribute makes a modal panel opened as default. Default value is "false" -
4. popup onload
ilya40umov Mar 4, 2011 4:13 AM (in response to ilya40umov)In RF 4.0 popupPanel has the following list of attributes(I guess you should try set "show" to true):
<tag>
<tag-name>popupPanel</tag-name>
<component>
<description>JSF component class</description>
<component-type>org.richfaces.PopupPanel</component-type>
<renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
</component>
<attribute>
<name>autosized</name>
<type>boolean</type>
</attribute>
<attribute>
<description>The value binding expression used to wire up this component to a component property of a JavaBean class</description>
<icon />
<name>binding</name>
<type>javax.faces.component.UIComponent</type>
</attribute>
<attribute>
<name>controlsClass</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>domElementAttachment</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>followByScroll</name>
<type>boolean</type>
</attribute>
<attribute>
<name>header</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>headerClass</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>height</name>
<type>int</type>
</attribute>
<attribute>
<description>The component identifier for this component. This value must be unique within the closest parent component that is a naming container.</description>
<display-name>Component Identifier</display-name>
<icon />
<name>id</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>keepVisualState</name>
<type>boolean</type>
</attribute>
<attribute>
<name>left</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>maxHeight</name>
<type>int</type>
</attribute>
<attribute>
<name>maxWidth</name>
<type>int</type>
</attribute>
<attribute>
<name>minHeight</name>
<type>int</type>
</attribute>
<attribute>
<name>minWidth</name>
<type>int</type>
</attribute>
<attribute>
<name>modal</name>
<type>boolean</type>
</attribute>
<attribute>
<name>moveable</name>
<type>boolean</type>
</attribute>
<attribute>
<name>onbeforehide</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onbeforeshow</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onhide</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskclick</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskcontextmenu</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskdblclick</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskmousedown</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskmousemove</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskmouseout</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskmouseover</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmaskmouseup</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onmove</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onresize</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>onshow</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>overlapEmbedObjects</name>
<type>boolean</type>
</attribute>
<attribute>
<description>Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true.</description>
<display-name>Rendered Flag</display-name>
<icon />
<name>rendered</name>
<type>boolean</type>
</attribute>
<attribute>
<name>resizeable</name>
<type>boolean</type>
</attribute>
<attribute>
<name>shadowDepth</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>shadowOpacity</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>show</name>
<type>boolean</type>
</attribute>
<attribute>
<name>style</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>styleClass</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>top</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>trimOverlayedElements</name>
<type>boolean</type>
</attribute>
<attribute>
<name>visualOptions</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>width</name>
<type>int</type>
</attribute>
<attribute>
<name>zindex</name>
<type>int</type>
</attribute>
</tag>
-
5. popup onload
snaker Mar 4, 2011 4:42 AM (in response to ilya40umov)I have seen...
<
script
type
=
"text/javascript"
>
jQuery(document).ready(function() {
alert('hello');
});
</
script>
it works and:
<h:popupPanel show="true"> works very good, and noe my next step is call my bean before open popup on load and on close the popup, is that posible?
-
6. popup onload
ilya40umov Mar 4, 2011 4:54 AM (in response to snaker)1) You can use a4j:jsFunction to call whatever you want on the server after some JS events. You can also use a4j:commandButton for closing your popup in this case an action will be performed via ajax call but you can close popup before it's completed.
2) I also think that you maybe need to call your server method before page is rendered and then just simply show popup. But it's for you to decide how to implement your requirements.
-
7. popup onload
snaker Mar 4, 2011 6:26 AM (in response to ilya40umov)but a4j:jsFunction only call to js function i think...or Can i call a one method of my bean with jsFunction?
-
8. popup onload
ilya40umov Mar 4, 2011 8:30 AM (in response to snaker)1 of 1 people found this helpfulYes you can. Look at these links for the examples:
http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/a4j_jsFunction.html
-
9. popup onload
snaker Mar 4, 2011 10:35 AM (in response to ilya40umov)ok, i understand this:
<span onmouseover="updateName('Kate')" onmouseout="updateName('')">Kate</span>
<h:outputText id="showname" value="#{userBean.name}" />
<a4j:jsFunction name="updateName" reRender="showname">
<a4j:actionparam name="param1" assignTo="#{userBean.name}" />
</a4j:jsFunction>but,
<a4j:jsFunction name="callScript" data="#{bean.someProperty1}" reRender="someComponent" oncomplete="myScript(data.subProperty1, data.subProperty2)">
<a4j:actionParam name="param_name" assignTo="#{bean.someProperty2}"/>
</a4j:jsFunction>
i dont understand the funcionally of "data", and
oncomplete="myScript(data.subProperty1, data.subProperty2)
myScript is another script???
data.subProperty1, what is "data."
-
-
11. popup onload
snaker Mar 4, 2011 12:11 PM (in response to ilya40umov)thanks, i start to know the funcionally