<jsp plugin> no works for me? anyway to include applet in JSF ?
Just using object tag:
<object width="400" height="300" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" archive="applet.jar"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0">
<param name="code" value="com.mypackage.Main"/>
<object width="700" height="500" type="application/x-java-applet" archive="applet.jar">
<param name="code" value="com.mypackage.Main"/>
</object>
</object>
There is nothing like this in JSF. I think you will have to add the required HTML tags to the page yourself.
Simple Html tag will do.. if you going to use applet in many place... you can write a taglip and minimize values to add in your jsp file.
Tablig which gets some values and renders the valuse as tag.
Related
How can I display a PDF document on a rich:popupPanel. I am trying to display PDF document in a popup from a view scoped JSF page.
Issue faced : Parent page stops working when I click on the h:commandLink which fires a new view to display the PDF
The simplest way I know is to use HTML directly. You can use IFRAME or OBJECT.
So just put something like this in your rich:popupPanel:
<rich:panel>
<iframe src="path_to_your_file/sample.pdf"
class="pdfFrame" width="800" height="1000" scrolling="no" />
</rich:panel>
I don't think there's a way to do this with pure JSF tags. The same way is presented on PrimeFaces's showcase:
<h3>PDF</h3>
<object type="application/pdf"
data="/showcase/resources/demo/media/guide.pdf?pfdrid_c=true"
height="300px" width="100%" internalinstanceid="3">
Your browser can't display pdf,
click
to download pdf instead.
</object>
I have this assignement where I have to used export for web in quicktime pro 7. Then copy/paste the read me.html file into the body (exactly as it is), which I did.
However, I keep getting 3 errors when I run my .html through W3C and cannot figure out how to correct it.
I realized there are probably better way to embed object but this is how they want us to do it for this assignment. Can anyone help me correct these 3 errors please.
Many thanks in advance.
<object width="350" height="278">
<param name="src" value="swiss/swiss-poster.jpg" />
<param name="href" value="swiss/swiss.mov" />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="350" height="278" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
src="swiss/swiss-poster.jpg"
href="swiss/swiss.mov"
target="myself"
controller="false"
autoplay="false"
scale="aspect">
</embed>
</object>
Line 1 : Element object is missing one or more of the following attributes: data, type.
Line 14: Attribute href not allowed on element embed at this point.
scale="aspect">
Line 15: Stray end tag embed.
I just needed to embed a quicktime movie myself, and I looked to the Mozilla Developer Network for the syntax: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
I believe that the data attribute would take the place of href in your params:
param name="href" value="swiss/swiss.mov" />
would be:
<param name="data" value="swiss/swiss.mov" />
and the type in this case would be "video/quicktime":
<param name="type" value="video/quicktime" />
There is also an <embed> reference at MDN (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed), but it covers only the HTML5 version of the element, which doesn't require a closing </embed> tag.
The reference at sitepoint (http://reference.sitepoint.com/html/embed) addresses the earlier syntax, and also says:
"embed isn’t part of any currently recognized standard (it is included in HTML5 which is not yet finalized), so if you use it, your page can’t possibly validate".
That suggests that with <embed> you should probably focus more on actual behavior in the browser than the W3C's validation tool.
I'm triyng to use your audio player just in the home page of this site:
http://www.piscinafrancavilla.com/wordpress/
the home page is with super size... I need to put the audio with autoplay... I know that i should edit the header.php and put the condition
<?php if(is_home()) {?>
for use your plugin what is the rest of the script?
Do you think that is the right way???
Please help me
Best regards
Eric
Use embed tag on your homepage as
<object width="199" height="59">
<param name="src"
value="song.mp3">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="bgcolor" value="#333333">
<embed TYPE="application/x-mlayer2"
src="song.mp3" autostart="true"
loop="false" width="199" height="59" controller="true"
bgcolor="#333333"></embed>
</object>
Just change the src values (there are two) to the absolute URL of the music file you are wanting to insert.
I am hoping to include header banner on my Drupal website. I used the following code but it appear blank on all but one page.
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash
/swflash.cab#version=7,0,19,0" width="786" height="147">
<param name="movie" value="pmi.swf" />
<param name="quality" value="high" />
<embed src="pmi.swf" quality="high" pluginspage="http://www.macromedia.com
/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"> </embed>
How can I resolve this?
As i see on embed tag you are saving the swf file in the root right?(www.example.com/banner.swf). But you should not put files outside the files path(usually sites/all/files/). Then with the file in the right place you can use "file_directory_path()" function to get the complete url path for the flash. Something like:
<embed src="<?=file_directory_path()?>/pmi.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="786" height="147"> </embed>
I would like to add styling to the body tag, currently I end up with this code:
<body class="xspView tundra">
<div style="margin: 0px">
but I would like to achieve this:
<body class="xspView tundra" style="margin: 0px">
Is this possible without removing existing functionality (i.e. without removing dojo and default xpages functionality)?
Yes you can,
if you have for example one xpage called 'home'. You can add your style definitions to the tag in the xpage. For instance:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" styleClass="ddd" style="margin: 20px;">
// your content goes here
</xp:view>
If you have a multiple xpage design and you dont want to add these lines of code to every xpage you could use Themes to automaticaly add the styles to the body tag:
<control override="false">
<name>ViewRoot</name>
<property mode="concat">
<name>styleClass</name>
<value>xspView tundra</value>
</property>
<property mode="concat">
<name>style</name>
<value>margin: 20px</value>
</property>
</control>
You don't have to use a theme to add a style to the XPages body tag. You can do it right on the Page itself under the style property. The source looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
styleClass="myBodyStyle">
</xp:view>
Which renders to the browser as:
<body class="myBodyStyle">
Add a css file that has a BODY entry. Put your margin there. Add the css to a theme if u want to use it globally
Why don't you do it in a css file? Include this:
body {
margin: 0px;
}
Just like any HTML styling...
Or, maybe I don't exactly understand what do you mean...