Messages posted by mentos
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: mentos  XML
Profile for mentos -> Messages posted by mentos [16] Go to Page: 1, 2 Next 
Author Message
Not yet. But we would be interessted in a solution to this.
The sourcecode is part of the ICEfaces-EE-2.0.0.GA-src.zip package which you downloaded. Look for the samples folder in the .zip file.
Try "&" instead of the "&". "&" is interpreted and replaced with "&" by JSF. I had this problem with   which I had to write as  

Jürgen
After restarting the IDE and "clean & build" it works.

Juergen


Hello,

I created my icefaces project from scratch using the option "new JSF project with Icefaces". Everything works well with the first page.

Now I would like to add a second page. From the "File" menu I used the option "New Item" with "Web Pages" and "Page" to create a new page.

I changed the beginning of the jsp code so that it looks like the first page that I created:

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:bp="http://java.sun.com/blueprints/ui/14" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=iso-8859-1" pageEncoding="UTF-8"/>
 


Now when using a link from the first page to the second page I get an execption Code:
Exception Details:  java.lang.ClassNotFoundException
 icefacewebapplication1.Familienreisebuero


But in the Java code there exists:

package icefacewebapplication1;

import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Form;
import com.sun.rave.web.ui.component.Head;
import com.sun.rave.web.ui.component.Html;
import com.sun.rave.web.ui.component.Link;
import com.sun.rave.web.ui.component.Page;
import javax.faces.FacesException;
import com.sun.rave.web.ui.component.Script;
import com.icesoft.faces.component.style.OutputStyle;

/**
* <p>Page bean that corresponds to a similarly named JSP page. This
* class contains component definitions (and initialization code) for
* all components that you have defined on this page, as well as
* lifecycle methods and event handlers where you may add behavior
* to respond to incoming events.</p>
*/
public class Familienreisebuero extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int __placeholder;

/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}

private Page page1 = new Page();

public Page getPage1() {
return page1;
}

public void setPage1(Page p) {
this.page1 = p;
}

private Html html1 = new Html();

public Html getHtml1() {
return html1;
}

public void setHtml1(Html h) {
this.html1 = h;
}

private Head head1 = new Head();

public Head getHead1() {
return head1;
}

public void setHead1(Head h) {
this.head1 = h;
}

private Body body1 = new Body();

public Body getBody1() {
return body1;
}

public void setBody1(Body b) {
this.body1 = b;
}

private Form form1 = new Form();

public Form getForm1() {
return form1;
}

public void setForm1(Form f) {
this.form1 = f;
}

private Script swf1 = new Script();

public Script getSwf1() {
return swf1;
}

public void setSwf1(Script s) {
this.swf1 = s;
}

private Script flash1 = new Script();

public Script getFlash1() {
return flash1;
}

public void setFlash1(Script s) {
this.flash1 = s;
}

private OutputStyle design1 = new OutputStyle();

public OutputStyle getDesign1() {
return design1;
}

public void setDesign1(OutputStyle os) {
this.design1 = os;
}

private OutputStyle iceStyle2 = new OutputStyle();

public OutputStyle getIceStyle2() {
return iceStyle2;
}

public void setIceStyle2(OutputStyle os) {
this.iceStyle2 = os;
}

// </editor-fold>


/**
* <p>Construct a new Page bean instance.</p>
*/
public Familienreisebuero() {
}
 


Is there a special wizard to create new pages?
What did I do wrong?

Jürgen
Hello,

I "solved" this issue now for me by doing what I proposed in my last posting above: I took the Flash Component out of the DataTable and initiate changes of the contents in the Flash Component via the ExternalInterface of Flash. The Flash Actionscript callbacks I call using the method com.icesoft.faces.context.effects.JavascriptContext.addJavascriptCall. It works.
If somebody needs more detailed instructions to do the same, I am willing to help.

Yes the js is getting overwritten, because new elements are inserted and the old ones removed.
The id's of elements in the table look like id="form1:dataTable2:0:myelement" for the first row.
The next row (which is in my case the next page of the table with pagination turned on) the "same" element has the id="form1:dataTable2:1:myelement".

Jürgen
I found the (presumed) reason for the problem on this page:
http://www.howtocreate.co.uk/loadingExternalData.html

Even many DOM capable browsers will not run the contents of a script element that is is created using DOM methods after the page has loaded. The only way that JavaScript will reliably run a script is if the script is embedded in the page directly or via an external script file, while the page is loading. 


If this is true, and all my tests seem to confirm this, then I have ot find a totally different way to solve this problem.

I will try to put the Flash Component outside the DataTable, so that it is loaded only once. And then I'll use the ExternalInterface Methods of Flash to change the contents of the Flash Component.

Jürgen
I have not yet solved this. But advanced a small step:

The problem has to do with the element including the flash. When we use the buttons to navigate then this element gets overwritten. But with a new element which contains the same Javascript code.

The question is, why is the Javascript code executed the first time the page is rendered and not when there are incremental changes?
OR
Is there a way to indicate ICEfaces to execute the Javascript code when doing any change on the page?

Has anybody an idea?

Jürgen
Hello,

we have embedded in a ice:dataTable an ice:panelGrid which includes a flash component showing a nice slideshow. We use the SWFObject to embed the SWF.
Next to the slideshow we use an ice:outputText component explaining the pictures shown in the slideshow. The dataTable has pageing buttons.
After loading of the page for the first time everything is fine.
The correct text for the first slideshow is shown.
Using the pagination buttons allows to navigate within the dataTable results. But the slideshow disapears after the first click on the navigation buttons of the dataTable.

Somehow the loading of the flash component only works for the first result.
The code for embedding the flash component looks like:
Code:
<ice:panelGrid binding="#{Familienreisen.panelGrid4}" columns="1" id="panelGrid4" style="border-width: 0px; width: 600px">
     <div id="hotelbilder" style="width: 700px; height: 500px; position: relative">
         <ui:script type="text/javascript">                
 var so = new SWFObject("/famrbka/resources/slideshow.swf", "hb", "700", "500", "8", "");
         so.addParam("quality", "high");
         so.addParam("base", ".");
         so.addParam("loop", "false");
         so.addParam("wmode", "transparent");
         so.addVariable("xmlfile", "hb4.xml");                                                                       
         so.write("hotelbilder");
         </ui:script>
     </div>
     <ice:outputText binding="#{Familienreisen.desc}" escape="false" id="desc" style="text-align: left" value="#{SessionBean1.mainText}"/>
 </ice:panelGrid>
 

Has anybody done something similar before?
Any idea or best practice?

Kind regards,

Jürgen
And the other two images...

Kind regards,

Jürgen
Hello,

now I created (using http://stuff.mit.edu/tweb/map.html) the set of four images with transparent background and inserted them into my project as replacement for the original ones.
And only now I realized that the gif´s are used as background images!
So they are still displayed with white background... even when they are transparent, as they replace the background color and background image of our project at the location where they are displayed.

I think the proper solution would be to use standard HTML images instead of CSS background-images for the component.
Is there any good reason why there are CSS background-images?

Anyway, please find attached to this posting the set of four images of the XP style now with transparent background.

Meanwhile I`ll try to change the component to html images.

Kind Regards,

Jürgen
Hello Philip,

yes. I understood this.

My question was wether anybody here has already created the gif`s with a transparent background so that I could use these.
If not, I`ll try to do this (I am not a designer or graphics expert...). If I succeed I am willing to share the result with everybody here. :-)

Kind Regards,

Jürgen
Hello,

the gif images provided with the Connection Status Component have a white background. Our designer created a website with a different background.
So we now have a Connection Status Component in a "white box" on the colored background.

Has anybody yet stripped the gif`s of their background and created some with a transparent background?

Kind regards,

Jürgen
I found a solution in the documentation of the RowSet Interface.
The method first() returns false, if there are no rows in the RowSet.
This is inherited by the CachedRowSet.

So I use this line of code below determine what to display.
Code:
 boolean b = dataTable1Model.getCachedRowSet().first();
 


Regards,

Jürgen
Hi Philip,

thanks for your help. I tried your Code and it works in most cases.

Unfortunately I am using a CachedRowSet (delivered with Sun's JSC2 Update1) as dataModel. In this case rowCount always returns -1. This is in sync with the documentation.

I tried some workarounds like using isRowAvailable, which always returns false for me and using getRows, which always returns at least 1, even if the rowset is empty. A bit counter intuitive. :-(

But the problem seems to be drifting away from ICEfaces.

If I get it solved somehow, I'll report it here.
I also might give up on the CachedRowSet and use a RowSet. But I fear this will hit overall performance.

Regards,

Jürgen
Hello,

I could'nt find anything about this in the documentation or in the forums, but should be quite a common problem.

If the underlying rowset of a dataTable component is empty, I would like to present a message or picture to the user explaining why there is no data.

How do I do this?

Any help or hint is greatly appreciated,

Jürgen
 
Profile for mentos -> Messages posted by mentos [16] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team