html:text tag
Hi everybody,
I am new to Struts concept. I am trying to develop astruts application. I am writing one textbox on that I want call one javascript function for onchange event my html:text tag looks like the following:
<% int i=0; %>
<logic:iterate id="ts" name="loginForm" property="timesheet">
<td>
<% i+= ; %>
<html:text property="worked_Hours" name="ts" onchange="findTotal(<%= i %>)"></html:text>
</script>
</td>
</logic:iterate>
</tr>
My intention in this code is I am creating the textbox control array. So I want to send that i variable value to that findTotal() javascript function. But the compiler instead of putting i value in the findTotal() function it is putting the code like this
<input type=text name="worked_hours" value="8" onchange="findTotal(%= i %>).
How can I get the value of i in the resultant jsp page.
Please reply me soon.
Thank you all,
Varma
When using custom tags, and specifying a dynamic attribute, always put <%= %> for the entire attribute
Try this:
<html:text property="worked_Hours" name="ts"
onchange="<%= "findTotal(" + i + ")" %>" ></html:text>
Similar Messages
-
Struts html:text tag background colour
How to change the background colour of Struts <html:text> tag?
styleClass and styleId, you can put css value on it
-
Value not resolved in html:text tag at weblogic
I've a jsp working fine at tomcat, but after i migrate it to weblogic, some of the html:text tags are not working properly.
eg. <html:text property="dispParamValue" styleClass="formFill1line" value="${sysvarList[rowCount].dispParamValue}" />
Instead of displaying the value of ${sysvarList[rowCount].dispParamValue} like "abc", it displays the tag itself "${sysvarList[rowCount].dispParamValue}" at the text field at weblogic.
My Weblogic version details are as follows:-
Server info = WebLogic Server 9.0 Sun Jul 3 21:15:00 PDT 2005 598247
Servlet engine version = 2.4
Java version = 1.5.0_03-b07
Anyone has encountered the same problem before? any difference in the server settings that i need to take note of?Just to clarify, the EL is supported by a J2EE 1.4 server which corresponds to Servlet2.4 / JSP2.0
What version of Weblogic are you using?
You can find out the version of the spec your server supports with the following JSP snippet.
<h2> Server Info </h2>
Server info = <%= application.getServerInfo() %> <br>
Servlet engine version = <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>
Java version = <%= System.getProperty("java.vm.version") %><br>Also note to activate the EL in your webpages in a JSP2.0 container, your web.xml file must declare itself as being version 2.4 (if you leave it at 2.3 it disables EL for backwards compatibility)
Cheers,
evnafets -
Sorry about first try : how to avoid html-text tag converting & to & amp;
subject
how to avoid html:text tag converting "&" to "& amp;"?
body
hi,
i have some values on DB like "& #351;" and when i use html:text to
show binding's value, html:text converts "&" to "& amp;". in generated
html, it looks like "& amp;#351;".
how to avoid this conversion?
thanks...
Ayhan G�ng�r
note: i use white-space among special characters because browser renders them. ex : (& amp; to &)hi, i use property attribute of html:text.
property is declared in UIModel xml file.
i mean, i don't use something like
<html:text value="data"/>i use just like
<html:text property="bindingName"/>and value is shown in generated html input tag as value.
html:text has no attribute like filter.
i think i should override html:text tag, and create a new tag that checks if value includes "& #351;" this type data. If there is, don't convert "&" to "& amp;"?
any suggestions?
thanks...
Ayhan -
How to use bean write in struts html:text tag
hi,
i'm new to struts concepts.here i'm trying to write a value in html struts tag using <bean:write>
my current tag is
<html:text property="empname" value='<bean:write name="employee" property="empid">' />
but it gives same tag in the text box.how i can solve this.what am I doing wrong?You will notice above that I mentioned
YOU CAN'T USE CUSTOM TAGS AS ATTRIBUTES TO OTHER CUSTOM TAGS
(was that loud enough for you to notice this time)?
Try
<html:text styleId="instruction" styleClass="text" size="50" name="instruction" property="value"/>
//or
<html:text styleId="instruction" styleClass="text" size="50" property="instruction" value="<%= instruction.getValue() %>"/>
better alternative: populate your formbean with your action and just have:
<html:text styleId="instruction" styleClass="text" size="50" property="instruction"/>
If you set the "instruction" property of your formBean in the action, the value will be automagically reflected here.
Cheers,
evnafets -
ADF/Struts Generated tag code variations? Struts html:text vs Html input
Hi,
JDev 10.1.2.1
ADF/Struts
I noticed that the JDev IDE generates different code for a same component/binding combination.
Example:Data Control of type Input form with same VO selection.
Generated code for 1 field:
case 1)
JSP code:
<tr>
<td>
<c:out value="${bindings['TitleLang1'].label}"/>
</td>
<td>
<html:text property="TitleLang1"/>
</td>
</tr>
HTML output:
<tr>
<td>
Short Title Language 1
</td>
<td>
<input type="text" name="TitleLang1" value="Preliminary Demo">
</td>
</tr>
case 2)
JSP code:
<tr>
<td>
<c:out value="${bindings['TitleLang1'].label}"/>
</td>
<td>
<input type="text" name="<c:out value='${bindings.TitleLang1.path}'/>" value="<c:out value='${bindings.TitleLang1}'/>"/>
</td>
</tr>
HTML output:
<tr>
<td>
Short Title Language 1
</td>
<td>
<input type="text" name="VB_TitleLang1" value="Preliminary Demo"/>
</td>
</tr>
Case 1 generated code is obvious to me, the html name of the field equals the field binding id.
In Case 2, the VB_ prefix is added and the binding variable references bindings.fieldName.path?
Could someone explain me the second flavor?
When should we use the path reference and replace the Struts html:text tag with html input tag?
Thanks
FredI dont think you can mix static values and rt expressions together in attribute values.
String onBlurString = "dontLeaveItEmpty(this);referenceEntered(" + recordNumber + ")" ;
html:text styleClass="textFieldInTable" name="refrences" property="referenceName" onblur="<%=onBlurString%>" />cheers,
ram. -
Passing values to action form in struts using html:link tag in struts
hi
As we can post values to action form bean in struts using a <html:text> tag in side a form.
Can the same be achieved by using a html:link attribute.
If not then how can this be achieved (i.e. posting a form on click of a link and populating action form bean property for the same).
thanx in advance.Crosspost:
http://forum.java.sun.com/thread.jspa?threadID=5244035&tstart=0 -
CAS - Write text of certain html div tag to new attribute
Hi,
Is it possible with CAS to extract text from certain HTML div tags to new attributes. So let's say we have tags in a specific "Tags" div and store that text in a new attribute of that record?
Thanks!
Marco SnelsHey Marco,
I'd need to try this out a bit more since I have never built a custom CAS web crawler parser plugin. Here's what I know based on your questions:
1) If I understand it correctly the name after the METATAG_PROPERTY_NAME_PREFIX will be the attribute name (?) so in this case Endeca.Document.HTML.MetaTag (?)
Correct. You will want to change this in the code to something more meaningful to what you're trying to parse out of the <DIV> you're interested in.
2) And I think that I have to change the FILTER-HTMLMETATAG name after the getParseMeta().add line but I don't know to which value?
Accorinding to the WebCrawler guide this sample attribute was only added so you could see a new property on each output record to prove that this custom plugin was being executed. It can be removed for your custom plugin. That said, you're going to have to change what you're pulling out out the parser object. In the sample, they're pulling out the MetaTags (via an Endeca extension of the nutch parser), which you don't care about for your need. (e.g. HTMLMetaTags tags = parse.getData().getMetaTag();). Instead, you'll need to pull out the Content (e.g. parser.getData().getContentMeta()). You may want to google for nutch parser usage to get examples on how specific HTML elements can be found.
HTH,
Dan
http://branchbird.com -
How to populate the <html:option> tag dynamically
I have a tree view, in tree view tag ( <layout:maeuItem> tag i have written "onclick " event )
<layout:menuItem key="${agrovoc.AGURI}" link="#"
onClick="return copyVal(this)">
<script language="javascript" type="text/javascript">
function copyVal(obj){
str= obj.innerHTML;
l = str.length-4;
xyz= str.substring(12,l);
document.getElementById('agrovoc').value =document.getElementById('agrovoc').value + xyz+'\n';
</script>Here "xyz" contains the Term ( the term clicked in the tree view) now i want add these terms ( clicked in tree view) into <html: option> tag.... how to do this.. plz give me some ideas
<html:select property="agrovocbuffer" size="10" >
<html:option value="" styleId="agrovoc1"></html:option>
</html:select>Hi,
i have tried with this, it's works fine... but when i click on the next page ( i mean 2 or 3 page etc ) the content of <html:option> are erasing (deleting).. i wanted those terms wht i have selected in the 1st page to remain in <html:option> when i click on 2 nd page also...
Tree view code
<layout:menuItem key="${agrovoc.AGURI}" link="#"
onClick=" copyVal(this)">JavaScript
<script language="javascript" type="text/javascript">
var i=0;
var myArray=new Array();
function copyVal(obj){
var flag=0;
str= obj.innerHTML;
l = str.length-4;
xyz= str.substring(12,l);
while (xyz != null) {
for( var l=0;l<myArray.length;l++){
if( myArray[l]==xyz){flag=1;alret("The Term is already selected.");}
if(flag!=1){
document.getElementById('agrovoc').options[i] =new Option(xyz,xyz);
myArray=xyz;
i++;
//alert(i);
xyz=null;
function del(){
var oc=document.getElementById('agrovoc').options;
//alert(oc.length);
firstBox = document.getElementById('agrovoc');
selectedOption = firstBox.options[firstBox.selectedIndex].value;
selected = firstBox.options[firstBox.selectedIndex].index;
//alert(selected);
for( var l=0;l<myArray.length;l++){
if( myArray[l]==selectedOption){myArray[l]="";}
firstBox.options[firstBox.selectedIndex] = null;
var oc=document.getElementById('agrovoc').options;
//alert(oc.length);
for(var x=selected;x<oc.length;x++,selected++)
document.getElementById('agrovoc').options[x] =new Option(firstBox.options[selected].value);
i=oc.length;
</script>
<html:select> code<div align="left" id="hopt">
<td valign="top">
<logic:present name="hcount">
<html:select property="agrovocbuffer" size="15" styleId="agrovoc" multiple="true" style="width:200px;" >
<html:option value="" ></html:option>
</html:select><html:button property="button" onclick="del()"> DEL</html:button>
</logic:present>
</td>
</div>
And all the above code is in <html:form> tag & i have written a custom pagination page
Now i want all terms which are in <html:option> remain in options when i goto 2 nd page..
how to do this? In the DOM inspector i'm getting the options, but when see the source HTML there are no <html:options>.. when click on the 2 page link the terms which are in <html:option> are not going to the "Action" class .. :(
how to do this .. any idea plz..? -
Need to Remove html text in Saved PDF from OBIEE Dashboard
Hi,
It's OBIEE 10g related issue...
Customer wants a Dashboard as PDF, Dashboard has a footer which has a HTML link. While saving this Dashboard into PDF file, it has the HTML text in footer place rather than HTML link.
Can you please help me on this issue that how to resolve this.
Thanks in advance...Hi,
This is a known bug in OBIEE. Refer to :
BUG:7369585 - SUPPORT OF HTML TAGS IN PRINT TO PDF (NARRATIVE VIEW, DASHBOARD TEXT OBJECT)
BUG:7476622 - HTML TO PDF NARRATIVE AND OTHER FORMATTING DIFFERS
BUG:8787191 - NARRATIVE DOES NOT DISPLAY CORRECT FONT SIZE AND CENTER IN PDF
BUG:9372634 - HTML TAGS SHOWN WHEN PRINT/EXPORT TO PDF
NOTE:749246.1 - OBIEE 10g: When a Report is Downloaded to PDF Format it Shows the Embedded HTML Option Tag Values in the Report.
BUG:12826562 - HTML TAGS AND CODE USED IN COLUMN FORMULA ARE VISIBLE IN REPORT PDF
BUG:5747757 - NARRATIVE VIEW IN PDF DOES NOT KEEP FORMAT
The workaround is to print the report to Excel or HTML.
Thanks,
-Amith. -
Use of titleKey attribute in html:select tag
Hi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tagHi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag -
Static text corrupts randomly in html text region
Hi,
I am creating on a page a series of hide/show regions with static html containing images stored in the database. The tags in the html are pretty straight forward, just a few <p>, <br> and <img></img>. The size of the region is about 400-1000 characters. The problem is when I run the page and display the region, I see characters missing from the displayed page or are corrupted. For example an "<br>" tag I inserted would turn into "&lt;br>" or an image name "SummaryOutput.jpg" would be "SumaryOutput.jpg". Sometime the missing character are not even in the text I generate but in the substitution string like #WORKSPACE_IMAGES# where some images gets complete path while others are missing one character in the uri (e.g. "et" instead of "get"). This happens about 70% of the time for some regions with multiple images. The ones with only one image link don't seem to have the problem.
How I created the region is this.
1. creating an an HTML Text Region, hide/show (although I did tried switching to no-template and the problem still existed).
2. upload the images into the db and not assign them to any application.
3. create my html doc using MS Word and save as "filtered htm".
4. open the html doc using TextPad and edit the image links to using the db image (e.g. <img src="#WORKSPACE_IMAGES#imagename.extension" alt="Image Title">
5. Cut&Paste the html code into the Resource textarea of the HTML Text Region. Click "Apply Changes"
6. Display the page. Most of the times the page displays fine, but when there are two or three images (less than 70kb each) contained in the html code I often see the randomly missing characters.
7. When I do view source on the page, I see that the link to the images are corrupted.
8. When I do edit page and look at the region->source. Sometimes I see the characters changed but sometimes not (eg. The name of the jpg is correct in the textarea but wrong in the output page)
Here are the things I've tried which did not work.
1. Remove all html tags from the html, keeping only the <img> tags. So only plain text and <img>
2. Do all the work in one IE6 browser window instead of using two sessions of FireFox and an IE. I thought maybe session states are conflicting.
3. I see the same problems in both IE and Firefox so I don't think it's a browser issue, at least on the viewing end.
4. There are no items in these regions, just text and images.
The behavior I am seeing is completely buzzard to me and I've exhausted all my methods of debugging. I did some searching on the forum and did not see any problems approaching what I am seeing on my server. Has anyone seeing anything like this or have an idea where to look for the problem?
Thanks,
Wayne
Edited by: [email protected] on Jun 25, 2009 1:10 AMnope - it's set to static. I do have a link embedded using
the properties panel and thought that might be the reason. It
wasn't. Strangest thing. I've recreated some of the text boxes and
they are working. It's happened a few times to me - and I'm
beginning to think it is a quirk in Flash 8. -
HTML text not showing properly in CR 11
I am trying to display the html text in the crystal report but the first screen shot displays something ugly text interpretation:
But when i change the text interpretation to HTML then instead of showing nice html tags like ul, li AND table tags it is not recognizing the html tags at all
is there any way to display the html nicely???????Not all HTML tags are supported by CR.
Per KB 1657131, the supported HTML tags in CR2008 and later are:
html
body
div (causes a paragraph break)
tr (causes only a paragraph break; does not preserve column structure of a table)
span
font
p (causes a paragraph break)
br (causes a paragraph break)
h1 (causes a paragraph break, makes the font bold & twice default size)
h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
h3 (causes a paragraph break, makes the font bold & 9/8 default size)
h4 (causes a paragraph break, makes the font bold)
h5 (causes a paragraph break, makes the font bold & 5/6 default size)
h6 (causes a paragraph break, makes the font bold & 5/8 default size)
center
big (increases font size by 2 points)
small (decreases font size by 2 points if it's 8 points or larger)
b
i
s
strike
u
strong
ol (ordered list)
ul (unordered list)
li (list item)
-Abhilash -
Formatting HTML Text in Text component
Hi all,
I'm trying to render some Html text in a text component, I'm
getting the HTML from within an xml document as such:
<xml><htext><p><b>Testing HTML
Text</b></p><p>Here's another
line.</p></htext></xml>
If I put that into a Text component with the htmlText=htext
property, the line spacing is as expected, but it seems to add in a
blank space character for every character of the html code. (E.g.
"<b>Testing" adds 3 extra spaces before the word "Testing").
Renders like (using - as space character):
Testing HTML Text
-Here's another line.
If I use the condeseWhite=true property on the Text
component, it fixes the extra space characters issue, but then
stuffs the line spacing up, so <p> becomes rendered like a
<br>.
Renders like:
Testing HTML Text
Here's another line.
Any thoughts, or help is much appreciated, thanks in advance.
Oz
P.S I was trying to avoid the obvious "br" tag which will
make it work and render correctly....
<p><b>Testing HTML Text</b></p>
<br/><p>Here's another line.</p>no. use css.
-
Displaying rendered HTML text in spry detail region
Hi,
I have just started to play around with DW CS3 & spry and
love them!
I have a Master/Detail spry going from my database, but am
having a problem displaying the detail the way I need it. The mySQL
field is a BLOB for some HTML formatted text (I get the text
elsewhere using a Xinha textarea edit widget and load the the
formatted HTML text into my db). For example, my string is
"<h2>this test</h2><strong>xyz</strong>"
which is loaded into my db. I am using the dreamweaver ADDT export
XML functionality to generate my spry master/detail region.
My detail region is displaying the correct html associated
with the selected master table entry, but it's with the HTML tags,
not rendered as HTML (I don't want to see
<h2>title</h2>; I'd like to see title with <H2>
formatting).
It's much like what I think a RSS feed would be, but can't
find a way just to get the html to render because I don't have the
files externally to source an iframe or anything. (I tried a XLS
fragment transformation, just putting the detail record field that
I want in an XLS file, but that didn't do anything).
Any kind of guidance, hint, point and laugh but then tell me,
would be greatly appreciated. I also posted at first at ADDT and
then General Dreamweaver because I didn't locate this forum in the
Forum topic list, so when I did find this I thought this is
obviously where I should have first posted - sorry if anyone has
also been surfing around. Thanks so much so any info.Hi Don,
Thanks so much for responding. I actually did do that, but it
seems like I might be doing it in the wrong place. I tried it in
the .js that I have in my header:
var dsList = new Spry.Data.XMLDataSet("./export.php",
"theSpecials/special",{sortOnLoad:"rating",sortOrderOnLoad:"ascending",distinctOnLoad:tru e});
dsList.setColumnType("detail", "html");
which didn't do it. I also tried it right in my detail
display area:
<div style="overflow:hidden; width: 400px;"
spry:detailregion="dsList">
<div> <!-- nested div for spry effect -->
<div id="detailDisplay" style="width:380px; "> <!--
spry:content="{detail}"> -->
<script
type="text/javascript">dsList.setColumnType("detail","html");</script>{dsList::detail}
<!-- echo '{dsList::detail}' ; ?> -->
</div> <!-- detailDisplay -->
</div> <!-- outter div for spry effect -->
<!-- spry detail region -->
</div>
Excuse the inline ugliness, will clean it up when it's
functional. But that doesn't seem to do it either. I am storing
that particular field as a blob in the mysql database, but I
already tried making that a VARCHAR which had no effect either.
Thanks so much for for the suggestion! Any other gems that I
can try?
Liz
Maybe you are looking for
-
Printing Problem With Wipro Printer its very urgent
hi , i have developed the smartform which contain page format of size height DINA4 .when i am giving print in wipro dot printer it is printing in correct postion in first page but in next page it displaying below the postion what i am given .plz te
-
Getting files from old external drive to a new one
I have a dying Acom ac powered 80gig external drive on my eMac and a powerbook that is running out of drive space. The Acom has one USB and two firewire outputs, one firewire is hooked up to the eMac . The Acom is all itunes music (none from the Appl
-
ABAP webdynpro how to give spacing between the UI Elements in a view
Hi Expert, I am very new to webdynproapplication development. I am stuck in changing the look of the ui elements of the view. Cud anyone explain how to set the spaces between the UI Elements on a View is there any method ? I have set the Layout
-
I am looking to create a similar effect to the one in this website: http://www.timoweiland.com/ I have a large image that I would like to pan around on various button clicks and I have no idea how to begin. Any help or a point to the right post/tuto
-
Fnd_global value can not retrieved in webadi
Hi All, We have faced a problem in custom webadi. it is seems that the fnd global value(FND_GLOBAL.USER_ID,FND_GLOBAL.ORG_ID etc.) can not be getted , whenever the function is used in content query,parameters,LOV,upload api and VPD tables.. And this