Messages posted by dustismo
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: dustismo  XML
Profile for dustismo -> Messages posted by dustismo [12]
Author Message
I ended up dropping Icefaces altogether and doing all custom javascript/ajax using ext.js..

best,
Dustin
Hi,

I am trying to implement a logger in my seam 1.2 + Icefaces 1.5.3 app. I would like to log the browser type that is accessing the site.

Code:
 HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
 
 String ip = request.getRemoteAddr();
 String browserType = ((HttpServletRequest)request).getHeader("user-agent");
 


This throws a nullpointer exception from com.icesoft.faces.env.ServletEnvironmentRequest..

Looking at the code from ServletEnvironmentRequest I noticed that the headers are initialized but then are set to null:
Code:
 
         [b]headers = new Hashtable();
         items = req.getHeaderNames();
         name = null;
         while (items.hasMoreElements()) {
             name = (String) items.nextElement();
             headers.put(name, req.getHeaders(name));
         }[/b]
 
         parameters = new Hashtable();
         items = req.getParameterNames();
         while (items.hasMoreElements()) {
             name = (String) items.nextElement();
             attributes.put(name, req.getParameterValues(name));
         }
 
         scheme = req.getScheme();
         serverName = req.getServerName();
         serverPort = req.getServerPort();
         locale = req.getLocale();
 
         locales = new Vector();
         items = req.getLocales();
         while (items.hasMoreElements()) {
             locales.add(items.nextElement());
         }
 
         isSecure = req.isSecure();
 
         //Copy servlet specific data
        [b] headers = null;[/b]
  


I tried removing the headers=null; part but then I get nullpointer exceptions from

Code:
 public String getHeader(String name) {
         Enumeration allProps = (Enumeration) headers.get(name);
         if (allProps.hasMoreElements()) {
             return (String) allProps.nextElement();
         }
         return null;
     }
 


Maybe I am doing something wrong, or is it a problem with the ServletEnvironmentRequest implementation?

thanks,
Dustin
In my experience, you should be wise about how you use ajax.. If a user expects to be able to use the back button and cant they will find the app extremely unusable. You are better off moving things into separate pages (at the expense of more data transfer). Use ajax for ui components, form validation etc, not for changing content.

-Dustin
Hmf.. Actually popup doesn't help at all.. (Unless there is some undocumented features of the popup)

The problem is that once the dropevent reaches my listener then I can't load a popup because I lose the dropevent (Since I have to wait on a confirm or cancel action from the user). I could cache the drop event and wait for the asynch ok or cancel events but this ends up be a nightmare with a session scoped bean. I want to be able to call the confirm dialog before the drop event is triggered -- or else have some kind of synchronous confirm dialog that I can call from within the drop listener (I tried this and I don't think it is possible, or would take some wizardry that I don't know about)

Not sure what the solution is, anyone have any help?

thanks,
Dustin
Hi,

I would like to be able to popup an alert or confirm dialog when an item is dropped on a drop target, if the user presses ok, then the action is performed, if not it is cancelled. Is this possible? How?

thanks,
Dustin
Hi,

Here is a problem I am having. The leafs on my tree are lazy loaded, and if I am idle for a few minutes and try to expand a node, the entire tree disappears! I can't get it back without logging out and back in. I can see the open close event is triggered on the server. No errors are thrown, it just disappears

I am using seam 1.1.6 and icefaces 1.5.3 (though I have been having the same problem for a few revisions of each)

thanks much,
Dustin
I would be interested in this component as well.
Hello,

I have been trying to use a menubar with seam (seam 1.1.0 & 1.1.1 - Icefaces 1.5.1 &1.5.2) and it throws massive stack traces when trying to passivate the thread. I is dying when trying to serialize a list of MenuItems.

Here is the class:

Code:
 @Stateful
 @Name("menuManager")
 @Scope(SESSION)
 public class MenuManagerBean implements MenuManager, java.io.Serializable {
       /**
 	* 
 	*/
 	private static final long serialVersionUID = 4289740177244369482L;
 
 	@Logger 
 	private Log log;
 	
     @In 
     FacesMessages facesMessages;
     
 //    @In @Out
 //    private User user;
     
     @PersistenceContext
     private EntityManager em;
     
     @Out
     private List<MenuItem> dataMenu;
     
     public MenuManagerBean(){}
     
     @Factory("dataMenu")
 	public void loadDataMenu() {
     	        dataMenu = new ArrayList<MenuItem>();
 		for (int i=0; i < 5; i++) {
 			MenuItem item = new MenuItem();
 	    	        item.setId("menuItem_" + i);
 			item.setLink("link-" + i + ".seam");
 			item.setValue("MenuItem-" + i);
 			dataMenu.add(item);
 		}
 	}
     
         @Remove @Destroy
         public void destroy() {}
 
 	public List<MenuItem> getDataMenu() {
 		return dataMenu;
 	}
 
 	public void setDataMenu(List<MenuItem> dataMenu) {
 		this.dataMenu = dataMenu;
 	}
 }	
 


and the jsf:

Code:
<!-- Data Nav -->
 <ice:form>
 	<ice:panelGroup>
 		<ice:menuBar orientation="horizontal">
 			<ice:menuItems value="#{dataMenu}" />
 		</ice:menuBar>
 	</ice:panelGroup>
 </ice:form>


I have also posted about this in the seam forums http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98969

Any help is appreciated,

Dustin
Philip,

Thanks for the quick response. That isn't exactly what I am talking about. I have drag and drop working fine in my tree (can drag from folder to folder). What I actually want is to have a 'drag handle'. This is supported by sriptaculous (is the backing for the icefaces drag and drop, correct?)

So this is what it would look like in scriptaculous:

Code:
 <div id="draggable">
 <span id=drag_handle"><img src="someimg.png"></span>
 <span id="content">
   <!-- Extended content that does not respond to mouse dragging -->
 </span>
 </div>
 <script>
 new Draggable('draggable', {scroll:window,
                        handle:'drag_handle',
 			revert:true,
 			ghost:true});
 </script>
 


I'm guessing from the documentation, that this is not supported in Icefaces, but I thought I would ask :)

thanks,
Dustin
Hello,

I am porting an existing app into Seam / icefaces. I would like to be able to have draggable elements that use a drag handle rather then have the entire object draggable. Specifically I want to use it inside a tree, where the leaf icon is draggable (and drags the icon + the label) and the label is clickable for a different action. How can I accomplish this in Icefaces?

thanks much,
Dustin
Hi,

I am working on porting an existing application to Seam/Icefaces and I am trying to do lazy loading on a tree structure (i.e. children are loaded via ajax call when the folder is expanded). Is this supported, if so, how do I do it? I read some previous posts that said support would be added in the next release (posts were 4 months old so I assume the next release has already happened)..

I also saw this post

http://www.icefaces.org/JForum/posts/list/1645.page

which suggested I follow this thread:

http://support.icesoft.com/jive/thread.jspa?forumID=15&threadID=1191

which I can't seem to access
You are not authorized to view this thread. 


Thanks for any help,
Dustin
I am trying to get the source code for the dynamic tree tutorial, the given link is broken:

http://facestutorials.icefaces.org/tutorial/tree-dynamic-tutorial.zip

also the link to the zip file from the section titled
Examples that Use Trees

points to http://facestutorials.icefaces.org/tutorial/tree-style-tutorial.zip
 
Profile for dustismo -> Messages posted by dustismo [12]
Go to:   
Powered by JForum 2.1.7ice © JForum Team