Spry:state unexpected results
I am using Spry/AJAX to populate a page, but whenever the
page loads you see the dynamic content tags in the form fields and
then it reloads with the data in the form fields. Is there any way
to make it not show the dynamic content tags and just show the form
once the data is in the form fields? Go to the following link to
see what I mean:
http://www.homesandagents.com/Members/contact_info.asp?userID=10000&sessionID=&contactID=1 0064
I tried using spry:state="loading", but it still shows the
form with the dynamic tags first (ie. {last_name}), then the
loading state, and then finally the ready state.
I'm not seeing the data references when I load your page. But
that may be due to the fact that it looks like you've added the
SpryHiddenRegion class to your region.
--== Kin ==--
Similar Messages
-
Spry:state not working properly
Hi,
I have the following code wrapped around my page:
<div spry:state="loading"
class="AjaxLoadingLarge">Loading...</div>
<div spry:state="error">Sorry! An Error has
occurred!</div>
<div spry:state="ready">
PAGE CODE HERE
</div>
Whilst the page is loading, the Loading State Appears on the
screen normally but also has the Error State Content and the Ready
State Content (unpopulated with Data) - ie it's the table with all
the header row and 1 results row displaying the dataset field names
{EventID} {EventDesc} etc.
Once the page is loaded, everything displays perfectly, It
just looks as though the "state" is not being handled properly
until the state becomes ready.
Anyone else seen this problem? and any ideas?
DomHi - Thanks for the response.
The previous line of code now reads:
<div spry:region="ds1" class="SpryHiddenRegion">
and I have closed the DIV off but it has made no difference
whatsoever - but there is no class in any .css for this.
Having Googled this, I found that some people have a class in
the .css as display:none. I added this and nothing is then visible.
Any further ideas?
Dom -
Method from Random class yields unexpected results
Hi,
I understand that the following code should generate a random integer within the range of 0 - 3, but the range is actually 0 - 4. Can someone tell me why it doesn't behave as expected? Could it be the version of Java I'm using?
Random rand = new Random(47);
int a = rand.nextInt(4);Thanks!gluedtothecomputer wrote:
You're right! It seemed to be producing unexpected results because I had incorporated a switch statement without breaks (part of my assignment). So, .nextInt() works as expected.
Thanks!Since you didn't post that code or even allude to it, it would have been hard for use to guess that's what you did, right?
That's why the best way to ask for help is for you to write and post a SSCCE .
Keep that in mind for your next post. -
Spry:state and dynamic accordion
When I use a dynamic accordion (i.e. populated by a dataSet),
the accordion functionality disappears. Here is my code. Am I doing
something wrong, or is this just a bug?
Thanks
Andy
<div spry:region="dsOrders">
<div spry:state="loading">Data is
loading...</div>
<div spry:state="error">Error loading
data...</div>
<div spry:state="ready">
<div id="orders" class="Accordion">
<div class="AccordionPanel" spry:repeat="dsOrders">
<div class="AccordionPanelTab"><h3
spry:content="{ORDERNUM}"></h3></div>
<div class="AccordionPanelContent"><span
spry:content="{ORDERDATE}"></span></div>
</div>
</div>
</div>
</div>This might also be helpful to some. Not only do we have
states in SPRY... but events! Here is how I did it on a site that
has a dataset called dsOpportunities. The following HTML/Javascript
was added to the head tags of the HTML. Then the on <body
onload="afterReady()" > was used to make sure it was run.
Remember that your section you are hiding needs to have a class
with the same senario. (Or if it is unique you could do something
simular with ID rather than class.
<script>
function afterReady() {
$('pageContent').style.visibility = 'hidden';
var iSPRY = new Object;
iSPRY.onPostLoad = function(dataSet,data) {
$('pageContent').style.visibility = 'visible';
dsOpportunities.addObserver(iSPRY);
</script>
<style>
.pageContent {
visibility: hidden;
</style> -
Spry:state="loading" for Spry.Utils.updateContent
It would be very handy to be able to use something like
spry:state="loading" for Spry.Utils.updateContent. Right now it
seems you can only use the :state="loading" for regions. Makes
sense but being able to activate the loading div while update
content is running would also be very handy. To that matter for
waiting for tabs to load, etc.Cool. Thanks for the reference, Andrew!
-
Network Model - Arcs create unexpected results
Hello Spatial Users,
I have created a road network using the "Automatic" Network Definition, loaded all the nodes and links, and everything seems to be OK. It all validates, links and nodes have the correct values. It is an undirected network.
I can create shortest paths, but the issue I'm having is arcs within the links are returning unexpected results. It is as though the start of the arc is used and then it follows the arc and jumps back to the end of the line - so the shortest path is not the shortest with all this jumping from start to finish of the arcs within the line string.
Do I need to convert the arcs to lines or am I missing something else? I was hoping that because it was 'undirected' this would resolve this issue.
We are using 11.1.0.6.0.
Thanks for your help,
KerryneHi, Kerryne,
NDM doesn't support arcs in its spatial path representation. For arcs it will only use start and end pt of the arc. You need to approximate arcs as linear segments for link geometry to get a more accurate path geometry.
Regards,
Jack -
Using spry:state="loading" only after a certain interval
Hi everyone ,
I need a feature for spry regions. I want my loading spry state to show only loading of data takes 0.5 seconds and more.
Is it possible with this version of spry?
Ps1 : you can find a live example of my need in google webmaster tools' content section,content by title page. There is an ajax listview with paging on page and loading div only apeears if loading of data takes more than a certain milliseconds.
Ps2 : Spry rulezzzzvw2ureg wrote:
Hi,
Go here and scroll down to ErrorState, LoadingState and ReadyState.
I hope this helps.
Ben
That will only tell Spry that it should should use different "state" as loading state. But it doesn't display a loading state after a certain interval. This functionality does not exist in the Spry library. But you could create a custom "loading" state that you automatically trigger using setTimeout if your haven't gotten a onPostUpdate through your region observer.
But i'm curious why you would wanna do create a have the loading state after a certain interval. -
Unexpected result from treenode.getPath() ???
Hi,
I am using Jtree in application.
The tree is as following
- Desktop
-C:\
- Folder1
- File2
- D:\I want to expend the node Folder1 as selected node. To do that I got the FileNode Folder1 and do
TreePath path=new TreeaPath( folder1node.getPath() );
int row=tree.getRowForPath(path);
jtreetable.expend(row);
But the problem is with the path returned. I must get the path [Desktop, C:\, Folder1] but I am getting path [Folder1].
What I am doing wrong. Is there any other way to expend a particular node programatically ?
ThanksAndy,
You should contact support with regards to this issue. It is a known
problem, you can reference CR042529.
Cheers!
Adam
"Andy Kimbrough" <[email protected]> wrote in message
news:3ae8b1f7$[email protected]..
randomly I get the following error in my weblogic.log. The server stopsresponding and I get about a million of these entries, what is going on? I
am running on Linux 6.2....<Error> <Posix Performance Pack>
<mdw2.neomorphic.com> <myserver> <ExecuteThread: '49' for queue: 'default'>
<><><00000><Uncaught Throwable in processSockets>java.io.IOException:
unexpected result from poll: -1at weblogic.socket.PosixSocketMuxer.pool
(Native Method)at weblogic.socket.PosixSocketMuser.processSocktesat
weblogic.socket.SocketReaderRequest.executeat
weblogic.kernel.ExecuteThread.executeat weblogic.kernel.ExceuteThread.run -
Unexpected Result with Application Process
Hi Everyone,
I have an application process which is producing unexpected results. The code is below. What does is, updates one table, then based on that update inserts some data into a different table. The process workes fine. However, when the table gets updated it updates by 2 when it should only update by 1. Does anyone see where i am going wrong?
Its really anoying lol
Thanks in Advance
-N.S.N.O.
Code*
BEGIN
update pzrckt01 set CLK_NEXT_NR = CLK_NEXT_NR+1 where CLK_PARTITION_ID='QWC';
htp.p('Start debugging');
htp.p('QWC_KEY_ID : ' ||wwv_flow.g_x02);
htp.p('SYS_ID : ' ||wwv_flow.g_x03);
htp.p('QWC_DELETE_CD: ' ||wwv_flow.g_x04);
htp.p('QWC_CUS_ID : ' ||wwv_flow.g_x05);
htp.p('COU_ID_QWC : ' ||wwv_flow.g_x06);
insert into PZRCUT01 (QWC_MYTNT_ID,QWC_KEY_ID,SYS_ID,QWC_DELETE_CD,QWC_ADD_TD,QWC_ADD_USER_ID,QWC_UPDT_TD,QWC_UPDT_USER_ID,QWC_SOFTLOCK_TS,QWC_CUS_ID,COU_ID_QWC) values ((select clk_next_nr from pzrckt01 where CLK_PARTITION_ID ='QWC'),wwv_flow.g_x02,wwv_flow.g_x03,wwv_flow.g_x04,(select sysdate from dual),(select :APP_USER from dual),(select sysdate from dual),(select :APP_USER from dual),(select systimestamp from dual),wwv_flow.g_x05,wwv_flow.g_x06);
EXCEPTION WHEN OTHERS THEN
htp.p('Exception');
htp.p(SQLERRM);
END;Hey,
There are no triggers on these tables im working with. A way to get around waht im tryin to do is have 2 application processes, one for the update and one for the insert. but to do this i would need them to be fired off using the same button.
for example in my HTML Header having a function within a function.
function pzrcut01Insert(){
function pzrckt01Update(){
var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=update_pzrckt01',null);
var ajaxRequest1 = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PZRCUT01_INSERT',null);
ajaxRequest1.addParam('x02', $v('P6_QWC_KEY_ID'));
ajaxRequest1.addParam('x03', $v('P6_SYS_ID'));
ajaxRequest1.addParam('x04', $v('P6_QWC_DELETE_CD'));
ajaxRequest1.addParam('x05', $v('P6_QWC_CUS_ID'));
ajaxRequest1.addParam('x06', $v('P6_COU_ID_QWC'));
var Answer = confirm('Are you sure you want to update?');
if (Answer) {
gReturn=ajaxRequest1.get();
if (gReturn) {
alert(gReturn);
ajaxRequest1.get();
alert('Attempted Insert Processed');
}else{
alert('Attempted Insert Cancelled');
would this be possible?
-N.S.N.O. -
Spry:State and PagedView
Dear Member,
hope that somebody can help me this time..
I am using spry, and a lot of trick to make it work.
The spry:state="loading" options don't wanna work for me
it's only work if i don't use the PagedView...
Here the simple code
I have a simple XMLdataset:
var dsmio = new Spry.Data.XMLDataSet("Xml/filexxx.asp", "Clienti/Cliente", {sortOnLoad: "RagioneSociale", sortOrderOnLoad: "ascending", useCache: false});
and a pagination on it:
var paginazione = new Spry.Data.PagedView( dsmio ,{ pageSize: 50 });
finally the code to show my data:
<div spry:region="paginazione">
<div spry:state="loading">Loading Data - Please stand by...</div>
<div spry:state="error">OPS, something went wrong!</div>
<div spry:state="ready">
<table width="100%">
<tr>
<th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="RagioneSociale">RagioneSociale</th>
<th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="Email">Email</th>
<th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="Telefono">Telefono</th>
<th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="PersonaRiferimento">PersonaRiferimento</th>
</tr>
<tr spry:repeat="paginazione" class="{ds_EvenOddRow}">
<td width="25%" height="20">{RagioneSociale}</td>
<td width="25%" height="20">{Email}</td>
<td width="25%" height="20">{Telefono}</td>
<td width="25%" height="20">{PersonaRiferimento}</td>
</tr>
</table>
</div>
Hope some Guru can help meHi guys!
This is easy to solve:
You have to work in two different regions!
<div spry:region="dsmio">
--- Put the loader here...
</div>
<div spry:region="paginazione">
content
</div>
You can hide the "layout" of the content by :
<div id="content" spry:if="'{ds_PageTotalItemCount}' != ' ' ">
content...
</div>
ds_PageTotalItemCount is empty during loading.....
Have fun & keep coding -
Colors in JTable - unexpected result when scrolling
Hi Guys,
Looks like I'm having a problem with a JTable.
I have a list of items and they are distinguished by 2 colors (so the end-user can differentiate between them). Anyway, the table colors work ok but when using a JScrollbar the table receives an unexpected result � few of the first items (which are not identical) share the same color.
anyone?
Example of an output (Gil will be colored Green, Dan Yellow, James Green�and so forth)
Gil
Gil
Gil
Dan
Dan
Dan
James
James
James
James
my code looks like this (I'll appritiate if someone can point out where I can have the html tags to display it correctly)
aTable = new JTable(dataModel)
public Component prepareRenderer(TableCellRenderer r, int row, int col)
Component c = super.prepareRenderer(r, row, col);
Color bg = Color.YELLOW;
String[] valuesRaw = (String[]) model.elementAt(row);
if (changeRround)
name1=valuesRaw[0];
changeRround=false;
name2=valuesRaw[0];
if (!name1.equals(name2))
this.switchColor(bg,c);
changeRround=true;
return c;
public void switchColor(Color bg, Component c)
if (colorSwitcher%2==0)
bg = new Color(221, 250, 207);
c.setBackground(bg);
c.setForeground(Color.BLACK);
else
bg = new Color(253, 252, 193);
c.setBackground(bg);
c.setForeground(Color.BLACK);
colorSwitcher++;
}I'm getting there...
aTable = new JTable(dataModel)
public Component prepareRenderer(TableCellRenderer r, int row, int col)
Component c = super.prepareRenderer(r, row, col);
Color bg = Color.YELLOW;
String[] valuesRaw = (String[]) model.elementAt(row);
if (changeRround)
name1=valuesRaw[0];
changeRround=false;
name2=valuesRaw[0];
if (name1.equals(name2))
else
this.switchColor(bg,c);
changeRround=true;
return c;
public void switchColor(Color bg, Component c)
if (colorSwitcher%2==0)
bg = new Color(221, 250, 207);
c.setBackground(bg);
c.setForeground(Color.BLACK);
else
bg = new Color(253, 252, 193);
c.setBackground(bg);
c.setForeground(Color.BLACK);
colorSwitcher++;
} -
How do I make the spry:state="loading" work with your image
gallery? I can get it to work just fine when its loading dataset
but when you click a thumbnail it doesnt work the same. would the
spry:state need to be added to the gallery.js since that has the
function that handles the changing of the image?Hi,
The spry:state="loading" attribute can be used only inside a
spry:region or spry:detailregion - it's content is diplayed while
the
markup gets updated, but this doesn't include the time all
the resources inside that markup are downloaded (for example, if
there are images inside that region, when the spry:region gets
updated, the "loading" content is displayed only for the time the
markup containing <img src=".."> gets inside the page.
Loading is not displayed while the image is actually downloaded by
the browser).
For the gallery demo, the markup for the big image is not
inside a spry:region because the url for the image is set from
custom functions inside gallery.js that uses data from the existing
datasets. It's done this way because effects are added when the
image is displayed.
regards,
Dragos -
Hello,
I'm wondering if I can force the spry:state="error" from the
server. Here's what I'm attempting to do:
1. User logs in using a form.
2. Login name / password verification script (in PHP) creates
a session cookie with a randomly generated code and updates a user
db with that code to track the session.
3. When the user requests data, the server side script (in
php) first validates the cookie against the session code in the
database and returns the requested data if the code in the cookie
matches the code in the db. (if exists).
4. If the cookie does not exist or does not match, then I'd
like the script to return a spry:state="error" and have the html in
that state block displayed (requests the user to log in, or
redirects them to a login page).
I've seen a post where it was suggested to return an empty
set, but this is a somewhat different behavior. Can you force a
spry:state to "error"? Am I over complicating this whole process?You can force a region to display a specific state
programatically like this:
var rgn = Spry.Data.getRegion("myRgnName");
if (rgn)
rgn.setState("error");
You can see this being done in this sample:
http://labs.adobe.com/technologies/spry/samples/data_region/RegionStatesSample.html
Also check out state mapping:
http://labs.adobe.com/technologies/spry/samples/data_region/StateMappingSample.html
--== Kin ==-- -
Spry:state="error" field is always visible?!
I define layers to display the current spry:state, one for
spry:state="loading", the second for spry:state="error" and the
third for spry:state="ready". The problem is that
spry:state="error" field is always visible along with
spry:state="loading"?! Am I making some mistake or what? Here is a
part of relevant code:
<div id="vijesti" spry:region="pvVijestiMini"
class="vijestimini">
<div id="ucitavanjemini" spry:state="loading"
class="indikator">
<p>
<span><img
src="slike/pomocne/loader.gif"></span>
<span>Podaci se učitavaju...</span>
</p>
</div>
<div id="greskamini" spry:state="error"
class="indikator">
<p>
<span><img
src="slike/pomocne/loader2.gif"></span>
<span>Podaci ne postoje ili su
nedostupni...</span>
</p>
</div>
<div id="podaci" spry:state="ready">
<span class="vijestnaslov">Čikom vijesti
[{ds_UnfilteredRowCount}]</span>
<div id="redovimini" class="redovimini">
<div class="red" spry:repeat="pvVijestiMini">
<p class="podnaslov">
<span>{datum}</span><br>
<span class="naziv">{naziv}</span>
</p>
<p>
<span>{ukratko}<a
href="index.php?jezik=0&meni1=3&meni2=0&meni3=0"><img
src="slike/pomocne/dalje.gif"
class="dalje"></a></span>
</p>
</div>
</div>
<div id="navigacija">
<div spry:if="{ds_UnfilteredRowCount} == 0">Nema
podataka u tabeli "Vijesti"!</div>
<div spry:if="{ds_UnfilteredRowCount} > 0">
<div><a href="#"
onclick="pvVijestiMini.firstPage(); return
false;">|<</a><span> </span></div>
<div><a href="#"
onclick="pvVijestiMini.previousPage(); return
false;"><<</a></div>
<div> stranica {ds_PageNumber} od
{ds_PageCount} </div>
<div><a href="#" onclick="pvVijestiMini.nextPage();
return
false;">>></a><span> </span></div>
<div><a href="#" onclick="pvVijestiMini.lastPage();
return false;">>|</a></div>
</div>
</div>
</div>
</div>
The second question: How do I hide region container until it
gets filled with data?Look, you got me all wrong. I don't want to hide a main
region, just the spry:state="error" appearing the same time as
spry:state="loading"!!!
<div id="ucitavanjemini" spry:state="loading"
class="indikator">
<p>
<span><img
src="slike/pomocne/loader.gif"></span>
<span>Podaci se učitavaju...</span>
</p>
</div>
<div id="greskamini" spry:state="error"
class="indikator">
<p>
<span><img
src="slike/pomocne/loader2.gif"></span>
<span>Podaci ne postoje ili su
nedostupni...</span>
</p>
</div> -
Unexpected results from IF statement
Can you please tell me why I am not dropping inside this IF statement as I would expect?
Snippet from PL/SQL script...
dbms_output.put_line('------------- TEMP DEBUG : About to enter for loop for existing licencees');
-- DELETE EXISTING LICENSEES THAT SHOULDN'T BE THERE
for r_existing_licensees in c_existing_licensees(r_licences.licenceid) loop
dbms_output.put_line('------------- TEMP DEBUG : Inside for loop for existing licencees where r_existing_licensees.customerid = [' || r_existing_licensees.customerid || ']');
dbms_output.put_line('------------- TEMP DEBUG : ................................r_licences.newcust1 = [' || r_licences.newcust1 || ']');
dbms_output.put_line('------------- TEMP DEBUG : ................................r_licences.newcust2 = [' || r_licences.newcust2 || ']');
dbms_output.put_line('------------- TEMP DEBUG : ................................r_licences.newcust3 = [' || r_licences.newcust3 || ']');
dbms_output.put_line('------------- TEMP DEBUG : ................................r_licences.newcust4 = [' || r_licences.newcust4 || ']');
dbms_output.put_line('------------- TEMP DEBUG : ................................r_licences.newcust5 = [' || r_licences.newcust5 || ']');
if r_existing_licensees.customerid <> r_licences.newcust1
and r_existing_licensees.customerid <> r_licences.newcust2
and r_existing_licensees.customerid <> r_licences.newcust3
and r_existing_licensees.customerid <> r_licences.newcust4
and r_existing_licensees.customerid <> r_licences.newcust5
then
dbms_output.put_line('------------- TEMP DEBUG :');
dbms_output.put_line('------------- TEMP DEBUG : .................................About to logically delete where r_existing_licensees.customerid = [' || r_existing_licensees.customerid || ']');
Log from DBMS_OUTPUT...
------------- TEMP DEBUG : About to enter for loop for existing licencees
------------- TEMP DEBUG : Inside for loop for existing licencees where
r_existing_licensees.customerid = [2805371]
------------- TEMP DEBUG : ................................r_licences.newcust1
= [2806250]
------------- TEMP DEBUG : ................................r_licences.newcust2
= []
------------- TEMP DEBUG : ................................r_licences.newcust3
= []
------------- TEMP DEBUG : ................................r_licences.newcust4
= []
------------- TEMP DEBUG : ................................r_licences.newcust5
= []
The bold, italic DBMS_OUTPUT lines never appear in the log, so I am NOT falling insided the IF statement even though the criteria are being met. What's the deal?
Thx in advance.
Guyif r_existing_licensees.customerid <> r_licences.newcust1 and
r_existing_licensees.customerid <> r_licences.newcust2 and
r_existing_licensees.customerid <> r_licences.newcust3 and
r_existing_licensees.customerid <> r_licences.newcust4 and
r_existing_licensees.customerid <> r_licences.newcust5
thenit could be that some of your columns are nulls. try something like:
if nvl(r_existing_licensees.customerid,0) <> nvl(r_licences.newcust1,0) and
nvl(r_existing_licensees.customerid,0) <> nvl(r_licences.newcust2,0) and
nvl(r_existing_licensees.customerid,0) <> nvl(r_licences.newcust3,0) and
nvl(r_existing_licensees.customerid,0) <> nvl(r_licences.newcust4,0) and
nvl(r_existing_licensees.customerid,0) <> nvl(r_licences.newcust5,0)
then
note: assuming that they are number of datatypes.
Maybe you are looking for
-
ITunes Locks up when Library moved to NAS
I recently bought a Synology DS1511+ NAS in part to store my growing iTunes library. So I followed Apple's directions for moving my iTunes Library; changed the default library location to a share on my nas,then consolidate the library to have iTunes
-
Most cameras support manual, or even automatic rotation, and keep this setting upon download. Furthermore, most applications both shrink-wrapped, and online (Flickr, e.g.) read this rotation meta-data and display the photos properly. AppleTV, however
-
Iweb, personal domain, CNAME problems
Hi, We have the following problem, no assistance being provided from .dotmac (2 days, 3 days - 2 requests). Symptoms: we have followed apple's instructions: 1) Ensuring that we have a proper domain name (www.xxx.com.au) 2) Ensuring that we have creat
-
Cost Center and res cost center
Hi team, When i am going to settle the cost of PM Order , COst center pick from Equipment sonly. Then what is the use of assignemnt of cost center in work center. thanx in advance
-
I have a T40p, and my daughter has a T42. The T42 system software has advantages including: 1 The rescue and recovery partion (type 0X12) is visible to backup and partitioning programs, so it can be backed up, and reinstalled, for example, on a new