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
[
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();
}
}
]
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
{testBean.bodyText}[
<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>
#
</f:verbatim>
</ice:panelGroup>
<ice:inputText id="txtSelected"
value="#
"
onchange="iceSubmitPartial( form, this, event);"
style="display: none" />
</ice:panelGrid>
</ice:form>
]
TestBean.java
[
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
{ System.out.println("Init"); }public void 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(); }}
]