I have created a par project with a TextEdit and an InputField. The InputField acts as a character counter for the TextEdit and there is a javascript to update the textview as the user pushes keys on the keyboard. I have created 3 iviews that reference the same par project code and placed them on one page. The page layout has three columns and each column has one iview. Because TextEdit doesn't have the jsObjectNeeded, I am having problems to get the correct text from the 1st column iview that I am typing in and I am always getting the 3rd column's text from the 1st iview.
The par file works if there is one of that iview on the page. You can have different iviews on the page but one iview that I have described.
Q1) Can you tell me if this is a bug?
Q2) What is the workaround?
=======================================================
<%
String textComponentId = "";
String strTextCount = String.valueOf(250 - bean.getMessage().length());
%>
<SCRIPT Language="JavaScript">
var textmessage = "";
function <%=jsFunctionTextSize%>()
{
var textlimit = 250;
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var counterfield = eval(func("ipLOBCharacter"));
var old = counterfield.getValue();
var textmsgfield = eval(htmlb_formid + "." + textmessage);
counterfield.setValue(textlimit - textmsgfield.value.length);
if(counterfield.getValue() < 0 && old >= 0)
{
message = 'You have exceeded the 250 character maximum!';
alert(message);
}
}
</SCRIPT>
<div onkeyup="<%=onLOBCheckTextSize%>">
<hbj:textEdit
id="txtMessageObj"
text="<%=bean.getMessage()%>"
wrapping="SOFT"
tooltip="Edit and/or add text"
rows="7"
cols="41" >
<%
textComponentId = myContextID.getParamIdForComponent(txtMessageObj);
%>
</hbj:textEdit>
<SCRIPT LANGUAGE="JavaScript">
textmessage = "<%=textComponentId%>";
</SCRIPT>
</div>