Hi, I have replicated the problem with the following code. There are three files below an xhtml, a java and a js file.
As you can see I call the iceSubmitPartial function manually.
The postconstruct method is called if a selectInputDate is placed inside a tooltip and poup calendar button is pressed.
I've also found if you put a displaylistener on a panelTooltip the postconstruct method is called.
test.xhtml
[
<ice:form id="frmIndex1">
<ice:panelGrid>
<ice:panelGroup id="divIntelText" onmouseup="setSelectedText();" style="width: 630px; height: 350px; overflow: auto; border-style: solid; border-width: 1px; border-color: #D9D9D9;">
<f:verbatim>
#
{testBean.bodyText}
</f:verbatim>
</ice:panelGroup>
<ice:inputText id="txtSelected"
value="#
{testBean.selectedText}
"
onchange="iceSubmitPartial( form, this, event);"
style="display: none" />
</ice:panelGrid>
</ice:form>
]
TestBean.java
[
package com.abmsoftware.backingbean;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class TestBean
{
private String selectedText;
private String bodyText = "Hello there";
@PostConstruct
public void init()
{
System.out.println("Init");
}
public String getBodyText()
{
return bodyText;
}
public void setBodyText(String bodyText)
{
}
public void setSelectedText(String selectedText)
{
System.out.println("Selected text is: " + selectedText);
}
public String getSelectedText()
{
return selectedText;
}
}
]
intel.js
[
var selectedText;
// Sets the selected text in the server code.
function setSelectedText()
{
var txt = '';
if(window.getSelection)
{
txt = window.getSelection();
}
else if(document.getSelection)
{
txt = document.getSelection();
}
else if(document.selection)
{
txt = document.selection.createRange().text;
}
txt = new String(txt);
if(txt.length > 0)
{
selectedText = document.getElementById("frmIndex1:txtSelected");
selectedText.value = txt;
selectedText.onchange();
}
}
]
Marking as can't reproduce.
I ran the Compat version of the Component Showcase that we have as it uses the 1.8 component suite with the ICEfaces 2 Alpha 3 libraries. The Text Entry example has components on the page that use partial submit. For example:
<ice:inputText id="TxtName"
{textFields.effectChangeListener}size="30"
maxlength="30"
valueChangeListener="#
"
{textFields.name}value="#
"
partialSubmit="true"
required="true"
>
These are backed by a view-scoped bean that I added some logging to:
@ManagedBean(name = "textFields")
@ViewScoped
public class TextFieldsBean extends BaseBean {
/**
*/
private String name;
private String password;
private String comments;
public TextFieldsBean()
{ System.out.println("TextFieldsBean.TextFieldsBean: constructed " + this); }@PostConstruct
{ System.out.println("TextFieldsBean.logPostConstruct: called for " + this); }public void logPostConstruct()
After building, redeploying, and running the example, I only see a single set of log statements for that view:
[#|2010-06-07T14:59:17.317-0700|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=27;_ThreadName=Thread-1;|TextFieldsBean.TextFieldsBean: constructed org.icefaces.application.showcase.view.bean.examples.component.textEntry.TextFieldsBean@1d39e225|#]
[#|2010-06-07T14:59:17.317-0700|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=27;_ThreadName=Thread-1;|TextFieldsBean.logPostConstruct: called for org.icefaces.application.showcase.view.bean.examples.component.textEntry.TextFieldsBean@1d39e225|#]
So perhaps this was solved in the Alpha 3 release. If it's still an issue, we'll need a more specific test case and additional details to reproduce.