Spry dataset: change URL and reload
OK, gang. One here's another lump of code chum:
I'm trying to be a bit more secure with my app, so I have a
dataset that begins with some dummy data:
var G_dsApprovedAssets = new
Spry.Data.XMLDataSet("/_testData/dummyAssetOverview.xml",
"root/assetList",{useCache:false});]
Which stays as dummy data until a user logs in properly. At
that point, I have data returned that changes the URL of the
dataset and then reloads and refreshes:
HTTPRequest data returned from login processor:
$updateDs =
"G_dsApprovedAssets.setURL('/data_engine.php?dt=assets&st=pending');";
and in the main:
eval($updateDs);
G_dsApprovedAssets.loadData();
Spry.Data.updateRegion('statusData');
Is there a reason this isn't working? I've tried all sorts of
things and it seems the data in the dataset isn't being refreshed
with loadData() but the URL
IS being set correctly.
Any thoughts or ideas will be appreciated.
Thanks!
Scott.
OK, gang. One here's another lump of code chum:
I'm trying to be a bit more secure with my app, so I have a
dataset that begins with some dummy data:
var G_dsApprovedAssets = new
Spry.Data.XMLDataSet("/_testData/dummyAssetOverview.xml",
"root/assetList",{useCache:false});]
Which stays as dummy data until a user logs in properly. At
that point, I have data returned that changes the URL of the
dataset and then reloads and refreshes:
HTTPRequest data returned from login processor:
$updateDs =
"G_dsApprovedAssets.setURL('/data_engine.php?dt=assets&st=pending');";
and in the main:
eval($updateDs);
G_dsApprovedAssets.loadData();
Spry.Data.updateRegion('statusData');
Is there a reason this isn't working? I've tried all sorts of
things and it seems the data in the dataset isn't being refreshed
with loadData() but the URL
IS being set correctly.
Any thoughts or ideas will be appreciated.
Thanks!
Scott.
Similar Messages
-
HOWTO: Changing the URL and reloading the dataset
Sometimes, you will need to change the url of your dataset
and reload the dataset. This is quite easy to do with changing a
variable and calling a method. Below is the code you would use. I
use it to page through a set of data which only comes back in 10
row increments and we do not know the recordcount of. (Yippee,
Oracle E1). Anyway, here's the code....
<script type="text/javascript" language="javascript">
rowCount = 0;
dsPeople = new
Spry.Data.XMLDataSet("/spry/?event=peopleSearch&srchRowStart="
+ rowCount,"/orders/row", { useCache: false });
function changeRowCount()
rowCount = rowCount+10;
var spryURL = "/spry/?event=peopleSearch&srchRowStart="
+ rowCount;
dsPeople.url = spryURL;
dsPeople.loadData();
</script>
<div spry:region="dsPeople">
<div spry:state="loading"><img
src="/assets/images/ajax-loader.gif"/></div>
<div spry:state="error">Error Loading
Data...</div>
<div spry:state="ready">
<div spry:repeat="dsPeople">
<span spry:content="{dsPeople::NAME}"></span>
</div>
<a href="javascript:changeRowCount()"><span
spry:content="Next 10 Records"></span></b>
</div>
</div>Enabling SSL for Central Administration is a good idea. Making it so it is only accessible using an IP address doesn't make it any more secure. This is security through obscurity and anyone dedicated enough to attacking Central Administration will find the
site whether it's an IP address or named.
For what it's worth an attacker is going to try scanning IP ranges long before they try looking at DNS. And, because of the way SharePoint works if the site is accessible by its IP address and not a specific hostname, anyone who knows the IP address and
the SSL port (443) can connect. If you have a hostname it won't be immediately accessible.
Some other thoughts: When you rely just on the IP address, what happens if you want to move Central Administration to another server in the farm, or you want to provide load balancing and have multiple servers hosting Central Administration? What happens
when the server running Central Administration dies so you create a new Central Administration site on a server with a different IP address? How will you communicate this URL change to all of your administrators?
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights
Sorry,
I wasn't clear in my OP. The IP would be tied to a DN. So you would go https://abc123.com and it would ask for authentication. That URL would be tied to a separate IP on the network card of that server. The IP address association
is done through IIS. -
I was testing some calls to a Solr index with different URL query parameters. But each time I adjust a parameter and reload the page, instead of making the call again I'm dropped into Google search.
However, if I (tediously) manually edit the URL to specifically add back in "http://" at the beginning of the line I can reload the page.
This doesn't happen in Safari or Chrome. It seems to be a problem unique to FireFox.
It makes testing cumbersome and I was wondering if there was a solution for this.
Thanks,
dougCould you describe how you are making the calls? For example, are you setting window.location.href, using window.open(), etc.? Submitting a form?
One reason for getting a search could be a space in the URL. Is there any way to avoid spaces in the URL, or can you confirm that they are being properly encoded to %20?
Do you want to try disabling address bar search (keyword search) as a workaround? https://support.mozilla.org/en-US/kb/search-web-address-bar#w_turning-off-the-internet-keyword-search -
How to customize an existing OAF page from Oracle, change it and reload it
Hello all Oracle Developers,
I am having a question regarding to customization, basically I am going to follow a very simple example.
We have form: APXVDMVD and OAF web Page AP_APXVDMVD.
Applying all our custom code via forms personnalisation is piece of cake. However trying to apply the same code to OAF web Page AP_APXVDMVD
is a total back box for us.
The basic example seems like this: Suppose that in the Suppliers/Vendors Page we type the supplier name and then right after that we populate in consequence all the fields:
Taxpayer ID, Tax Registration Number, DUNS Number
We want to grab the OAF Web page from oracle apply the custom code in java code or whatever necessary to make it work and deploy it onto the server.
Is this achievable, if so how we can do it??? Can we grab the web page extend the classes that are necessary and deploy the solution. The demo provided from Oracle
is showing how to create pages from zero, however Oracle have not provided how to grab an existing applications page, put the code and the deploy it
Let me know any inputs, whatever you did and surely we will be sharing the same stuff all migration R12 long :-)Hi,
You can extend OA framework pages and customize them. There is also a section for customizations in the OA Framework Developer's guide. IF this requires extensive customizations, Iwould advice to be very careful as any extensions should not interfere with the base logic of the pages. Please post here if you need more details.
The following blog is a good one for some examples.
http://oracle.anilpassi.com/oa-framework-extending-controller-steps-2.html
There is also a course for the same if you are interested.
http://education.oracle.co.uk/html/oracle/15946US/D18280GC10.htm
Hope this helps.. -
Modify HTML of the document of the rendered page and reload
Currently i am loading a url in javafx through webengine.load(url). My requirement is to keep the styling in tact with the original page. However, once the page is rendered, the fonts are not loaded and i am unable to increase the font sizes. I worked through the following steps to achieve this.
1. Add a listener through getLoadWorker method for web engine and get the document object when the state is SUCCEEDED.
2. Transform the document to a html string which gives me the whole HTML of the page in a string including the css.
3. Then i do a replace on the css part with the actual location of the font files (absolute path url) and reload the html through loadContent method.
With this, i am able to get the fonts loaded properly.
Problem:
1. I end up with a infinite loop when i use the "webEngine.loadContent(string, "text/html")" inside the getLoadWorker method.
2. I tried to do that outside the getLoadWorker method before the webEngine.load(url) but in this case the replace html body string is coming as null.
Any help on how to achieve this?? Below is my code:
webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
String htmlBody = null;
@Override
public void changed(ObservableValue<? extends Worker.State> observableValue, Worker.State prevState, Worker.State newState) {
//To change body of implemented methods use File | Settings | File Templates.
//String htmlBody = null;
int count = 0;
if (newState == Worker.State.SUCCEEDED) {
browser.requestFocus();
// Get the document object from Engine.
Document doc = webEngine.getDocument();
try {
// Use Transformer to convert the HTML Object from the document top String format.
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.METHOD, "html");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
StringWriter outWriter = new StringWriter();
transformer.transform(new DOMSource(doc),new StreamResult(outWriter));
StringBuffer sb = outWriter.getBuffer();
htmlBody = sb.toString();
// Replace the font-family attribute in the style section to the actual URL of the font being used.
htmlBody = htmlBody.replace("font-family: medium", "font-family: url(http://1.10.30.45:8080/fonts/Md.ttf)");
// Load the new HTML string to the Engine.
//webEngine.loadContent(htmlBody, "text/html");
} catch (Exception ex) {
ex.printStackTrace();
webEngine.load(url);
//add the web view to the scene
getChildren().add(browser);James,
I tried the document manipulation but was unable to override the css that was already applied. I downloaded and used jdk 8 which has the latest version of javaFX which fixed the font loading issue. Now i can see all the custom fonts and everything getting loaded as part of css.
However, when i try to capture the state of the worker, it stays in the running and not changing to success. First few instances, the page was loaded successfully but then it stopped. Any idea if this is due to the new javaFX version of jdk8? Below is the code snippet:
webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
@Override
public void changed(ObservableValue<? extends Worker.State> observableValue, Worker.State prevState, Worker.State newState) {
//To change body of implemented methods use File | Settings | File Templates.
System.out.println(newState);
if (newState == Worker.State.SUCCEEDED) {
browser.requestFocus();
// Get the document object from Engine.
Document doc = webEngine.getDocument();
System.out.println(doc.getDocumentURI());
webEngine.load(url);
//add the web view to the scene
getChildren().add(browser);
The output is
SCHEDULED
RUNNING
and nothing after that... -
After some time working with ASP and databases I've tryed to
experiment with
Spry as I though it would be more powerful and easy to work.
After some
tests I'm totally frustrated with it.
I've seen that I can create a Spry dataset but it only allows
to get
information from an XML or HTML table. This makes information
totally
static. I know that I can build an ASP page that query a
database and
creates the XML. But I've not found any way to pass diferent
parameters on
the Spry dataset wizard to call this ASP.
I though that I can use querys to create Spry datasets with
searches and
filter information. But now seems almost impossible to me.
I'm missing
something or is this Spry dataset useless?
Regards,
AngelThanks Massimo!
I've checked you example and I don't have much knowledge of
Could Fusion as
I'm used to ASP. But I see that it can be done. I will study
it further.
As I'm not a big coder I just want to create this using
Dreamweaver server
behaviours and Spry elements, but I''m stuck as it seems that
the Spry
dataset doesn't have an option to pass a parametter when
calling the ASP
page that querys the database.
Basically I need to create a Spry dataset but tell the
dataset to call a
"query.asp page" with a parametter "id=x" so the dataset will
call the ASP
and generate the XML with the choosen "x" parameter. As it
seems the dataset
object is simply created when the page is open I don't know
how to recall it
with different parameters to change his contents.
Regards,
Angel
>
> You are indeed missing something :-))
>
> You can send either a GET or POST request to the .asp
page that creates
> the XML or JSON used to feed the dataset. The search
parameters can be
> either inside the querystring for GET or inside the POST
request.
>
> I am sorry I don't have any ASP sample available, but
here you can find a
> small demo with insert/update/delete and search that
uses CF and Spry:
>
http://www.massimocorner.com/spry/dynamic_spry.zip
>
> Hope it could help.
>
>
> --
> ----------------------------
> Massimo Foti, web-programmer for hire
> Tools for ColdFusion, JavaScript and Dreamweaver:
>
http://www.massimocorner.com
> ----------------------------
>
>
>
>
>
> -
Hi guys, first time posting with a pain-in-the-bum problem i have been trying to figure out all day.
I want to display certain records in my xml file depending on a link being clicked on a previous page. Below is my current code:
// Create variable is_input to see if there is a # in the url
is_input = document.URL.indexOf('#');
// Check the position of the # in the url
if (is_input != -1)
// Create variable from # in the url to the end of the string
addr_str = document.URL.substring(is_input+1, document.URL.length);
// Loop through the url and write out values found
// or a line break to seperate values by the &
for (count = 0; count < addr_str.length; count++)
if (addr_str.charAt(count) == "&")
// Write a line break for each & found
{document.write ("<br>");
}else{
url_variable = (addr_str.charAt(count));
// Write the part of the url
document.write (url_variable);
}else{
document.write("No values detected");
var dsGlossary = new Spry.Data.XMLDataSet("glossary1.xml", "glossary/glossary_term[glossary_term_heading = url_variable]");
If you look at my dataset string you will see a variable called url_variable - i want to match records where url_variable = glossary_term_heading. I can write out url_variable to the page using document.write (url_variable); but cannot format it in such a way as for it to work within the dataset string.
Any help would be greatly appreciated!Hi guys, me again. I just had a look at my post above and thought maybe i was waffling a bit. To summarise, all i want to do is have the dataset "dsGlossary" read the javascript variable. "url_variable" so i can match that with "glossary_term_heading" (a field in my XML file).
Again, thanks in advance for your replies. -
Pass url ? parameter into spry dataset
Further to my last post, i have a gallery page which shows
list of thumbnails, with a selected image and a list of associated
comments, all generated from dynamic xml.
When the user adds a comment (a different page) they are
forwarded back to the gallery, and i would like the display the
image which has just had a comment added. How can i use a url or
other parameter with my xml dataset?Thanks for the links. This looks really useful.
I have 2 problems i can't resolve.
If I type the following...
var url = "
http://localhost/weddingPHP/gallery.php?imageID=101";
var params = Spry.Utils.getURLParamsAsObject(url);
alert(params.imageID);
my page loads ok, and i get an alert of '101'
However i can't seem to retrieve the url of the current page
without getting an error.
i have tried
var params = Spry.Utils.getLocationParamsAsObject(); and
var params =
Spry.Utils.getURLParamsAsObject(window.location).
a second problem i have is when i load my gallery page from a
link, i dont get the alert message at all, the url being identical
to the var url above
hope this makes sense -
Dw cs5.5 + Phonegap + spry dataset xml and images links broken
Hi all,
I'm building an app using DW CS5.5 and Phonegap.
This is what I've done:
created pages using the starter template (local)
I created a php page that run a query on a mysql database and output an xml file
I created a spry dataset using the php (see 2) file as data file
It works locally and on-line on my website.
But if I package an app using the android sdk from dw CS5.5 I have problems: all images are all broken. It seems that the link to image is not correct.
In fact, all images are not using absolute path (http://www.mysite.com/images/...) but are set this way: /images/....
So, my question is: have I to specify all images sources using absolute paths to make it work when packaged?
TIA for any reply
tonyHi Gramps,
I just solved the problem with image paths (I made all src paths absolute).
There is only one problem left: I opened another discussion: http://goo.gl/ysNDH
But here the link you (correctly) need to trobleshoot the problem): http://www.camar.it/newsxml
It should work on desktop browsers but it fails when I pack the app for android and install it on an android smartphone: I get "error loading page" when clicking on any details link (the button label is: DETTAGLI) on the news page.
Tony -
Dear Volunteers,
I am looking for a solution for Firefox Win App and Mobile Apps where on click of a button from the website page, we should be able to launch a new instance of firefox instance (like a popup box) with following features:
a. It SHOULD NOT have any URL bar to display.
b. It SHOULD NOT show any plug-ins or any other functionality except Previous, Next and Reload.
c. This instance of firefox should always be on-top of all other application.
Please advise, how firefox can be customized to offer in all platforms by default.
With lot of hope from this volunteer community,
RajivYou would need your visitors to install some kind of add-on, since web pages do not have permission to block the display of the page address and users do not need to allow a new window to be modal and block other Firefox windows, much less other OS windows.
Over the years, people have developed extensions for kiosk-style displays. You could investigate those for ideas. -
Spry Accordions, Tabbed Panels, and Collapsible Panels: changing colors
I wanted to alert everyone to a great new Community article published by our very own David Powers. The article details the various best practices and methods for changing the colors of Accordion, Tabbed Panels, and Collapsible Panels widgets, including tab backgrounds, borders, and so on.
Here's the article:
http://kb2.adobe.com/community/publishing/504/cpsid_50437.html
Customization questions are pretty frequent in both the Spry and Dreamweaver forums. This new styling guide is sure to answer lots of peoples' questions.
Furthermore, the appearance of such an article is a great example of how Community content can interact and live symbiotically with Adobe Help. We've linked directly to David's piece from our own customization pages for the Spry Accordion, Tabbed Panels, and Collapsible Panels widgets:
Customize the Accordion widget
Customize the Tabbed Panels widget
Customize the Collapsible Panels widget
Thanks a lot to David for hammering out this article.
If you're interested in publishing Community articles of your own, you can download the Community Publishing AIR application and get right to work!The borders you see, are called outline, its a accesiblity feature of the browsers,
Actually called 'focus' lines :-)
Here's an article about the Bluefocus lines seen in Safari.
http://www.brunobergher.com/blog/2009/01/19/safaris-blue-focus-lines/
Without creating a Spry widget myself right now to test, but I'm sure thata there is a 'focus' rule in the css...
trying the
{outline:none;}
on that rule. -
i have totallymessed up outlook on my ipad, attempted to change password, and then couldn't send email and now can't access at all. can i reload "clean" new version and start all over?
Settings>Mail, contacts, calendars>Your email account name>Delete Account. A window will popu after you select your email account in the settings and there is a large red Delete Button at the bottom of the window.
Settings>Mail, contacts, calendars>Add account. Tap on Add account and start entering your email account details again. If your email account doesn't fit one the per installed accounts in there, tap on Other - and add your account in there.
I would restart the iPad after you delete the email account, just to be starting "fresh" again.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button -
Change portal URL and port number
Hello experts,
We are on EP 7.0 which is running on Solaris 5.10 and Oracle 10g.
Portal url is "http://hostname:50200/irj".
But we want to users to logon portal using "http://intranet" link.
How can we forwards portal default url to a different URL and port such as "http://intranet".
Steps should be followed in Visual Admin& Config Tool or in the Solaris system , in the network part?The link pointed to how to change the default page of the Java engine to launch the portal. The example redirects to /irj/portal/anonymous - you just want to make it /irj/portal...
Setting up SAP Web Dispatcher is covered in SDN quite well - search for SAP Web Dispatcher in the search aree on the right. Basically it takes about 5 minutes to setup.
Cheers -
I think this problem is a result of my lack of knowledge regarding XML but hope someone can help set me straight. I am using Spry datasets in several web pages all accessing HTML pages with data in tables format. These work great.
I would like to use XML files for some other data on another site I am working on and while the Spry Dataset wizard allows me to call the XML file the information I get in the Row Element panel and the Data Preview panel appear to have nothing to do with the XML file I am accessing. I am expecting a list of US states and instead get a heading called Types with Default and Override as the two indented lines beneath type.
I have tried several other xml files that I have created or downloaded as samples from the web and always get the same headings.
I am trying to insert into a plain vanilla HTML page.
What am I doing wrong? I have attached the XML file I am using
Hope someone can help.
Cheers
lesYou cannot do cross domain requests with Ajax, you will need to use a server side transporter / proxy to get the file for you.
Heres a nice proxy for PHP:
http://webreflection.blogspot.com/2009/05/php-full-proxy-work-in-progress.html -
Differentiating HTTP Request through a URL and a value change listener
Version Details:
Oracle JDeveloper 11g Release 1 11.1.1.4.0
Studio Edition Version 11.1.1.4.0
Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
IDE Version: 11.1.1.4.37.59.23
Product ID: oracle.jdeveloper
Product Version: 11.1.1.4.37.59.23
ADF Business Components 11.1.1.59.23
Java(TM) Platform 1.6.0_21
Oracle IDE 11.1.1.4.37.59.23
Versioning Support 11.1.1.4.37.59.23
Base Details:
The Product, that a different team is working on (<i><b>which I cannot access, code, touch,...</b></i>), creates reports and essentially generates a URL with a bunch of parameters:
http://<host>:<port>/myApplication/main.jspx?parameter1=value1¶meter2=value2...When the user clicks on an "Edit" button, a modal popup window is displayed (using jQuery) with an embedded iFrame with its source pointing to the above URL.
The "myApplication" is an ADF application which brings up an ADF form based on the parameters. Once the user enters the data, validations occur and the data is written into a total of 3 different Tables in the Database. Once the operation is finished, the user closes the popup by clicking on the "X" button of the popup window, which essentially does "popup.*hide()*".
Limitations:
<li>Since there are varied combination of parameter values and associated ADF forms, taskflows is not* an option.
<li>Since the logic of generating the ADF form is not straightforward, ADF BC is not* an option.
<li>Since validations are based on the value change listeners, the managed bean has to be a session scope_ bean.
Problem:
When, for the first time, the user clicks on the Edit button with a particular set of parameter values, the corresponding ADF form is displayed and things work normal. Since the managed bean is under session scope, the form generated for the first popup window stays the same for any subsequent popup windows, even when the URL and its parameters are completely different. As I can not listen to the popup close event, I cannot invalidate my session either.
I tried using filters in the web.xml to grab the request and apply the business logic. Due to the presence of multiple value change listeners (too many <tt>autosubmit=true</tt>), every value change listener triggers a request and so the business logic gets applied with every value change.
After some tests, I deduced that the difference between the call from iFrame and the call from value change is the HTTP Request Method - GET for iFrame and POST for value change listener. So in my filter I apply the business logic when there is a GET request and not apply when its a POST request.
Turns out, that is not a valid enough differentiation between the two requests being made. Sometimes, even the value change listeners are issuing a GET request.
Question:
*<font color="red">1</font>*. Is there a way to force the value change listeners to always trigger a POST request?
*<font color="red">2</font>*. Is there a way to differentiate the requests originating from the other team's Product and those generated by my own value change listeners?
*<font color="red">3</font>*. Is there a different approach, incorporating the above-mentioned limitations, to clear out the session scope each time when a request is made through iFrame? That is, whenever a request is made through the other team's Product?
Edited by: user737922 on Apr 13, 2011 10:58 AM_(Temporary) Solution_:
Summary:
I am using the request parameter <b><tt>_adf.ctrl-state</tt></b> to differentiate between the HTTP requests that my application receives.
Details:
When I receive the request from the other team's Product, I receive a <tt>GET</tt> and a <tt>adf.ctrl-state</tt> value which I store into a local variable in my session-scoped managed bean. The <tt>adf.ctrl-state</tt> value stays the same for all requests (<tt>GET</tt> or <tt>POST</tt>) made from within my own application. It changes only when there is a new request from the other team's Product.
Also, as my application is accessed through an iFrame, there is no possibility of the generated URL being modified by the end-user.
For now it seems that the solution is appropriate but I am not fully confident if relying on the <tt>_adf.ctrl-state</tt> value is the best approach.
Maybe you are looking for
-
Apple ID for Screen/File Sharing Home Network
I have several Macs connected mostly by ethernet as part of my home network. I am trying to simplify the act of logging into one device from another. One method is to setup a username and password for each Mac, and then use these credentials to log i
-
Short Dump while Complete deletion of data Contents from a Cube.
Hello Experts, I am facing a runtime Short dump whenever i attempt to delete data from a Cube. Shown Below:- Runtime Errors MESSAGE_TYPE_X Error analysis Short text of error message: Data request to the OLTP Long text of error message
-
Query performance on materialized view vs master tables
Hi, I am afraid of strange behavior in db, on my master tables UDBMOVEMENT_ORIG(26mil.rows) and UDBIDENTDATA_ORIG(18mil.rows) is created materialized view TMP_MS_UDB_MV (UDBMOVEMENT is synonym to this object) which meets some default conditions and j
-
How to read the code of html page
Hi, I want to know how to read the code of html page through Java? And if anyone know the link of full implementation of Page Rank Algorithm in Java. Please let me know. I have to do the project on that topic. Regard Vivek
-
Education Cess and Higher education cess
Hello, After I save the excise Invoice, Incoming or out going, I want to clear my doubt as where the duties and other entries get saved. Is it in table J_1IEXCHDR & J_1IEXCDTL? If it is right then my all entries are flowing but not the Education Ces