incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Bug in ADF showOne components
Date Wed, 19 Apr 2006 20:25:58 GMT
Turns out to be a pretty simple answer.  <ui:debug> should be a
leaf node, not a parent.  You had:

<afh:html>
  <ui:debug>
    <afh:body>  </afh:body>
 </ui:debug>
</afh:html>

Don't do that...  it should be:

<afh:html>
  <ui:debug/>
  <afh:body> ... </afh:body>
</afh:html>

Actually, you should probably push ui:debug inside the body.
Plus, you're gonna need afh:head if you want anything to
look properly styled.

Facelets should probably be reporting an error if ui:debug has any
contents;  I'll run that by Jacob.

-- Adam




On 4/10/06, Jeremy Sager <jsager@chessys.com> wrote:
> Hey Adam -
>
> Any luck on this issue? The last thing I want to do is be pushy and get on
> your nerves, but I'm getting pushed to come up with an answer.
>
> Jeremy Sager
> Data Communications Product Manager
> Chesapeake System Solutions
> 410.356.6805 x120
> JSager@chessys.com
>
> -----Original Message-----
> From: Jeremy Sager [mailto:jsager@chessys.com]
> Sent: Thursday, April 06, 2006 6:59 PM
> To: adffaces-user@incubator.apache.org
> Subject: RE: Bug in ADF showOne components
>
> Actually I just realized our web project depends on the core project so it
> wouldn't be a trivial as I thought to zip it and send it, but it could still
> be done if it was super necessary. It might be easier to zip up the key
> items (jars, config files) and send 'em over.
>
> Jeremy Sager
> Data Communications Product Manager
> Chesapeake System Solutions
> 410.356.6805 x120
> JSager@chessys.com
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Thursday, April 06, 2006 5:03 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: Bug in ADF showOne components
>
> Jeremy,
>
> Could you try a quick experiment?  Swap from af:showOneChoice to
> af:showOneTab and see if it all works?  I'm curious if the
> problems are with the renderer (I'm less than 100% confident in
> the showOneChoice renderer code) or with the component logic.
>
> -- Adam
>
>
>
> On 4/6/06, Jeremy Sager <jsager@chessys.com> wrote:
> >
> >
> >
> > Hi guys -
> >
> >
> >
> > I'm moving this from the myfaces list to the adf faces list because it's
> > more appropriate here, and I'm sure Jonas checks both.
> >
> >
> >
> > It turns out that using the correct html and body tags solved our test
> case,
> > but it did not solve my production case. I've done more testing and
> further
> > isolated some issues.
> >
> >
> >
> > Scenario 1:
> >
> >
> >
> > If I assign an id by hand (i.e. having an attribute id="_123456" or
> > whatever) to the showOneChoice, it malfunctions in the way I initially
> > described, with the input automatically reverting to the first item in the
> > drop down list whenever anything is selected.
> >
> >
> >
> > Scenario 1b:
> >
> >
> >
> > If you remove the facet and just have the showOneChoice inside the panel
> > page, it misbehaves exactly once and then moves on to Scenario 2.
> >
> >
> >
> > Scenario 2:
> >
> >
> >
> > If you do not assign the id by hand and it is generated automatically, the
> > input does NOT revert to the first item in the drop down list
> automatically,
> > but it does still have a problem.
> >
> >
> >
> > The correct CoreShowDetailItem does not display... the final visible
> output
> > for the test page I am about to show you is always "Showing One" even when
> > the input box shows "Item Two".  I included a picture here, it may show up
> > as an attachment.
> >
> >
> >
> >
> >
> >
> >
> > Included here is the exact page from beginning to end that renders
> Scenario
> > Two. To get Scenario One, just add id= to the showOneChoice. Below that I
> > will also include the generated source from the page (it's not that big)
> and
> > also the facelets debug screen.
> >
> >
> >
> > My Facelets Page:
> >
> >
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> >
> >
> >
> > <afh:html xmlns="http://www.w3.org/1999/xhtml"
> >
> > xmlns:ui="http://java.sun.com/jsf/facelets"
> >
> > xmlns:h="http://java.sun.com/jsf/html"
> >
> > xmlns:c="http://java.sun.com/jstl/core"
> >
> > xmlns:f="http://java.sun.com/jsf/core"
> >
> > xmlns:t="http://myfaces.apache.org/tomahawk"
> >
> > xmlns:cssi="http://www.chessys.com"
> >
> > xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
> >
> > xmlns:af="http://xmlns.oracle.com/adf/faces">
> >
> > <ui:debug>
> >
> >       <afh:body>
> >
> >             <af:form>
> >
> >                   <af:panelPage>
> >
> >                         <f:facet name="menu1">
> >
> >                               <af:showOneChoice position="top">
> >
> >                                     <af:showDetailItem
> > text="Item One">
> >
> >                                           <af:outputText
> > value="Showing One"/>
> >
> >                                     </af:showDetailItem>
> >
> >                                     <af:showDetailItem
> > text="Item Two">
> >
> >                                           <af:outputText
> > value="Showing Two"/>
> >
> >                                     </af:showDetailItem>
> >
> >                               </af:showOneChoice>
> >
> >                         </f:facet>
> >
> >                   </af:panelPage>
> >
> >             </af:form>
> >
> >       </afh:body>
> >
> > </ui:debug>
> >
> > </afh:html>
> >
> >
> >
> >
> >
> > The results are the same with the ui:debug tag removed.
> >
> >
> >
> >
> >
> > Generated Source:
> >
> >
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> > "http://www.w3.org/TR/html4/loose.dtd"><!-- Start:
> > oracle.adf.Html["_id1"] --><html dir="ltr" lang="en"><script
> > language="javascript" type="text/javascript">
> >
> > //<![CDATA[
> >
> > function faceletsDebug(URL) { day = new Date(); id = day.getTime();
> > eval("page" + id + " = window.open(URL, '" + id + "',
> >
> 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=8
> 00,height=600,left
> > = 240,top = 212');"); };var faceletsOrigKeyup = document.onkeyup;
> > document.onkeyup = function(e) { if (window.event) e = window.event; if
> > (String.fromCharCode(e.keyCode) == 'D' & e.shiftKey & e.ctrlKey)
> >
> faceletsDebug('/TRecsWebClient/pages/trecs.jsf?facelets.ui.DebugOutput=11443
> 39607314');
> > else if (faceletsOrigKeyup) faceletsOrigKeyup(e); };
> >
> > //]]>
> >
> > </script>
> >
> > <!-- Start: oracle.adf.Body["_id3"] -->
> >
> >   <body onload="_checkLoad(event)"
> > onunload="_checkUnload(event)"><script>var _AdfWindowOpenError='A popup
> > window blocker has been detected in your browser. Popup blockers interfere
> > with the operation of this application. Please disable your popup blocker
> or
> > allow popups from this site.';</script><script
> > src="/TRecsWebClient/adf/jsLibs/Commonea20.js"></script><!--
> > Start: oracle.adf.Body["_id3"] -->
> >
> >     <iframe id="_pprIFrame" name="_pprIFrame" frameborder="0" longdesc="#"
> > title="" src="about:blank"
> > style="position:absolute;top:-100px;visibility:hidden"
> > width="0" height="0"></iframe>
> >
> >     <!-- Start: oracle.adf.Body["_id3"] --><div id="_pprBlockingDiv"
> > onclick="return _pprConsumeClick(event);"
> > style="position:absolute;left:0;top:0;width:0;height:0;cursor:wait;"
> > onkeydown="return false;" onkeyup="return false;" onmousedown="return
> > false;" onmouseup="return false;" onkeypress="return
> > false;"></div><script>var _cachedLibs;</script><a name="top"></a>
> >
> >     <noscript>This page uses JavaScript and requires a JavaScript enabled
> > browser.Your browser is not JavaScript enabled.</noscript>
> >
> >     <!-- Start: oracle.adf.Form["_id4"] -->
> >
> >     <form id="_id4" name="_id4" style="margin:0px" onkeypress="return
> > _submitOnEnter(event,'_id4');" method="POST"
> >
> action="/TRecsWebClient/pages/trecs.jsf;jsessionid=FF3329E7CD5F9FBA6D10F3687
> ECCD300"><!--
> > Start: oracle.adf.Panel["_id5"] --><a href="#TheContent" class="x6g">Skip
> > navigation elements to page contents</a><!-- Start:
> oracle.adf.Panel["_id5"]
> > --><table cellpadding="0" cellspacing="0" border="0" width="100%"
> > summary="">
> >
> >             <tr>
> >
> >               <td align="right" valign="bottom"><script>function
> > _socGetSelection(elem){  var selectedElem = document.getElementById(elem);
> > var selectedOptions = selectedElem.options;  var numOptions =
> > selectedOptions.length;  for (i = 0; i < numOptions; i++)  {    var
> > selectOption = selectedOptions.item(i);    var isSelected =
> > selectOption.selected;    if (isSelected)    {      return
> selectOption.id;
> >     break;    }  }}</script><!-- Start: oracle.adf.ShowOne["_id6"]
> --><table
> > id="_id6" summary="" border="0" cellspacing="0" cellpadding="0">
> >
> >                   <tr>
> >
> >                     <td align="center"><table id="_id6_soc_tbl" border="0"
> > cellspacing="0" cellpadding="0" summary="">
> >
> >                         <tr>
> >
> >                           <td align="left" nowrap><span class="xa"><label
> > for="_id6_soc_tbl_chc"></label></span></td>
> >
> >                           <!-- Start: oracle.adf.ShowOne["_id6"] -->
> >
> >                           <td width="12"></td>
> >
> >                           <!-- Start: oracle.adf.ShowOne["_id6"] -->
> >
> >                           <td valign="top" nowrap>
> >
> >                             <select id="_id6_soc_tbl_chc"
> > name="_id6_soc_tbl_chc" class="x6" onchange="var selectedOption =
> > _socGetSelection('_id6_soc_tbl_chc');  _submitPartialChange('_id4','1',
> > {partialTargets:'_id6',
> > event:'show',source:selectedOption});return true;">
> >
> >                               <option id="_id7" selected>Item One</option>
> >
> >                               <!-- Start: oracle.adf.ShowOne["_id6"] -->
> >
> >                               <option id="_id9">Item Two</option>
> >
> >                             </select>
> >
> >                           </td>
> >
> >                         </tr>
> >
> >                       </table></td>
> >
> >                   </tr>
> >
> >                   <!-- Start: oracle.adf.ShowOne["_id6"] -->
> >
> >                   <tr>
> >
> >                     <td height="8"></td>
> >
> >                   </tr>
> >
> >                   <!-- Start: oracle.adf.ShowOne["_id6"] -->
> >
> >                   <tr>
> >
> >                     <td><!-- Start: oracle.adf.ShowDetail["_id7"] --><!--
> > Start: oracle.adf.Output["_id8"] -->Showing One</td>
> >
> >                   </tr>
> >
> >                 </table></td>
> >
> >
> >
> >               <td><img src="/TRecsWebClient/adf/images/t.gif" alt=""
> > width="10" height="1"></td>
> >
> >             </tr>
> >
> >
> >
> >             <tr>
> >
> >               <td colspan="2" width="100%"><!-- Start:
> > oracle.adf.Panel["_id5"] --><table class="x82" cellpadding="0"
> > cellspacing="0" border="0" summary="" width="100%">
> >
> >                     <tr>
> >
> >                       <td height="1"></td>
> >
> >                     </tr>
> >
> >                   </table></td>
> >
> >             </tr>
> >
> >           </table><!-- Start: oracle.adf.Panel["_id5"]
> > --><div><div></div><!-- Start: oracle.adf.Panel["_id5"]
--><div></div><!--
> > Start: oracle.adf.Panel["_id5"] --><a id="TheContent" name="TheContent"
> > class="xj"></a><!-- Start: oracle.adf.Panel["_id5"] --><table
width="100%"
> > summary="" border="0" cellspacing="0" cellpadding="0">
> >
> >               <tr valign="top">
> >
> >                 <td width="100%"></td>
> >
> >                 <!-- Start: oracle.adf.Panel["_id5"] -->
> >
> >                 <td nowrap></td>
> >
> >               </tr>
> >
> >             </table><div></div><!-- Start: oracle.adf.Panel["_id5"]
> > --><div></div><!-- Start: oracle.adf.Panel["_id5"] --><div>
> >
> >               <hr class="x4q"><div class="x4s"></div><div
> > class="x4r"></div><div
> > class="x4t"></div></div><div></div></div><!--
Start:
> > oracle.adf.Panel["_id5"] --><div class="x4u"><div class="x4v"><span
> > class="x1a"></span><span class="x1b"></span><span
> > class="x1c"></span></div></div>
> >
> >       <input type="hidden" name="oracle.adf.faces.FORM" value="_id4"><span
> > id="__id4_Postscript"><input type="hidden"
> > name="oracle.adf.faces.STATE_TOKEN"
> > value="1caffdd1"><script>function __id4Validator(){return
> > true;}var
> > _id4_SF={};</script></span><script>_submitFormCheck();</script></form>
> >
> >   <!-- MYFACES JAVASCRIPT -->
> >
> >
> >
> > <script type="text/javascript"><!--
> >
> > function getScrolling() {
> >
> >     var x = 0; var y = 0;
> >
> >     if (self.pageXOffset || self.pageYOffset) {
> >
> >         x = self.pageXOffset;
> >
> >         y = self.pageYOffset;
> >
> >     } else if ((document.documentElement &&
> > document.documentElement.scrollLeft)||(document.documentElement
> > && document.documentElement.scrollTop)) {
> >
> >         x = document.documentElement.scrollLeft;
> >
> >         y = document.documentElement.scrollTop;
> >
> >     } else if (document.body) {
> >
> >         x = document.body.scrollLeft;
> >
> >         y = document.body.scrollTop;
> >
> >     }
> >
> >     return x + "," + y;
> >
> > }
> >
> >
> >
> > //--></script>
> >
> >
> >
> > </body>
> >
> >   <!-- Created by Oracle ADF Faces (ADF JavaServer Faces API -
> > ea20-SNAPSHOT/ADF JavaServer Faces Impl - ea20-SNAPSHOT), skin:trecs.basic
> > (trecsbasic) --></html>
> >
> >
> >
> >
> >
> > Facelets Debug Screen:
> >
> >
> >
> > Debug Output
> >
> > /pages/trecs.xhtml
> >
> > +- Component Tree
> >
> > <UIViewRoot locale="en" renderKitId="oracle.adf.core" rendered="true"
> > transient="false" viewId="/pages/trecs.xhtml">
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
> >
> > <HtmlHtml id="_id1" rendered="true" transient="false">
> >
> > <UIDebug hotkey="D" id="_id2" rendered="true" transient="true">
> >
> > <HtmlBody firstClickPassed="false" id="_id3" rendered="true"
> > transient="false">
> >
> > <CoreForm id="_id4" rendered="true" submitted="false" transient="false"
> > usesUpload="false">
> >
> > <CorePanelPage chromeType="compact" id="_id5"
> > menu1="CoreShowOneChoice[UINodeFacesBean, id=_id6]" messageType="none"
> > quickLinksShown="false" rendered="true" transient="false">
> >
> > menu1
> >
> > <CoreShowOneChoice accessKey="" alignment="center" id="_id6"
> position="top"
> > rendered="true" transient="false">
> >
> > <CoreShowDetailItem accessKey="" disabled="false" disclosed="false"
> > id="_id7" immediate="false" rendered="true" text="Item One"
> > transient="false">
> >
> > <CoreOutputText escape="true" id="_id8" rendered="true" transient="false"
> > truncateAt="0" value="Showing One"/>
> >
> > </CoreShowDetailItem>
> >
> > <CoreShowDetailItem accessKey="" disabled="false" disclosed="false"
> > id="_id9" immediate="false" rendered="true" text="Item Two"
> > transient="false">
> >
> > <CoreOutputText escape="true" id="_id10" rendered="true" transient="false"
> > truncateAt="0" value="Showing Two"/>
> >
> > </CoreShowDetailItem>
> >
> > </CoreShowOneChoice>
> >
> > </CorePanelPage>
> >
> > </CoreForm>
> >
> > </HtmlBody>
> >
> > </UIDebug>
> >
> > </HtmlHtml>
> >
> > </UIViewRoot>
> >
> > +- Scoped Variables
> >
> >
> > Request Parameters
> >
> >
> > Name
> >
> > Value
> >
> >
> > None
> >
> >
> >
> >
> > Request Attributes
> >
> >
> > Name
> >
> > Value
> > ...
> >
> > [Message clipped]
>
>
>

Mime
View raw message