voyent
Messages posted by: edykory  XML
Profile for edykory -> Messages posted by edykory [319] Go to Page: Previous  1, 2, 3 ... , 20, 21, 22 Next 
Author Message
I'm not a pro on this subject, but I'll try to offer my opinion.
I think in general there should be no difference between adding Tomahawk to IceFaces, or IceFaces to Tomahawk.
In the end, you'll still have a web.xml and a faces-config.xml, and the application server will have no idea who was the first there :).
The docs you are looking for are two PDF files in the docs folder of the IceFaces zip file. I'll write here a short explanation, but it is by no mean exhaustive and if you have problems ... read the docs, man.
In general, to add IceFaces support to a MyFaces app you have to do the following:
In web.xml Replace the FacesServlet and the mappings with
Code:
   <servlet>
      <servlet-name>Main Dispatch Servlet</servlet-name>
        <servlet-class>com.icesoft.faces.webapp.http.servlet.MainServlet</servlet-class>
      <load-on-startup> 1 </load-on-startup>
    </servlet>
 
    <servlet-mapping>
      <servlet-name>Main Dispatch Servlet</servlet-name>
      <url-pattern>/xmlhttp/*</url-pattern>
    </servlet-mapping>
 
    <servlet-mapping>
      <servlet-name>Main Dispatch Servlet</servlet-name>
      <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
 
    <!-- blocking request Mapping -->
    <servlet-mapping>
      <servlet-name>Main Dispatch Servlet</servlet-name>
      <url-pattern>/block/*</url-pattern>
    </servlet-mapping>
 

Starting with IceFaces 1.6DR1 add also
Code:
   <listener>        
     <listener-class>
       com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Listener
     </listener-class>
   </listener>
 

Well, that would be all, I guess (I never made this kind of change, so it's just an opinion).
This is in case you're not using Facelets (for Facelets read the docs / samples / Timezone tutorials).
The jars you need and many other things are described in IceFaces_GettingStarted.PDF.
backport-util-concurrent.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload-1.0.jar
commons-logging.jar
commons-logging-api.jar
el-api.jar
icefaces.jar
icefaces-comps.jar
xercesImpl.jar
xml-apis.jar

One last piece of advice. You have to invest some time in studying and understanding how IceFaces work. You have docs, you have samples, you have the source code ... so ...enjoy your lecture.

Good luck
Oh.... by the way ... keep in mind that if you're navigating back to the first page using browser's back button, the browser might just show a cached version of the first page. The right test would be:
[list]PageA has a link to PageB.
PageB has a link to PageA.
[/list]
if both use request scoped beans, then when you get to PageA, beanA si created ... you get to PageB, beanB is created .... you go to pageA (through the link, not back button), another beanA is created.
In Faces in general using browser back buttons is quite error prone and not recommended.

waiting for news and that project :)
Please post some minimal project which reproduces this behavior, otherwise ... we are talking in vain.
Still, please keep in mind that I'm working now on an application (I'm not IceFaces stuff) which uses lots (and I really mean lots) of beans in all scopes (application, session, request) ... and they all behave as expected. So my best guess is that you're both doing something wrong (I hope I'm not not offending anybody here).
Once again ... please submit some minimal project with those two pages and the bean and I'll have a look on that.
Good luck
It's correct.
But now are you sure you're accessing this bean only on the page you want?
If you access it on the "first page" in the application, the bean will also be created at that time...
And standardRequestScope is not something you usually want to use.. since it will use the real "http" meaning of the request. That is the bean will be recreated at each trip between the client browser and the server (also during partial submits and stuff).
You should maybe post a minimal project which reproduces this error, as things may be wrong somewhere else.

Good luck and have a nice weekend :)
You don't need to download anything else.
Please read the documentation, they explain the required configurations (the 2 PDF files in the docs folder).
One thing I want to mention is that it's highly recommended that you use icefacelets instead of sun facelets (I don't know if it's still true at the moment), but it's better for your health.

Good luck and enjoy your lecture.
Also watch the samples (Timezone tutorials, they help a lot).
Sorry to disappoint you, but in general, requestScope works as expected. With normal setup (without standardRequestScope set to true), the request Scope lasts from the moment you enter a page untill you leave that page (by navigating to a different one). So it doesn't disappear because of a new request, if the browser remains on the same page (as is usually done in treating actions, listeners, etc).
About beans created as soon as the application starts ... I don't know man, you're doing something wrong I guess. Try to see if you don't access one of the beans properties from the start page (since that WILL create your bean, even if that's not the wanted behavior).
Beans are not associated with a particular page, so if one bean has requestScope it will be created by the first page which tries to access any of its field. Then, if you navigate to another page which uses the same bean, the initial bean will be garbage collected and recreated for this second page. The bean will survive only if you treat some action on this page and STAY on this page (this is extended request scope as I understand it).
Hope this helps, and good luck
Hi there!
I'm back with to report another "feature". Imagine a search form with a selectInputDate, some other edit controls and a submit button.
My problem is that when I'm on some edit control and press Enter, instead of submitting I get the selectInputDate showing its popup ... and I really don't want that.

Is there any workaround for this kind of behaviour?
Thanx friends!
sorry for the previous post ... it looks like some of my code was converted :)
So here it is again as code (without changes).
===================================
Hi!
I don't know if you found an answer to your question yet.
Anyway ... because of using Facelets (not because of icefaces) most of the
"&xxxx;" entities have to be written as "&amp;xxxx;". But I don't know if all of them.
So, for example, instead of &nbsp; (space) use &amp;nbsp;.
Also, because xhtml files have to be correct xhtml files, if you have any javascript code where you use things like "x < y" (in a while for example) you have to change it to x &lt; y.
Do it and it works; another way to solve this is to move your javascript code in an external js file and include it via <script src="......." />
Have fun!
Hi!
I don't know if you found an answer to your question yet.
Anyway ... because of using Facelets (not because of icefaces) most of the
"&xxxx;" entities have to be written as "&xxxx;". But I don't know if all of them.
So, for example, instead of   (space) use &nbsp;.
Also, because xhtml files have to be correct xhtml files, if you have any javascript code where you use things like "x < y" (in a while for example) you have to change it to x < y.
Do it and it works; another way to solve this is to move your javascript code in an external js file and include it via <script src="......." />
Have fun!
Hi again!
I took a look at the sources ... and the situation looks a little bit disappointing...

After going through the convertNumber you get a Number (pretty logic). But this conversion make the stupidity of ignoring the wrong trailing chars ...
Then ... the LongRage validator doesn't do anymore format validation, it just calls the doubleValue on this Number and compares to its min and max ...
So ... the LongRangeValidator will consider the Double 3.5 as being in the range 0..6, even if it's not even a Long.

Another "feature" ....
Hi guys!
I know this is not really an IceFaces question ... but I'm using Icefaces now and you've been the most responsive forum I've ever seen.
Want I want to do is to have an input field which accepts only integer values and at the same time formats it with "," group separator.
My bean value is of time Number and in the page I put
Code:
  <h:inputText value="#{declaratiePFABean.venitNet}"
          styleClass="inputNumber" size="18" maxlength="16"
          required="true" id="Venit_Net_Brut">
      <f:validateLongRange minimum="0" maximum="9999999999" />
      <f:convertNumber pattern="#,###" />
   </h:inputText>
 

The problem is that with this validation double values are rounded and trailing chars are ignored .... so even an 3.6aa is accepted as 4.
Does anyone no how can i force integer validation and at the same time use "," grouping?
10x a lot.
Hi, i don't know when will be released the next production version of IceFaces. I had the same problem and the way to fix it is as follows

Download the Ice Faces sources and unpack it somewhere.
Download Ant 1.6.5 or later and install it according to docs.
Edit core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java
and comment
Code:
 if (currentValue instanceof String) {
     return (String) currentValue;
 }
 

(line 217)
save and rebuild
now use the newly built icefaces.jar and icefaces-comps.jar

Good luck
I checked and yes, breaking the initial form in more forms does the job. My only question now is how to synchronize all the submits on a submit button. I know that ice faces adds some javascript stuff, and I want to do the thing in the right way, not just in a way that works for someone.
Hi again!
I'm working on an application where I have to put in one form lots (about 250) controls. On just a couple of them i have to make some logic on the server, and this doesn't depend on the values of the other fields. Is it possible in any way to force a partialSubmit on just one field, as submitting 250 fields each time is a little bit unrealistic.
A solution could be (I think) to break the big form in more forms, but how can I then synchronize the submit of all forms on a push of a button?

Thanx a lot!
hi again, thanx for being so fast.
Still I cannot imagine why would someone need such a "feature". Another problem is that if I put the selectInputDate in a table (or panelGrid) it renders the popup not under the edit control, but one line below (because of the <br>). If that's also a "feature" ... fine with me.

Once again, thanx a lot for the support.
 
Profile for edykory -> Messages posted by edykory [319] Go to Page: Previous  1, 2, 3 ... , 20, 21, 22 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team