voyent
Messages posted by: monkeyden  XML
Profile for monkeyden -> Messages posted by monkeyden [27] Go to Page: 1, 2 Next 
Author Message
DR#4
IE7
Incidentally, I'm using Seam 1.2.1, but I'm pretty sure this is a client side issue.

I haven't been able to reproduce this in any other browser, but there appears to be a an error in IE7 on line #2334 or #2335 of icefaces-d2d.js. Mildly helpful screen shot attached. It appears to happen pretty regularly, when clicking on a links, but I did notice that it doesn't happen for anchor links (within the same page).

I am also getting "window.logger is null or not an object". I'm pretty sure I've seen this on the forum and will go look for it but figured I'd mention it here while I'm on the JS topic.

Thanks for the insight
I was mistaken. AT/near the client side is changing this value. I suspect it has something to do with ICEFaces as I have stripped everything else out of it.
Aha! The value must not be in scope when the queued function is called. Passing the value directly from the Java side seems to work correctly.

JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(),
"initOptions('" + this.selectedStreets + "');");
That value shows as correct:

Code:
editStreetWatchForm:hiddenLocations=L.27304-Jay Drive|L.27337-Union Street|
 

I am also adding a javascript call on the server, to work with this value:

Code:
JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), "initOptions();");


Which currently just alerts the value:
Code:
 function initOptions(){
 	alert('hiddenLocations: ' + document.getElementById("editStreetWatchForm:hiddenLocations").value);
 
 }


But alas it's null in the alert.
FWIW, I have also proven, using a phase listener, that the value is correct until after RenderResponse. I have no JavaScript on the client which is modifying this value.
Even so, the values exist on the client when I change the dropdown. The setSelectedStreets mutator gets the correct value and the getSelectedStreets accessor returns the correct value. However, when I alert the value it after having changed the select box its empty.
In the following code, for some reason, after having selected the state dropdown, the setSelectedStreets method is called and the value of hiddenLocations is changing. Should this be happening with partialSubmit="true"? Thanks for the help. I happen to be using this with Seam (not sure if it's relevant).

Code:
<ice:form id="editStreetWatchForm">
             <ice:selectOneListbox id="state" value="#{streetWatchAction.selectedState}" 
                 valueChangeListener="#{streetWatchAction.updateTowns}"
                 size="1" styleClass="formElement" required="false" partialSubmit="true">
                 <f:selectItem itemValue="" itemLabel="" />
                 <f:selectItems value="#{statesServed}" />
             </ice:selectOneListbox>
                     
             <ice:inputHidden value="#{streetWatchAction.selectedStreets}" id="hiddenLocations"/>                        
         </ice:form>
DR4
I have a tab control which has a few tabs. Each of the tabs has it's set of fields, most of which are required. When I submit the values in tab index 2, tab index 0 is being validated by the default JSF required field validation. The result is that I get error messages for <ice:inputText/> elements of a tab that is not currently displayed. I was also surprised to learn that the tab control doesn't use D2D to inject only the elements of the selected tab into the DOM.

How do people get around this required field validation of the de-selected tab?
Where does this code live? I'd like to customize it.

Code:
<div style="margin-left: 30px; text-align: left; font-size: 14px; font-weight: bold;">
 	Network Connection Interrupted
 	<div style="font-size: 11px; margin-top: 7px; margin-bottom: 7px; font-weight: normal;">
 		To reconnect click the Reload button on the browser or click the button below
 	</div>
 </div>
I'd like to know this as well. Can ICEFaces developers chime in here? Is there any configurability to this popup at all?

In my estimation, there are two functions needed when the session expires and required objects are garbage collected. One, notify the user. Two, take them to some default page. You have the first part down (though I would like to use my own popup). I just need to know how to redirect, and if the presence of Seam has any impact on that.
Lest we get off topic, what I'm really looking for is an example which shows how this "subform" (i.e. panelPopup, like the ICEFaces dowload page) can coexist within the main page. I care not about the backing bean implementation which relates to your security policy.
None at all. In fact, it appears as though it's invoking my application. I'm just not sure where it's going.

Upgrading to DR#3 (eventually) is imperative for us, since we are using Seam and have often seen the issues resolved in DR#3. I just haven't had time to successfully do it yet. When I first tried I got an error saying "Session expired". Never progressed from there.
Ok, I'm using Seam here but I don't think that has any relevance to the fundamental question.

I have a main page:
Code:
 <ice:form id="panelForm" rendered='#{listing.globalListingId != null}'>
 ...
 	<s:link value="Contact Me" action="#{contactMe.openPopup}">
 		<f:param name="employeeId" value="#{listing.agents[0].employeeId}" />
 		<f:param name="propertyId" value="#{listing.idListing}" />
 	</s:link>
 	<ui:include src="/contactus/contactMe.xhtml"/>	
 ...	
 </ice:form>


which includes this file:

Code:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:ice="http://www.icesoft.com/icefaces/component">
                 
 <ice:panelPopup draggable="true" visible="#{contactMe.visible}" style="z-index: 1000; top: 30%; left: 10%; position: absolute; width: 510px; height: 600px;">
     <f:facet name="header">
         <ice:panelGrid width="100%" cellpadding="0" cellspacing="0" columns="2" style="text-align: left;">
             <ice:outputText style="color: #FFFFFF;" value="Contact Me"/>
             <ice:commandButton image="images/close.gif" action="#{contactMe.closePopup}" title="Close it"/>
         </ice:panelGrid>
     </f:facet>
     
     <f:facet name="body">
         <ice:panelGrid width="100%" cellpadding="0" cellspacing="0">
         <table border="0" bgcolor="white" width="482" cellpadding="0" cellspacing="0">
 		  <tr>
 		    <td><img src="images/spacer_trans.GIF" width="1" height="10"/></td>
 		  </tr>
 		  <tr>
 		    <td><img src="images/pop_head.gif" width="482" height="29"/></td>
 		  </tr>
 		  <tr>
 		    <td><img src="images/spacer_trans.GIF" width="1" height="10"/></td>
 		  </tr>
 		  <tr>
 		    <td valign="top">
 		      <table border="0" width="471" cellpadding="0" cellspacing="0">
 		        <tr>
 		        <td>
                   <table border="0" width="100%" cellpadding="0" cellspacing="0">                    
                     <tr>
             		  <td>
 			            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
 			                <tr>
 						        <td width="10"><img src="images/spacer_trans.GIF" border="0" width="10" height="5"/></td>
 						    </tr>
 			              	<tr>
 			                	<td class='tabText'><ice:outputText value="#{contactMe.sendTo}"/></td>
 			              	</tr>           
 			            </table>
 			          </td>
 			       </tr>
 			       <tr>
                       <td width="100%" height="16"><img src="images/subhead_message.gif" width="400" height="16" alt="Message"/></td>
                     </tr>
                     <tr bgcolor="#D8D2CC">
                       <td><img src="images/spacer_trans.GIF" alt="" width="1" height="1" border="0"/></td>
                     </tr>
                     <tr>
                       <td height="10"><img src="images/spacer_trans.GIF" border="0" width="1" height="10"/></td>
                     </tr> 
             		<tr> 
                       <td class='tabText'><ice:inputTextarea value="#{contactMe.message}" cols="80" rows="6" partialSubmit="true"
                    		style="width:400px;height:80px;overflow: auto;"/></td>
                     </tr>
                     
                     <tr>
                       <td height="20"><img src="images/spacer_trans.GIF" border="0" width="1" height="20" /></td>
                     </tr>
                     <tr>
                       <td>
                       <table border="0" cellpadding="2" cellspacing="2">
                         <tr>
                           <td width="120" align="left">*First Name</td>
                           <td><ice:inputText value="#{contactMe.firstname}" required="true"/></td>
           					  <td width="10"><img src="images/spacer_trans.GIF" border="0" width="10" height="1"/></td>
                          <td class="form-label">*Last Name</td>
                           <td><ice:inputText value="#{contactMe.lastname}" required="true"/></td>
                         </tr>                 
                         <tr>
                           <td width="120" align="left">*Email Address</td>
                           <td colspan="4"><ice:inputText value="#{contactMe.address}" required="true"/></td>
                         </tr>
                       </table>
                       </td>
                     </tr>
                     <tr>
 	                      <td height="10"><img src="images/spacer_trans.gif" border="0" width="1" height="10"/></td>
 	                </tr>
 					<tr>
 	                  <td colspan="5" align="right">
 	                  	<ice:commandButton value="SUBMIT" style="width:100px;" action="#{contactMe.send}" rendered="true"/>
 	                  </td>
 	                </tr>
 	                <tr>
 	                   <td height="20"><img src="images/spacer_trans.gif" border="0" width="1" height="20"/></td>
 	                </tr>
                  </table>
                </td> 
              </tr>
             </table>
           </td> 
         </tr>
         </table>         
         </ice:panelGrid>
     </f:facet>   
  </ice:panelPopup>
  </ui:composition>


The backing bean has:

Code:
private boolean visible = false;
 	   
 public boolean isVisible() { return visible; }
    
 public void setVisible(boolean visible) { this.visible = visible; }
 
 public String openPopup() {
 	String agentOffice = "Coldwell Banker Residential Brokerage - ";
      	employeeBO = (EmployeeBO) Component.getInstance("employeeBO");
    	if (employeeBO != null) {
    		EmployeeBase emp = (EmployeeBase) employeeBO.findByPrimaryKey(new Long(employeeId));
    		sendTo = emp.getFirstName()+" "+emp.getLastName()+", "+emp.getTitle();
    		Office off = emp.getOffice();
    		office = agentOffice + off.getName();
    		
    		if (!propertyId.equals("0")) {
 	   		regarding = "Listing MLS#"+propertyId;
 	   		regardingList = new ArrayList<SelectItem>();
 	   		regardingList.add(new SelectItem("listing", "A specific question about this listing: MLS#"+propertyId));
 	   		regardingList.add(new SelectItem("general", "A general question about buying or selling real estate"));
 	   		regardingList.add(new SelectItem("personal", "A personal message for "+emp.getFirstName()+" "+emp.getLastName()));
 	   	}
    	}
         visible = true;
 	return "success";
 }
 
 public String send() {
 	mailExample.send();
     	return "/contactus/contactMe_success.xhtml";
 }
 


As you can see at the end of the file containing panelPopup, there is a commandBUtton, which does not invoke the action to which it's tied (contactMe.send).

Code:
<ice:commandButton value="SUBMIT" style="width:100px;" action="#{contactMe.send}" rendered="true"/>
We have a requirement that calls for a panelPopup which will send an email. The functionality is very similar to the "LOGIN" functionality on the ICEFaces downloads page. The basic use case is:

  • An unauthenticated user loads the downloads page
  • Chooses a file to download by selecting the "LOGIN" button.
  • A pop up is displayed, which contains text fields allowing the user to provide credentials
  • User provides credentials
  • "LOGIN" button changes to "DOWNLOAD" and the user can download the file.

    Is this code available in an example somewhere? We were running into several issues with the submission of the data in the pop up before realizing that this example exists on the site.

    Thanks for any help.
  •  
    Profile for monkeyden -> Messages posted by monkeyden [27] Go to Page: 1, 2 Next 
    Go to:   
    Powered by JForum 2.1.7ice © JForum Team