Alternative scrollpane to load dynamic content
I'm trying to load jpgs to my scrollpane dynamically. I
noticed the compiled scrollpane component in flash 8 is very large
in size (> 130kb) which i cannot afford to use. Instead I'm
using the flash 6 scrollpane which is not precompiled and only
several kbs after compiling to swf. However, I have problem
rendering loaded dynamic contents onto the pane. The first load
after starting flash 8 was always successful. After that, it fails.
In case anyone's interested, I have simple test code to demonstrate
the problem, and have uploaded it to
http://www.filesend.net/download.php?f=1c5d80093f0b68cdcf7fe4cca0e0c923
(you'll need to wait for 10 secs before the download button appears
on that linked page)
I'm just wondering what is the best choice of a small size
scrollpane that handles dynanimic MovieClip.loadMovie() well. Any
suggestions?
i just found out that scrollpane component is not that huge
(only 38kb). Does anyone know why when I add it to my project my
swf increases by 130kb?
Similar Messages
-
I'm developing a site for an Intranet. Depending on the logged user I want to show him the menues he has access to.
To do that I thought of writing a jsp page that shows the menu and include it in a main page. But how does the bean used in this jsp page know who logged in he previous page?
The solution I found is to save the user in a session, and add two methods in the bean that loads the menu to set a get the user. Is this a good solution?
The code of the jsp page that loads the menu is:
<jsp:useBean id="modulosId" class="beans.configMenu.BeanAdmModulos" />
<table width="40%" border="0">
<% String nombreUsr=(String)session.getAttribute("sesion.usuario");%>
<% modulosId.setUsuario(nombreUsr); %>
<% java.util.Vector modulos = modulosId.getModulos(); %>
<% for(int i = 0; i < modulos.size(); i++) { %>
<tr>
<%= modulos.elementAt(i)%>
</tr>
<%}%>
</table>
Related with this I have another question. The menues I will load will be in a database. Each time I load the menues I will have to query the database. Is it better to add to the session all the menues or querying the database each time I load the page wouldn't bring performance penalties?
Thanks for your commentsI'm developing a site for an Intranet. Depending on
the logged user I want to show him the menues he has
access to.
To do that I thought of writing a jsp page that shows
the menu and include it in a main page. But how does
the bean used in this jsp page know who logged in he
previous page?
The solution I found is to save the user in a
session, and add two methods in the bean that loads
the menu to set a get the user. Is this a good
solution?
User credentials are often cached in the session, so this is fine. Your main decision will be whether to check the user's authorization (privileges, roles, rights, etc.) with each request or to cache those results with the user's authentication (logon) credentials in the session as well.
The code of the jsp page that loads the menu is:
<jsp:useBean id="modulosId"
class="beans.configMenu.BeanAdmModulos" />You have the option here of declaring this bean's scope to be 'session'. Otherwise, this is fine if you are manually checking the session itself (as you are doing below).
<table width="40%" border="0">
<% String
ng
nombreUsr=(String)session.getAttribute("sesion.usuario
");%>
<% modulosId.setUsuario(nombreUsr); %>
<% java.util.Vector modulos =
= modulosId.getModulos(); %>
<% for(int i = 0; i < modulos.size(); i++) { %>
<tr>
<%= modulos.elementAt(i)%>
</tr>
<%}%>
</table>
Related with this I have another question. The menues
I will load will be in a database. Each time I load
the menues I will have to query the database. Is it
better to add to the session all the menues or
querying the database each time I load the page
wouldn't bring performance penalties?
It is a speed versus memory tradeoff. If you are going to cache the menus, I would suggest caching the mapping between a role and a menu (or whatever equivalent exists in your app). There should be fewer roles than users; hence, this should use less memory. The solution may need some tweaking if users can have multiple roles.
Thanks for your commentsYou're welcome.
- Saish -
Loading dynamic content in an accordion panel?
Basically I am looking to be able to incorporate the type of
functionality that is shown in the Products demo, except using an
accordion instead of the table - so the xml would feed into the
accordion, and the the data in the accordion would be clickable and
update a photo and a description section. Right now I'm having a
hard time getting my head around getting the accordion to be the
master region and be able to update the photo and descriptor detail
regions.
Any help or suggestions are more than welcome. Thanks in
advance for your time-
-ChuckHi Chuck,
You can have that master-detail relation using an accordion
instead of a table if add a special region called detailed region.
We have an example of an accordion that uses data. Check the
sample
here.
If you want to build the detailed region, add somewhere in
your page a region and set spry:detailregion attribute on it.
For example, for the link I gave you above, add this code as
detail region:
<div spry:detailregion="dsEmployees">
<p>{phone}</p>
</div>
and on one field from accordion add the spry:setrow attribute
to get that update.
<div class="AccordionPanelContent"><p
spry:setrow="dsEmployees">{firstname}</p>
The code I gave you works with the accordion sample above
mentioned.
Please let us know if you have other questions,
Diana -
Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry
Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
And click on the "Using Spry.Utils.updateContent()"
The 3rd example shows how to use a fade transition whenever the content changes.
I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
Tabs code;
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab">
<table class="Button" >
<tr>
<td style="padding-right:0px" title ="Home">
<a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
</td>
</tr>
</table>
</li>
etc
etc
etc
and the panel code:
<div class="TabbedPanelsContent" id="Home">
CONTENT
</div>
I hoped i can use the example code from the link into my tabbed panels.
I thought this code:
onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
could be added to the tab code like this:
<a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
But the content doesnt fade...
I know i need to change the header etc.
The following is from the link:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aquo Events</title>
<script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
<script src="../../../includes/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function FadeAndUpdateContent(ele, url)
try {
Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
Spry.Utils.updateContent(ele, url, function() {
Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
}catch(e){ alert(e); }
-->
</script>
<style type="text/css">
/* IE HACK to prevent bad rendering when fading. */
#event { background-color: white; }
</style>
</head>
So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
Is there a way to keep my tabbed panel (or change as less as possible) and let
A. The fade work
B. The loading work.
The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
And the fading part is just because its nice...It doesnt show in the post but off course i changed this link;
"data/AquoThonFrag.html"
into;
"javascript:TabbedPanels1.showPanel(1);"
I must say i dont know if this even works... -
Edge Animate CC 2014 - code (eg. compositionReady). How to enter the code to work.
Edge Animate - compositionReady
sym.$("container01").load("page.html #box01");
This is the file to be loaded - page.htm
<head>
<script src="http://example.com/inc/carousel.js?ver=4.1"></script>
</head>
Body
<body>
<div id="box01">
<style type="text/css" media="screen">
#box01 { height: 1%; margin: 30px 0 0; overflow:hidden; position: relative; padding: 0 50px 10px; }
</style>
<script>
jQuery(document).ready(function(){jQuery('#gallery').carousel({ buttons: true, interval: true, });});
</script>
</div>
</body>
On the page.html and ID = "box01" is dynamic content (gallery)
which loads a by means of an additional js script.
How do I load the page to see it animate edge?
I load through an iframe, but I need only a part of the page. So one div.
Something is missing, as in this writing is not working.
Is loaded into the container only one photo and no animation offset.
I greet.If you're using Fluid Grid Layouts, none of these methods will work. I think the very best you can do is determine the min-height required for desktops & tablets. Mobile devices don't need min-height because those divisions will stack on top of each other.
To illustrate with a working example,
http://alt-web.com/FluidGrid/Fluid2.html
The relevant CSS code:
/* Special Rules for Tablets */
@media only screen and (min-width: 481px) {
.gridContainer >div {min-height: 255px;}
/* Special Rules for Desktops */
@media only screen and (min-width: 1025px) {
.gridContainer >div {min-height: 325px;}
Nancy O. -
I am new to RoboHelp (using ver 7) and just went through the
excellent "Essentials of Adobe
Robohelp 7 HTML". I have been tasked with something I did not
find in the book...embedding
dynamic content. In other words, can the Help output use an
external data source to tailor its results?
For example, RoboHelp has a pre-loaded selection criteria of
customer names, and depending on whihc
one is selected, it retireves and embeds data from an
external source for that customer into the
Help web. Is this possible?Welcome to our community, Gary
RoboHelp doesn't quite work that way. Normally you have all
the content static and present on either a server or inside a .CHM
file. Much like a static Web Site would work.
Assuming you are creating web based help, I suppose it would
be possible to achieve what you are looking for by creating
Framesets or Inline Frames. Then populating a frame with dynamic
content.
Perhaps if you can more fully flesh out exactly what choosing
a particular customer number would result in, we might offer some
alternatives for achieving it using RoboHelp.
Cheers... Rick -
Mixing static and dynamic content in a single outputText value causes NPEs
Hi,
I am having a problem and I'm wondering if it is a result of my error or if this is a bug.
I am mixing dynamic and static content in the value attribute of tags (e.g., outputText). On initial page load, everything works fine. However, if the same view is reloaded (e.g., after a failed validation) I get an NPE from JSF:
[#|2006-10-24T08:49:03.756-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at com.sun.faces.el.MixedELValueParser.getNextToken(MixedELValueParser.java:140)
at com.sun.faces.el.MixedELValueParser.parse(MixedELValueParser.java:123)
at com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:60)
at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:201)
at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:128)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:609)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
at org.apache.jsp.registration_jsp._jspx_meth_h_panelGrid_0(registration_jsp.java:324)
at org.apache.jsp.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:223)
at org.apache.jsp.registration_jsp._jspx_meth_f_view_0(registration_jsp.java:157)
at org.apache.jsp.registration_jsp._jspService(registration_jsp.java:118)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)My code looks like this:
<h:outputText escape="false"
value='<link href="#{myBean.styleSheet}" rel="stylesheet" type="text/css" />' />If I replace this with a much more convoluted set of tags, it works:
<h:outputText escape="false"
value='<link href="' /><h:outputText escape="false" value="#{myBean.styleSheet}"
/><h:outputText escape="false" value='" rel="stylesheet" type="text/css" />' />So is the problem that I am mixing dynamic and static content with a single value? If so, why does it work on the first view, and not after?
If it matters, I'm using the reference implementation version 1.1 (as included with NetBeans 5.5RC2) on SuSE 10.0 w/ JDK 1.5_09.
Thanks,
BillYes, that's how I originally had it, but then changed it to the outputText approach since a single tag could do what I wanted, as long as I was allowed to mix static and dynamic content within a single value.
I think this is a bug in JSF 1.1, since if what I am doing is illegal, it should throw an exception on the first page view, not work on first view and throw an exception on subsequent views. I'm guessing that this has something to do with the fact that on first page view it only runs the restore view and render response JSF phases, while on subsequent requests all of the phases will be run, and it's in one of those other phases that the exception is thrown.
For now, multiple tags is the work-around, I guess.
Thanks,
Bill -
Alternative ways to load Flash website
Hello, I have created a fully Flash website and as I continue
to add images to my swf file obviously it is taking longer to load
the site. I think I have created a pretty slick and straight
forward preloader, but as I continue to add images to my site it
will force the user(s) to wait longer and longer for the entire
site to load. Where I live and work I have a very fast connection
speed (20 MB/s +) so my site loads very quickly, but when visiting
a friends place my site seemed to take forever. Instead of creating
a low bandwidth version I want to keep what I have.
My main question- Is there a way I could load the entire site
up front to a certain point (say 25%) and allow the user to begin
to navigate through the site and anything that hasn’t
finished loading yet will just continue to load dynamically (or on
demand once the user selects a certain image). The user could see
the progress of items loading as they navigate around.
My website is:
www.abromphoto.com. I run a
photography business and am a beginner with Flash, but understand
web technology. My portfolio section of the site is about 90% of my
content. I would love for images to load dynamically as the user
begins to view images that have already loaded. Or, possibly
display all thumbnails for my images and then load the particular
image on demand once the thumbnail is clicked (so if they go back
to that image, it is already loaded). I honestly don’t know
how to search for this kind of thing.
Any help would be greatly appreciated!There are a variety of options that you can use/combine to
make things seem more streamlined. Preloading is always a good
thing when you have a sizeable site. As far as quitting at a
certain percentile, it can be a gamble. The on-demand route would
be a good approach where it's practical... but if you end up
on-demanding everything, it can be disruptive to the user's viewing
pleasure. You could also consider making separate swf's for
different sections and loading them as needed, possibly with some
lightwieght loading-time eye candy that makes it seem like more of
a transition than a waiting period. For image groups, you might be
able to incorporate a gradual one-by-one loading where each image
transitions into view after it loads, giving the impression of
being an intended gradual display. -
Load XML content into HTML enabled TextField
I'm trying to figure out how to use html such as <br />
loaded from an XML element into a TextField.. if I use something
like
<desc>my description<br />line 2</desc> I
get 3 nodes instead of one when loading the XML file. If I use
something like <desc>my description<br />line
2</desc> then I get <br /> in the actual text.
Can anyone clue me in as to how to store HTML in an XML
element so I can load the content into a Dynamic TextField with
HTML enabled?
Thanks much!use the latter in your xml and use the htmlText property of
your html-enabled textfield to display your text. -
PHP dynamic content for form list field on tabbed panel
I have been trying to use PHP dynamic content to populate a
form list field. Works fine on a regular page, but doesn't seem to
work (or works very erratically) if the form is on a tab of a Spry
tabbed panel. Erratically means (as I've observed) the values will
appear if the list field is the second on a tab but not the first.
Haven't tried three on a tab... Anyone know if this is supposed to
work?Thank You !!! to both of you above.
Shant,
The scheme youv'e proposed makes sense and I had thought of the same before posting the question. I already did a little POC on it but then realised this works if I can use complete list of values of 1st Field to decide the value of 2nd and so forth. But I rather need to know which one among those was clicked. Moreover, my right side list is usually not null when page loads for the first time (bcoz Field name is a path exp).
Also, the real problem here is that, when I click on different values on the right side of multi-select(already selected values) of 1st Field, allowedValues and Derivation of 2nd should change. That GUI event is not capturable from whatever I've been able to read (onClick is not applicable for MultiSelect, and onChange doesn't serve my purpose, coz I need to know what value was clicked on).
The solution I thought and implemented was to take the right side of multi-select, into an extra (read redundant), single-select Field. And then have the 2nd multi-select depend on it via Derivation and allowedValues.
Having two redundant single-selects, isn't the most elegant solution but I can't think of anything better. Any thoughts ???
If I'm not really overlooking something MultiSelect class should have an extra Property exposed....
- AndyDev
Edited by: AndyDev on Nov 6, 2007 2:04 PM -
Spry - load tab content only when clicked / selected
I'm considering spry to create a multi-tab page layout.. tabs
such as 'account', 'balance', 'bin', 'history', etc.
Each tab's content is dynamic and based on moderately
demanding DB calls. Is there a way to set Spry such that
- only the default selected tab's content (on page load) is
'filled', while the content of other tabs is generated only upon
user's click?
- once a tab's content is loaded, not regenerate its dynamic
content? I think I have an idea how to do this, but doesn't hurt to
ask.
thanks.quote:
Originally posted by:
shanbyrt
Brandan98,
I have a little script that sets the default panel whenever I
click on a tab.
I know it sounds redundant, but if/when the page reloads
onclick it reloads the default tab's contents. Just so you know I'm
not talking about persistent state stuff that V1 addressed in other
posts. :)
here's the script that I have that sets default tabs
<script type="text/javascript">
function setPanel(pan){
if (pan == 1){
var tp2 = new Spry.Widget.TabbedPanels("tp2", {defaultTab:
0});
if (pan == 2){
var tp2 = new Spry.Widget.TabbedPanels("tp2",{defaultTab:
1}); }
var tp2 = new Spry.Widget.TabbedPanels("tp2");
</script>
It seems to work for me, but may not be the best approach.
Byron
Hi Byron,
If i understand you right, this script sets the current tab
as default so if the page refreshes it reloads the current tab not
the first tab? If so this is exactly what i'm after! I'm not hot on
javascript so could you possibly expand a little on how i would
implement this in a php page??
Thanks, Mike :) -
Adding a function once a scrollpane has loaded
Hi
I have a scrollpane but need to put the scrollbar on the left. I've used the code:
_root.scrollPane.vScroller._x = 0;
This only works once the scrollpane has loaded. Could anyone help me with setting up a function/listener? I'm useless with listeners so any help would be appreciated. I've tried on(complete) with no success. I've also heard an "added" event listener may be the answer, but I've not managed to succesfully set that up.
Thanks
Simonin as3 you should use the added event and then position using the verticalScrollBar property of your scroll pane:
sp.addEventListener(Event.ADDED,f);
function f(e:Event){
sp.verticalScrollBar.x=0;
oops. wrong forum. delay by some time and then change your scrollpane's vScroller (or vSB) property. if you're loading content into your scrollpane you can use the complete event. -
Create Portal Page Design with Dynamic content in Moss2007(without using Visual Studio)
Hi All,
I am facing a issue while designing a page in MOSS 2007. I can't use custom code as the client doesn't want it to be used.
The page is with dynamic content coming from sharepoint lists and picture library. I tried using SharePoint Listview after adding zones as per my page design..but was unsuccessful because I am unable to change its design and css styles in its xslt view.
Plesae help me to find any alternative so that I can easily style my page with the dynamic content. Is there any way using Content editor webparts? Can we get List data in Content editor html as this can be easily styled. I googled and tried it by using javascript
and jquery but again unsuccessful.
Please help me with some solution.
Thanks..!!I recommend your repost this in the WebLogic Portal forum.
WebLogic Portal -
Hello, does anyone have experience implementing dynamic
contents to load from a Database into flash? I am trying to take up
a new project that will require data to be loaded from a DB. Any
turorials or help files would be great.Hi
Check out this
Video Tut.
It will get ya started. -
Print Dynamic Content with printJob
I recently developed a help resource application that builds
the interface and loads all the main and sub navigation items,
pages contents, and related resources dynamically. This was to make
it easy to provide search and print functionality, as well as
interface scalability. Therefore my print feature creates a print
layout MovieClip (so as to format well for 8.5 x 11 and printer
margins) and loads the appropriate text content related to the
visible page on screen when the print button is pressed.
I thought the print was all set to go, but what I found out
is that once you print a page of the Help Resource application that
same page prints in place of any other page you print from there on
out.
My print button calls a function that pulls all the
appropriate dynamic data (page title, page contents, related
resource names, etc.) and formats it as HTML and adds it to my
print layout MovieClips text field (docPrint._txt).
That function then calls my printJob function which creates a
blank sprite, adds my print layout movieclip to that sprite,
resizes the print layout MovieClip’s text field to fit
appropriately within the printer margins and prints the file.
Anyone have any ideas why my dynamic content prints as the
same page each time? Note that if I trace the contents of my text
field for my print layout MovieClip the contents change each time,
but the print stays the same.
Sorry for the long post and huge thanks to anyone who may
have an answer.
Have a great day!I am responding to my own post as I found a solution, though
I am now about bald from pulling all my hair out. Hopefully this
helps even one random soul in the future as the printJob class
seems to be one of the hardest to get help with or find information
online that pertains.
My code dynamically creates print page contents based on the
on screen contents the user is currently viewing within my
application. My print functions were always printing the first page
that was printed no matter what page within the application the
user was viewing.
As I have learned to do, I was declaring the variables for my
print objects in the root of my actionScript (outside all the
functions so they could be accessed across functions).
I had two variables:
var docPrint:document = new document(); // A MovieClip layout
for my print page located in my library
var printPage:Sprite = new Sprite(); // The Sprite to hold my
MovieClip for print purposes as a sprite is required
I also had two functions:
docContentsLoad(); // Loaded contents into docPrint Movieclip
and formatted
printJob(); // Created print job, adjusted docPrint for
printer settings, and sent print
It turns out the easiest solution was to combine my two
functions into one printJob function and place my two variables
(docPrint & printPage) at the beginning of the function. Now
the printing works fine everytime. No more repeat pages.
My assumption is that the only way to truly reset the print
document is to delcare the variables within the function being
called to print the document so that they are redeclared each
time.
Maybe you are looking for
-
Questions on Handling Multi-Channel Audio
Hi there, I'm an Editor at a news shop that has been running FCP 7.0.3 for a good length of time now. Everyone loves it, I love it - however I understand it is becoming dated and eventually we will need to upgrade to a new NLE if we want to stay up t
-
I would like to set up port forwarding on my Extreme so that I can access my SlingBox from work. My problem is that I can't find where to do this in Manual setup. I know I've seen it before and should be in the advanced section but it's no longer the
-
Hi all, what are the condition for oracle to make an index stale ... as more than 10% changes can make an table stale .. Thanks Subi
-
List of keys(Strings): ArrayList, HashMap, ...
Dear all, I would like to make a list of keys (Strings) such that each key can be appear only once in the list. If I used ArrayList, the uniqueness of key would not garanteed. If I used HashMap, it would fine but I did not need store any objects. Any
-
We are migrating 120+ Oracle 10gR2 databases (10.2.0.1, 10.2.0.3 & 10.2.0.5) from 30+ physical Linux (RHEL 4.6 & 5) servers to an AIX 6.1 virtualized environment running on two new P770 servers. Our migration approach will be to use Datapump Export a