[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
What is the difference between "rowpagebeeninclude" and "pagebeaninclude"?  XML
Forum Index -> Development
Author Message
jmewes

Active

Joined: 19/11/2017 06:20:00
Messages: 16
Offline

Hi,

On trying to build an application skeleton with nested page beans I stumbled upon the following situation:

This works, the "ActivityFrameBean" is rendered with the page bean specified in the "activity" field:

Code:
 <!-- ========== CONTENT BEGIN ========== -->
 <f:view>
   <h:form>
     <f:subview id="common_activity-frameg_sv">
       <t:rowbodypane id="g_1">
         <t:rowpagebeaninclude id="g_12" pagebeanbinding="#{d.ActivityFrameBean.activity}"/>
       </t:rowbodypane>
     </f:subview>
   </h:form>
 </f:view>
 <!-- ========== CONTENT END ========== -->
 



This doesn't work, the page bean from the "activity" field is not rendered:
Code:
 <!-- ========== CONTENT BEGIN ========== -->
 <f:view>
   <h:form>
     <f:subview id="common_activity-frameg_sv">
       <t:rowbodypane id="g_1">
         <t:row id="g_2">
           <t:coldistance id="g_3" width="100"/>
           <t:pagebeaninclude id="g_4" pagebeanbinding="#{d.ActivityFrameBean.activity}"/>
         </t:row>
       </t:rowbodypane>
     </f:subview>
   </h:form>
 </f:view>
  <!-- ========== CONTENT END ========== -->
 


Can you please tell me the difference between "rowpagebeeninclude" and "pagebeaninclude"? What do I need to do to get the "pagebeaninclude" working?


Kind regards,

Jan

[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,

you can use PAGEBEANINCLUDE, but then there must be exactly one ROW-rootnode in the included page, otherwise you receive the message in the log:

Code:
 java.lang.Error: Within a t:pagebeaninclude only exactly one t:row element is allowed as top element.
 In your case there is more than one t:row element within the page definition.
 The current page info is: /c136_inner.jsp//#{d.C136_Innter.:#{d.C136.innerUI.//null
         at org.eclnt.jsfserver.elements.impl.ROWINCLUDEComponent$IncludeParser.startElement(ROWINCLUDEComponent.java:211)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
 


So you must create the page in the editor like:

Code:
 ROW
     PANE
         ...
     ...
 


Background: if the page is included in the including page then the root-ROW is removed internally, so that the content fits.

Example:

Code:
 Including page:
 ....
     ROW
          PAGEBEANINCLUDE ...
 
 Included page:
  ROW
     PANE
     ...
     ...
    
 Result:
 
 ....
     ROW (including page)
         PANE (included page)
         ... (included page) 
 ...
 


Without removing the root-ROW, things would not match (ROW>ROW>PANE).

Regards, Björn

Björn Müller, CaptainCasa GmbH
jmewes

Active

Joined: 19/11/2017 06:20:00
Messages: 16
Offline

Thanks Björn!

I am happy that this deep nesting is possible and that it seems like the page structure from our mockup is possible


But from which log file did you get this error message? I cannot find it in those:

Code:
 /usr/local/tomcat/logs/manager.2018-02-05.log
 /usr/local/tomcat/logs/catalina.2018-02-05.log
 /usr/local/tomcat/logs/localhost.2018-02-05.log
 /usr/local/tomcat/logs/host-manager.2018-02-05.log
 
[WWW]
jmewes

Active

Joined: 19/11/2017 06:20:00
Messages: 16
Offline

The errors in this file look similar, so I guess it need to look here next time:

Code:
 /usr/local/tomcat/logs/localhost.2018-02-05.log
 
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,
log files are written into the servlet-temp directory, that is provided by servlet container. The interface that according to servlet-spec must be provided by servlet containers is:

Code:
             File f = (File)servletContext.getAttribute("javax.servlet.context.tempdir");
 


With Tomcat this is /tomcat/works/Catalina/localhost/<nameOfWebApp>.

The logging can be configured by using "webcontent/eclntjsfserver/config/logging.xml" which also can be edited in the toolset ("Configuration" below project selection).

Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team