| Author |
Message |
|
|
Hello I wonder if there is any best practices on how to use page fragments in the netbeans plugin?
Why cannot I add a page fragment box to for example a paneltab ?
It is placed beside it in a div which cannot be dragged into the panel.
// Mikael
|
 |
|
|
I would like to have some text displayed for a map marker, how can i do this.
As it is now I add GMapLatLng to the point list I display as described in the example code:
Code:
GMapLatLng tmp = new GMapLatLng();
tmp.setLatitude(Double.toString(pos.getLatitude()));
tmp.setLongitude(Double.toString(pos.getLongitude()));
points.add(tmp);
Is there another object like GMapLatLng but also containing text to be displayed for the marker ?
// Mikael
|
 |
|
|
Hello,
Has anyone been able to have a datatable to fill an entire panel (for instance the left panel in a divider.
I have set the width & height to 100% each, but It still doesn't fill the entire panel group in my panel divider.
// Mikael
|
 |
|
|
Thanks for the tip, unfortunately I still get an Error in design view.
panelMain: String index out of range: 0
When I added the following code at the top of my function:
Code:
if(Beans.isDesignTime()){
return "panelTagBtns";
}
And one of the panels I display in the stack panel is the panle with name panelTagBtns.
// Mikael
|
 |
|
|
Hi,
Yes I have this function in ther Page1 class (see code below).
Do I have to return a default value somehow for the designer to be able to display anything in the design view ?
Code:
public String getViewButtonStackPanelName() {
String panelName = getPanelTagBtns().getId(); // Default we display the Tag buttons
if (getSelectedMemberRequestBean().getSelectedMember() != null) {
// A member is selected
if (editingMember) {
// We are editing the member -> display the store cancel buttons
panelName = getPanelStoreCancelMemberBtns().getId();
} else {
// We are NOT editing the member -> display the Member buttons
List<SelectableLabelValueObject> selectedMembers = getMembersBean().getSelectedMembers();
if (selectedMembers.size() > 0) {
// At least one item is selected
if (selectedMembers.size() == 1) {
System.out.println("One member selected");
getBtnEditMember().setDisabled(false);
getBtnDeleteMember().setDisabled(false);
panelName = getPanelMemberBtns().getId();
} else {
System.out.println("More than one member selected");
getBtnEditMember().setDisabled(true);
getBtnDeleteMember().setDisabled(false);
panelName = getPanelMemberBtns().getId();
}
} else {
System.out.println("No member selected");
panelName = getPanelTagBtns().getId();
}
}
} else if (getSelectedTagRequestBean().getSelectedTag() != null) {
// A Tag is selected
if (editingTag) {
// We are editing the member -> display the store cancel buttons
panelName = getPanelStoreCancelTagBtns().getId();
} else {
// We are NOT editing the member -> display the Member buttons
panelName = getPanelTagBtns().getId();
OrganizationTag tag = getSelectedTagRequestBean().getSelectedTag();
if (gettagBeans$OrganizationTagsRequestBean().isAllTag(tag)) {
// The all tag has been selected -> disable the Edit & Delete buttons.
getBtnEditTag().setDisabled(true);
getBtnDeleteTag().setDisabled(true);
} else {
// The selected Tag is NOT the ALL tag -> enable the Edit & Delete buttons.
getBtnEditTag().setDisabled(false);
getBtnDeleteTag().setDisabled(false);
}
}
}
System.out.println("### Panel = " + panelName);
return panelName;
}
// Mikael
|
 |
|
|
Hello,
I am using the Panel stack to display different pages depending on what I am doing in the page.
Thus far I have controlled the Panel to be displayed in the code which works fine.
I would like to use a bean function to change to the correct display.
I tried this by setting the selectedPanel member to a bean function using the Netbeans integration, but then the IDE gave the the following error:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:687)
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:557)
at com.icesoft.faces.component.custom.renderkit.dt.renderer.PanelStackRenderer.encodeChildren(PanelStackRenderer.java:80)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeParentAndChildren(GridRenderer.java:70)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeChildren(GridRenderer.java:194)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeParentAndChildren(GridRenderer.java:70)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeChildren(GridRenderer.java:194)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeParentAndChildren(GridRenderer.java:70)
at com.icesoft.faces.component.ext.renderkit.dt.renderer.GridRenderer.encodeChildren(GridRenderer.java:194)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1303)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:1106)
at org.netbeans.modules.visualweb.insync.faces.FacesPageUnit.renderHtml(FacesPageUnit.java:1670)
at org.netbeans.modules.visualweb.designer.jsf.JsfForm.renderMarkupDesignBean(JsfForm.java:2840)
at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processUpdate(DomSynchronizer.java:930)
at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.processUpdates(DomSynchronizer.java:751)
at org.netbeans.modules.visualweb.designer.jsf.DomSynchronizer.run(DomSynchronizer.java:696)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
I can se that the selectedPanel member variable was set correctly to
#{Page1.viewButtonStackPanelName}, but the page cannot be displayed in the WYSIWYG Netbeans editor any longer.
The function does get called correctly doing it this way.
I also tried to keep the default binding (so that the page gets displayed correctly in Netbeans) and set the selectePanel member in the code instead.
I did this by adding this:
Code:
getPanelStackMemberBtns().setSelectedPanel("#{Page1.viewButtonStackPanelName}");
to the prerender() function in the code (I also tried the constructor & the Init-function, but it seems that the mamber variabel gets overwritten then).
Adding the code to the prerender function does set the variabel but the function Page1.getViewButtonStackPanelName never gets called.
Does anyone know how to get this to work ?
Preferably with the Netbeans WYSIWYG functionality still working ?
I am using Netbeans 6.0.1 & IceFaces 1.7 & The 1.7 Netbeans integration.
// Mikael
|
 |
|
|
I tested to copy the files as I said in the previous post & now it works as expected, thanks for all help on this issue :-)
So the "bug" was that we used a to old version of the lib.
// Mikael
|
 |
|
|
Hi again,
Am I correct if I assume that I should copy all jar-files from:
C:\tmp\ICEfaces-1.7.0-RC1-bin\icefaces\lib
to:
C:\Users\Mikael\.netbeans\6.0\modules\ext\icefaces\icefaces-1.7.0
if my username is Mikael & I unzipped the downloaded ICEfaces-1.7.0-RC1-bin.zip in c:\tmp ?
// Mikael
|
 |
|
|
Hi Michael,
That sounds like great news :)
A newbie question though.
I have only installed the Netbeans integration right off before.
How do I change the binaries ?
Should I
- Unload the Netbeans integration & reinstall a new one (but I cannot find any newer version of ICEfaces-v1.7.0-RC1-NetBeans.zip 20/3)
or
- Download a new version of ICEfaces-1.7.0-RC1-bin.zip and copy the icefaces libs to somewhere within Netbeans (or is it sufficient to just copy them to Glassfish) ?
I found the following icefaces jars in the lib dir:
- icefaces
- icefaces-ahs
- icefaces-comps
- icefaces-facelets
are there any more jars I should replace in this case ?
Thanks for all your help !
// Mikael
|
 |
|
|
Hi Davisoski,
I tested Michael's war file on my Tomcat 6.0.16 & it worked fine without any modifications.
// Mikael
|
 |
|
|
Hello Frank,
Today I have made a new project testing this problem.
I took a screenshot of every step, which I attached here.
I also attach the Netbeans project.
After building the app I did the following steps:
Action: Clicked on row 2
Output:
Row '1' selection: true
Action: Clicked on button
Output:
Row '1' selection: true
btn pressed
Action: Clicked on row 2
Output:
Row '2' selection: true
Action: Clicked on button
Output:
Row '2' selection: true
btn pressed
The problem is that I only want the output btn pressed when I click the button.
I am using:
- Netbeans 6.0.1 with the latest patches (Build: 200801291616)
- IceFaces project integration 3.0.0.2.1.1
- IceFaces runtime lib 1.7.0.1
- Java 1.6.0_05
- Windows Vista (but my collegue which also gets the same problem is running XP)
- Tomcat 6.0.16 (fresh download with nothing extra installed, also tested with Glassfish V2)
The strange thing is that the error does not occur with the war file posted by Michael Thiem, but in our project & the 4 test projects me & my collegue have made for this thread.
// Mikael
|
 |
|
|
Hello Frank,
The last project I uploaded WebApplication1.zip is just that, a brand new project created only containing a newly created page with one data table & one button.
This is a Netbeans 6.0.1 project for Tomcat.
The project in a post above that TestWebApp.zip is also a new project created with an equal page also created in Netbeans but for the Glassfish V2 app srv.
For both projects I have only:
- created a new project using the IceFaces 1.7 Beta Netbeans integration
- added the Data table & button on the page created automatically by the IceFaces integration wizard.
- added a Rowselector to the data table
- double clicked on the button creating an action listener for this.
- add one System.out.println for each of these 2 callback functions. (rowselection & button click functions).
Thanks for all the help.
// Mikael
|
 |
|
|
Hello Michael,
I tried your WAR-file and it worked fine :)
So I thought maybe this is a Glassfish-problem.
So then I created a new Tomcat project in Netbeans, added a new page with a Data table & button. But this has the same error as well.
So maybe this could be a Netbeans problem ?
I attached the project & the WAR-file so that you can compare with the code you created if Netbeans has done anything other than you IDE ?
The project is done with the 1.7 Beta Netbeans integration.
// Mikael
|
 |
|
|
Hello Michael,
Thanks for your reply,
My test environment id:
- Glassfish App srv V2
- ICEfaces 1.7.0 Beta-1
- Firefox 2.0 and IE6
So I guess this could be a Glassfish problem.
I tried to use our Tomcat 6.0.10, but get the following error with you war-file:
HTTP Status 500 -
------------------------------------------------------------------------
*type* Exception report
*message*
*description* _The server encountered an internal error () that prevented it from fulfilling this request._
*exception*
com.sun.rave.web.ui.appbase.ApplicationException: Can't parse stream for /Page1.jsp loader constraints violated when linking javax/el/ELContext class
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:567)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:300)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
*root cause*
javax.faces.FacesException: Can't parse stream for /Page1.jsp loader constraints violated when linking javax/el/ELContext class
com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:503)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:161)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:30)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:48)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:105)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:37)
com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
*root cause*
java.lang.LinkageError: loader constraints violated when linking javax/el/ELContext class
com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:109)
com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:161)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:30)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:48)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:105)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:37)
com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
*note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs._
Do I have to have any other jar in the lib directory in the Tomcat for this to work ?
// Mikael
|
 |
|
|
Hi Michael,
I attached a project & the war-file (zipped).
It only contains one page with no external dependencies.
The only page is found at http://localhost:8080/TestWebApp/Page1.iface
As you can see in the output the row selector is called as well when the button is pressed.
If you first click on a row in the data table (not the last item) and then a button, the following should be visible in the log for each press on the button:
Code:
Row '3' pressed, selection: true
Button pressed
but it should display this:
Code:
We are using ICEFaces 1.7 Beta.
Thanks for any input :)
// Mikael
|
 |
|
|