[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: jmewes  XML
Profile for jmewes -> Messages posted by jmewes [16] Go to Page: 1, 2 Next 
Author Message
When I set a breakpoint at the end of the "PageBean#openModalPopup" method I am seeing the following values in my example project:

Code:
 pageBean.getActualRootExpression() : "#.popups.P0}"
 mp.getContentReplace() : "#{d.Dialog:#.popups.P0"
 


This looks quite different from the "DemoPopup" from the demo application (Section "Popup dialogs") which opens up the "DemoBudget" dialog:

Code:
 pageBean.getActualRootExpression() : "#{d.d_16.DemoPopup.popups.P0}"
 mp.getContentReplace() : "#{d.DemoBudget:#{d.d_16.DemoPopup.popups.P0"
 


To me it looks like the "Popup dialogs" example uses the same structure for the root expressions. What am I doing differently?
Hi Björn,

Can you please be a bit more specific?

I looked into the code with the debugger but have no clue what might be the problem.

https://pasteboard.co/Hcm8RDx.png

Actually the sample project above looks like the example in the documentation and the demo application to me. Even if I apply exactly the same code structure as in the demo application the same problem persists.



Code:
     public void onOpenDialog(ActionEvent actionEvent)
     {
         if (m_popup == null) {
 
             m_bean = new Dialog(getOwningDispatcher());
             m_bean.setLabel("New label");
 
             m_popup = openModalPopup(m_bean,"Hello World!",300,300, new ModalPopup.IModalPopupListener()
             {
                 public void reactOnPopupClosedByUser()
                 {
                     onClosePopup(null);
                 }
             });
         }
     }
 
The same steps can be applied with IntelliJ as well. Here is how the debugger can be started there:

- Open the menu item "Run > Edit configurations"
- Click on the "+" icon
- Add a "Remote" configuration
- Enter port 8000
- Appy and save
- Select the new configuration and start the debugger by clicking on the "Debug" icon
With those steps a remote debugger can be attached on MacOS / Eclipse:

(1) Start the Tomcat server in debug mode

Code:
 export JPDA_ADDRESS=8000
 export JPDA_TRANSPORT=dt_socket
 
 catalina.sh jpda run
 


(2) Set a breakpoint in the source code

(3) Create and launch a debug configuration

- Open the menu "Run > Debug configurations"
- Create a new configuration in the "Remote Java application section"
- Enter e.g. hostname "localhost" and port "8000"
- Start the debugging by clicking on the "Debug" button

(4) Trigger the breakpoint

Then open the application and navigate to the location of the breakpoint.
Now the debugger should kick in and enable stepping through the source code.


Also see
- https://blogs.mulesoft.com/dev/tomcat-tcat-server/debugging-your-tomcat-webapp-with-eclipse/
- http://www.captaincasademo.com/forum/posts/list/510.page
Hi,

In the "Tutorial - First Development Steps with CaptainCasa Enterprise Client" it is stated that "One page bean can open another one by simple calling the openModalPopup-method."

I tried to do this with the following code:

Code:
 Dialog d = new Dialog();
 d.setLabel("New label");
 d.setCloseDialogCallback(() -> closePopup(d));
 
 ModalPopup mp = openModalPopup(d, "Test", 300, 300, () -> closePopup(d));
 


(Complete example here: https://github.com/experimental-software/hello-captaincasa/tree/dialog)

It looks pretty much like the example in the Developer's Guide (p. 80) and the example code in the demo application. But instead of the text from the page bean the input field it shows "#.popups.P0.text}".

See https://pasteboard.co/Hao46lY.png

While the popup can be closed by clicking on the "x" the "onClose" action is not being called when clicking on the custom "Close" button.


Can you please help me to find out how to use page beans within dialogs?


Kind regards,

Jan

Enable the preference "Make projects automatically" in the "Compiler" section of the "Preferences" to try changes in the Java code immediately in the editor via hot deployment.

https://www.mkyong.com/intellij/intellij-idea-how-to-build-project-automatically/
The point when you need this is when you want to structure your page beans in different packages ....

fhuellmantel wrote:
Hello,

check http://www.captaincasa.com/pdf/eclnt_DevelopersGuide.pdf page 27:

The Dispatcher class that is referenced also was added to your project when creating the
project. Of course you can update the faces-config.xml to your needs, e.g. by moving the
Dispatcher-class into a different package then the one proposed! 


So check YourProject\webcontent\WEB-INF\faces-config.xml and chance it:

Code:
<managed-bean>
      <managed-bean-name>d</managed-bean-name>
      <managed-bean-class>managedbeans.Dispatcher</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>


BR 


Hi,

The "faces-config.xml" was already adjusted. The point is that when the "dispatcherinfo.xml" resides in the same directory as the Java code, it's configuration doesn't get applied. Maybe it is "common sense" to put it in the resources directory. However, it might be useful to point this out in the docs in order to make building an application with CaptainCasa as smooth as possible.
Hi,

In the Developer's Guide page 26 it is mentioned that the "dispatcherinfo.xml" need to be located in the same package as the Dispatcher:

Code:
 managedbeans                 <== Package
   Dispatcher 
   AddressDetailUI
   dispatcherinfo.xml
 


I tried to put it in the Java package but placing it here did not work out:
Code:
 /src/main/java/io/github/kschworkflows/Dispatcher.java
 /src/main/java/io/github/kschworkflows/dispatcherinfo.xml
 

After some time I successfully tried to put it here:
Code:
 /src/main/resources/io/github/kschworkflows/dispatcherinfo.xml
 


Maybe the documentation could be improved with a more detailed description where the "dispatcherinfo.xml" actually needs to reside.

Kind regards,

Jan
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
 
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
 
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

Wow, that was a fast answer ;)

Thanks.
Till then renaming the file in Eclipse and then using the menu item "File > Refresh" also works.
Hi,

It would be nice if it would be possible to rename a JSP file in the project editor. Currently it seems like I have to remove and re-create a file if I need to rename it.

See https://pasteboard.co/H5X6Ngo.png

Kind regards,

Jan
 
Profile for jmewes -> Messages posted by jmewes [16] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team