From richfaces-svn-commits at lists.jboss.org Thu Feb 3 05:32:14 2011 Content-Type: multipart/mixed; boundary="===============3957801114703829989==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r21411 - in trunk/examples/richfaces-showcase/src/main: webapp/richfaces/dropDownMenu/samples and 2 other directories. Date: Thu, 03 Feb 2011 05:32:14 -0500 Message-ID: <201102031032.p13AWEqa019814@svn01.web.mwc.hst.phx2.redhat.com> --===============3957801114703829989== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ilya_shaikovsky Date: 2011-02-03 05:32:14 -0500 (Thu, 03 Feb 2011) New Revision: 21411 Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/login.= xhtml trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/sample= s/login-sample.xhtml Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/= data/common/navigation.xml trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dropDownMenu= /samples/topMenu-sample.xhtml Log: new demo for popup. Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richface= s/demo/data/common/navigation.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo= /data/common/navigation.xml 2011-02-03 09:54:05 UTC (rev 21410) +++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo= /data/common/navigation.xml 2011-02-03 10:32:14 UTC (rev 21411) @@ -417,7 +417,7 @@ - + popup rich:popupPanel @@ -429,6 +429,10 @@ modalPopup Modal panel example + + login + Login panel positioning + Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dropD= ownMenu/samples/topMenu-sample.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dropDownMen= u/samples/topMenu-sample.xhtml 2011-02-03 09:54:05 UTC (rev 21410) +++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dropDownMen= u/samples/topMenu-sample.xhtml 2011-02-03 10:32:14 UTC (rev 21411) @@ -75,17 +75,6 @@ - - - - - - - - - = Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/lo= gin.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/login= .xhtml (rev 0) +++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/login= .xhtml 2011-02-03 10:32:14 UTC (rev 21411) @@ -0,0 +1,46 @@ + + + + +

In RichFaces 3.3.x many developers used rich:dropDownMenu + component for creation of Search/Login popups attached to toolbars. And + there were two reasons for that:

+
    +
  • Simplicity of usage. No script positioning required. + rich:dropDownMenu performs popup positioning on its own and simply + customizable by using jointPoint and direction + attributes.
  • +
  • RichFaces 3.3.x has no lightweight popup panel and rich:modalPane= l + usage for such cases required workarounds in order to make it + non-modal
  • +
+

But that approach has some disadvantages as well:

+
    +
  • rich:dropDownMenu component was added with additional + JavaScript code for inputs processing inside the rich:menuItem's. + That not really native task for menu so that code was really + superfluous from simple menus point of view.
  • +
  • Developer still has to work on styling of menu item removing + hover effects and making it looks like panel rather than menuItem
  • +
+

RichFaces 4.x provides clean api for popup panel and added + non-modal state, so for now it's really easier and looking more native + to use modal panel for such tasks. Below you could see two samples:

+ + + + + + + +

rich:popup panel allows you to pass next options to show method: + min and max width and height, actual width and height, t= op + and left positions for the panel. So with rich:hashParam it's + really simple to build declarative call for the panel which uses + dynamic properties.

+
+ + \ No newline at end of file Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/sa= mples/login-sample.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/sampl= es/login-sample.xhtml (rev 0) +++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/popup/sampl= es/login-sample.xhtml 2011-02-03 10:32:14 UTC (rev 21411) @@ -0,0 +1,62 @@ + + +

Login panel attachment:

+ + + + + + + + + + + Login + + + + + + + + + Login + + +

Search panel right-side attachment:

+ + + + + + + + + + + Search + + + + + + + Search + + +
\ No newline at end of file --===============3957801114703829989==--