Dreamweaver rewriting spry:region
When I save a template that contains a Spry dataset and
region, Dreamweaver changes the region to "datasetname function".
When the template loads the code is:
spry:region="dsAirsale"
when I save the file, it becomes:
spry:region="dsAirsale function"
Why?
I've never seen/heard of this problem. Do you have a sample
file we can look at to reproduce the problem? Are you talking about
saving the .dwt file? Or an HTML file that is an instance of the
template? Is the spry:region inside an editable region?
--== Kin ==--
Similar Messages
-
Dreamweaver rewriting spry:if statements
I keep having a problem with Dreamweaver rewriting manually
created Spry select list code.
Example of the code as it should be:
<select name="orgSelect" id="orgSelect"
onchange="document.forms['frmSupportReq'].groupSelect.disabled =
true;dsOrg.setCurrentRowNumber(this.selectedIndex);"
spry:repeatchildren="dsOrg">
<option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
value="{name}" selected="selected">{name}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{name}">{name}</option>
</select>
Dreamweaver rewrites it, breaking it (below is a sample of
the most recent break):
<select name="orgSelect" id="orgSelect"
onchange="document.forms['frmSupportReq'].groupSelect.disabled =
true;dsOrg.setCurrentRowNumber(this.selectedIndex);"
spry:repeatchildren="dsOrg">
<option spry:if="{dsOrg::ds_RowNumber} ==
{dsOrg::ds_CurrentRowNumber}" value="{dsOrg::name}"
selected="selected">{dsOrg::name}</option>
<option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
value="{name}">{name}</option>
</select>
Dreamweaver has rewritten the code in several different ways
over the last two days for this particular item (which is the first
part of a master/detail double select set).
This is getting very irritating.
Has anyone else had a similar problem? If so, has anyone
found a way to STOP Dreamweaver from breaking the Spry code?
I would appreciate suggestions on how to break Dreamweaver of
this annoying habit.
Thanks.
Skip KeatsDonald:
I am not certain if I can 'reproduce' it, per se, as the
occurrences do not follow any particular pattern, except what
Dorfadobe notes -- switching between code/split and design views.
All pages have at least one Spry-generated select list (used
as a jump menu). Many have more. The code noted above is part of an
actual form (rather than a jump menu system).
What I have noticed is that Dreamweaver does not seem to
change any code created by itself from design view. It only seems
to change code that is manually created in code view. (On a
separate note, it keeps trying to delete conditional validation
that I am creating for the same form -- you know, 'if yes, then
this field is available (and must validate)' type thing.
My question: Could it be that Dreamweaver is somehow
internally programmed to force conformance to its design view
'widgets' in some way? If so, this is a serious problem as the
widgets are rather limited in comparison to what can be done via
hand-coding.
Skip Keats -
First of all, I am very new to Spry in Dreamweaver, but have
an effect that I know must be possible to create using the Spry
Regions tools.
I have a two column webpage. On the left column I want to
have 3 rows of 3 thumbnail images that represent different work
samples. Once they are clicked, I would like a larger image and
explanation to appear in the left column (without being a new
page).
I saw a tutorial similar to this on the Adobe Design Center (
http://www.adobe.com/designcenter/video_workshop/?id=vid0166),
but instead of thumbnails, they used text, and created a Spry
Table. I don't think a table would work for me since I didn't see a
way to define the amount of rows.
I have 9 <div> tags set up with image placeholders that
I would like to link to an xml file to fill them. I cannot seem to
figure out the way to do this. My code is attached.I can tell you categorically that the code in the Missing Manual works as intended. If your code is not working then there is something in the code that is responsible. We'd have to see it all to tell you....
-
Animated gif does not work in spry region
Trying to display an animated gif while xml file is loading.
The gif displays while loading but does not animate in the spry region.
<div spry:region="dslistings">
<div id="loadXML" spry:state= "loading"><img src="loadinganimated.gif"/></div>
<div spry:state="ready" </div>
Thank you in advance for any help.
JeffI believe you are correct, I tried to place the same animated gif outside of the spry region
and it also did not animate until the xml (approximately 500 records) loaded and completed displaying.
Once the xml loaded, the gif outside of the spry region started to animate.
So how then could you display some sort of animated loading indication?
Thank you
jeff -
How do I display on-the-fly generated XML on a web page using DW CS4 Spry regions?
On a main web page I'm trying to display formatted data from an ASP page that generates XML on-the-fly from a query.
When I run the ASP page from the browser, the XML formatting of the data works. But when I run the main web page, the data doesn't display.
I'm using DW CS4 Spry regionsto display the data on the main page from the XML data generated by the ASP page. Here's the main page code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<html>
<head>
<script type="text/javascript" src="SpryAssets/xpath.js"></script>
<script type="text/javascript" src="SpryAssets/SpryData.js"></script>
<script type="text/javascript" src="SpryAssets/SpryUtils.js"> </script>
<script type="text/javascript">var A1D1xml = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.asp", "tests/test");</script>
<title>Test XML Main</title>
</head>
<body>
<div id="A1D1xml" spry:region="A1D1xml">
<table id="A1D1">
<tr>
<th>ID</th>
<th>Last Name</th>
<th>Final Status</th>
</tr>
<tr spry:repeat="A1D1xml">
<td>{acr_id}</td>
<td>{acr_lastName}</td>
<td>{acr_final_status}</td>
</tr>
</table>
</div>
</body>
</html>
Here's the code for the page that generates the XML: A1D1ACRs_testWxmlCode.asp
<html>
<%
set objConn=server.CreateObject("ADODB.Connection")
objConn.Open application("web_test")
set rs = objConn.Execute( "SELECT acr_id, acr_lastName, acr_final_status from acr_records_grid_view where acr_changeOption = 'A1D1'")
Response.ContentType = "text/xml"
Response.AddHeader "Pragma", "public"
Response.AddHeader "Cache-control", "private"
Response.AddHeader "Expires", "-1"
%>
<?xml version="1.0" encoding="utf-8"?>
<tests>
<%While (NOT rs.EOF)%>
<test>
<ID><%=(rs.Fields.Item("acr_id").Value)%></ID>
<acr_lastName><![CDATA[<%=(rs.Fields.Item("acr_lastName").Value)%>]]></acr_lastName>
<acr_final_status><![CDATA[<%=(rs.Fields.Item("acr_final_status").Value)%>]]></acr_final_s tatus>
</test>
<%
rs.MoveNext()
Wend
%>
</tests>
<%
rs.Close()
Set rs = Nothing
%>
</html>
Thanks.Thanks, but no; I'm using the correct case and folder.
With this code on the main page, The region flashes the table column header names
and the code as written for the spry repeat; then instantly disappears from the screen.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="SpryAssets/xpath.js"></script>
<script type="text/javascript" src="SpryAssets/SpryData.js"></script
<script type="text/javascript">var A1D1x = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.xml", "tests/test");</script>
<title>Test XML Main</title>
</head>
<body>
<div id="A1D1" spry:region="A1D1x">
<table id="A1D1a">
<tr>
<th>ID</th>
<th>Last Name</th>
<th>Final Status</th>
</tr>
<tr spry:repeat="A1D1x">
<td>{acr_id}</td>
<td>{acr_lastName}</td>
<td>{acr_final_status}</td>
</tr>
</table>
</div>
</body>
</html> -
Hiding Columns in a Spry Region
Hello All,
I'm using the SpryDOMUtils.js to hide columns in my SPRY table. Everything works fine when I load the page except when I add the LoadListener to hide the columns when the page generates:
function hideColumn(){
Spry.$$("#second th:nth-child(n+5),#second td:nth-child(n+5)").toggleClassName("hideIt");
changeText("button2","Hide Detail","Show Detail");
Spry.Utils.addLoadListener(function(){
hideColumn();
After the page loads the columns are hidden like they are supposed to but the show button will not 'show' the columns and the code seems broken. Sorry I cannot post a link the code as it is on a Intranet.
I have followed the example on http://labs.adobe.com/technologies/spry/samples/dom_utils/hide_columns.html but maybe it is because it is in a spry region?
Cheers!
KevinI'm assuming that by "Spry Table" you meant that you are using a Spry region to generate a table. If so, you need to trigger your code from an onPostUpdate observer instead of triggering it after the page loads. The reason is that even though the page has loaded, the data sets that load your data still might not have completed loading ... so your region may not have been processed until *AFTER* the onload event fired.
Take a look at this example:
http://labs.adobe.com/technologies/spry/samples/data_region/RegionObserverSample.html
--== Kin ==-- -
I'm trying to add a region.addobserver and addEventListener to spry regions so the links; that come for a external feed, opens in a new(default browser) window when clicked. The on* events in regions do not work in AIR so, is there a way to do this?
I have read a lot of the documentation on spry regions, addObserver and the addEventlistener but the samples don't deal with anything about external xml feeds with links in a spry region for a AIR app.
The closiest i saw was the gallery http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html, but it doesn't deal with:
links,
in a external RSS feed,
in the spry region,
to a new default browser.
Has anybody tried this before? Can it be done?
Ex:
<div spry:region="rssDataNews" class="SpryHiddenRegion">
<div spry:state="loading" id="notification2">Loading feeds, please wait ...<img src="assets/spinner.gif"></div>
<div spry:state="error">Failed to load data! Please try again later</div>
<table width="100%" spry:state="ready">
<tr spry:repeat="rssDataNews" class="{ds_EvenOddRow}" spry:select="mySelectClass">
<td class="cellPad">
<span style="font-weight:bold">{title}</span><br /><br />
{description}<br />
<a href="{link}" target="_blank">[Read full article]</a><br /><br />
</td>
</tr>
</table>
<div>
The <a href > only opens the url in the native AIR window. I need it to open in a web browser.
Message was edited by: dee12345654321About on* events
They do work, but not as attribute on your HTML elements, you will need to use eventlisteners to attach them on the relevant nodes.
How: http://labs.adobe.com/technologies/spry/samples/dom_utils/add_event_listener.html
About links
Currently in Adobe AIR, its not (easily) possible to open or execute other programs on the users PC. I have seen die hard hacker user Java to get around this limitation. But i suggest you check out the Adobe AIR forum to confirm that you cant open links in the users browser.
But, Adobe AIR is basically a browser -
Formatted HTML output with Spry regions - is it possible?
I have recently begun using the XML export extension in
conjunction with an Access database to output dynamic data into a
page with a Spry master/detail setup. So far, my simple example is
going great, but I've run into a snag that I need some help with.
To explain what I'm doing - it's a simple article page with
the list of articles on the left with the title and date and the
article title and full contents on the right hand side. So far it's
all working very well, updating in real time when I click an
article title on the left. The problem is the output with this one
field which stores not only text, but also HTML formatting that is
generated by a wysiwyg editor used on the article creation side of
this little app. This HTML formatted content is the article body
and is stored in a field named the same - "body". With traditional
ASP, the HTML formatting displays as expected and all is well, but
with Spry, it doesn't output formatted HTML, but instead shows the
content and HTML code together as text. How can I get this one
field ("body") to be output so all the HTML formatting is shown?
This is my simple page example. Click through and you'll see
what I mean.
http://www.shoestodyefor.com/ajax.asp
Here's the section of code in question regarding the output
on that right hand panel where the body is displayed for each
article:
<div spry:detailregion="ds1">
{title}<br />
{entryDate}<br />
<br />
{body}
/div>
Is it possible to have that {body} section shown so the
dynamically created HTML code from the wysiwyg editor is displayed
correctly?Steve Skinner wrote:
> Is it possible to have that {body} section shown so the
dynamically created
> HTML code from the wysiwyg editor is displayed
correctly?
The version of Spry that ships with Dreamweaver CS3 (Spry
1.4) doesn't
support the type of output created by the XML Export
extension.
This issue has been corrected in Spry 1.5, but no plans have
been made
public for integrating Spry 1.5 into Dreamweaver CS3. You
would need to
download Spry 1.5 from
http://labs.adobe.com/technologies/spry/.
Details
of how to hand-code the fix for output from XML Export are
here:
http://labs.adobe.com/technologies/spry/samples/data_region/HTMLFragsInXMLSample.html
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
In Dreamweaver CS5 - Spry elements visable in LiveView Only
Web page: www.muohio.edu/youth
In Dreamweaver the Spry Tabbed Panels and Collapsible panels work fine as published, and in LiveView. However in Design View the tabbed panels only show the top content, the styling is not applied. The collapsible panels are functional, but the styling is not applied.
Hope someone has an idea of what needs to be changed in the code, it is very difficult to update the page as it is.Yes, on some complicated pages, DW can have a hard time rendering the Design View.
What you can do (that is the solution I use) is:
for the styling, create you rules in Design view, and edit them in Live view. You sometimes have to refresh the view to have the changes apply, but it is still a time-saver.
for the content, just switch to Code View and copy the content that needs updating. Open another HTML page, select all, and paste over your copied content. DW renders HTML bits pretty well even if there is no <html>, <body>, etc, tags. Then edit in Design View, switch back to Code View, copy all, and paste over your old content in the original document.
Hopes this helps.
Xav -
Spry region drop-down list problems in IE
Can someone please help me determine the reason that IE does not display the correct item in a spry region drop-down list when first opening the site. You can see the problem at http://www.minursemap.org/agedistnurse.html. The initial item in the drop-down list should be Alcona with the corresponding graphic displayed in the detail region. In Firefox, this works correctly. When first opening the page in IE, the graphic is Alcona, but the drop-down list displays Wexford (the last item in the list). From then on, all of the links work correctly.
The code for the two regions is below. Thanks in advance for assisting someone new to spry.
<div id="ctyname">
<div spry:region="dsChartNurse">
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option value="{ds_RowID}">{name}</option>
</select>
</div> <!--spry:region close -->
</div><!--ctyname close -->
<div id="image">
<div spry:detailregion="dsChartNurse">
<div align="center" style="padding-bottom:15px"><img src="{dataimage}" width="405" height="202" />
</div><!--un-named div close -->
</div><!-- spry:detailregion close -->
</div><!--image close -->Try the following code to replace yours:
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option spry:if="{dsChartNurse::ds_RowID}=={dsChartNurse::ds_CurrentRowID}" spry:selected="selected" value="{ds_RowID}">{name}</option>
<option spry:if="{dsChartNurse::ds_RowID}!={dsChartNurse::ds_CurrentRowID}" value="{ds_RowID}">{name}</option>
</select>
I hope this helps.
Ben -
I'm developing an interactive menu using the Spry and Ajax framework that lists the menu items on the left (in a Spry accordion) to a corresponding image and description on the right. I have the basic functionality working, however, my menu items are broken into sub categories, and I can't seem to get my XML file to separate these.
For an example of what I'm trying to do, visit here: http://bit.ly/g0RrU
As you can see, my menu is broken into sections; i.e. Tapas, Pizzas, Entrees...etc. Do I need to link a separate XML file to each of these sections, or can I simply make one more generation in my XML file.
For instance, could my XML file look like this:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tapas>
<item>
<name>Fresh Tilapia Dip</name>
<title>Fresh Tilapia Dip</title>
<image>../one0one/images/food/crab_cakes.jpg</image>
<desc>Mesquite Smoked Fresh Fish w/ Tortilla Chips and Pickled Jalapenos $6.99</desc>
</item>
<item>
<name>Jamaican Jerk Chicken Satay</name>
<title>Jamaican Jerk Chicken Satay</title>
<image>../one0one/images/food/satay.jpg</image>
<desc>Served with Pineapple Chutney w/ 101’s Spicy Tartar. $9.99</desc>
</item>
</tapas>
<pizzas>
<name>Pizza1</name>
<title>Pizza1</title>
<image>img.jpg</image>
<desc>description</desc> </pizzas>
</menu>
This is actually how it is currently set up, but when I link the XML file to a Spry region, it ignores the <tapas> and <pizzas> categories, and goes straight to the <item>. What's the best practice to achieve this menu effect?What version of Spry are you using? If you are going to work
Spry and AIR, you will need Spry 1.6.1 to work within AIR's
application sandbox. You can find the details here:
http://labs.adobe.com/technologies/spry/air.html
and a case study that shows what I had to do to make the
Photo Gallery work in AIR 1.0 here:
http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html
--== Kin ==-- -
Accessing form elements within a Spry region.
Since nested Spry regions isn't yet support, can someone tell
me how to access and modify form elements within a existing region?
For example, I have a region that displays a form based on
data I defined in a javascript array. On of the form elements is a
select with some options. I want to added and remove options to
this select depending on the number of objects in the data array.
The select is not defined when I try to access it after spry
has finished rendering the form, eg
document.forms[0].selOrder1.options.length = 0;
How are Spry regions attached to the browser's DOM? Does Spry
create it's own DOM subordinate to the main DOM?
Is it possible to make changes to a Spry region without using
Spry?
thx
pwpActually, there are a couple of ways to get access to the DOM
underneath a region container. If you have a region, you can put an
ID attribute on the region container node, or if you are using a
region observer, the data passed into the observer has a regionNode
property. So if you want access to the region DOM anytime the
region is re-generated, do something like this:
function myRegionObserver(notificationType, notifier, data)
// We only want to do something after the region is
re-generated,
// for all other notifications, do nothing.
if (notificationType != "onPostUpdate")
return;
// If your region container element has an ID on it, just
use
// getElementByID. This is useful in the case where your
observer
// is only ever registered with one region.
var rgnElement1 = document.getElementById("headerRegion");
alert(rgnElement1.innerHTML);
// Or you can simply use the regionNode property of the data
// that is passed in. This is useful if you've registered
the same
// observer on multiple regions. The regionNode property
will
// contain the region container node for the region that is
currently
// being updated.
var rgnElement2 = data.regionNode;
alert(rgnElement2.innerHTML);
Spry.Data.Region.addObserver("headerRegion",
myRegionObserver);
<div id="headerRegion" spry:region="ds1">
</div>
--== Kin ==-- -
Hi,
I'm a beginner in programming with Adobe Spry so I don't know
if I already understood the Spry concept correctly or if my
question has already been answered in this forum before.
I have got an XML file on my web server which contains the
address data of a single user in the following way:
<?xml version="1.0" encoding="iso-8859-1"?>
<adressbook>
<contact id='1'>
<name>Person 1</name>
<company>his company</company>
</contact>
</adressbook>
The xml file is dynamically generated and can be called with
a GET-parameter "contact" which represents the contact id of the
contact whose address data should be delivered in the response.
Now I read something about the Adobe Spry data set concept.
So I wanted to implement a small address book widget by fetching
the data of a chosen contact from the server in the following way:
<script type="text/javascript">
var contactinfo = null;
function getcontactinfo(contactid) {
contactinfo = new
Spry.Data.XMLDataSet("data.xml.php?contact=" + contactid,
"/adressbook/contact", { useCache: false });
</script>
<div id='names'>
<a href='javascript:getcontactinfo(1)'>Person
1</a><br>
<a href='javascript:getcontactinfo(2)'>Person
2</a><br>
</div>
<div id='info' spry:region="contactinfo">
<table spry:repeatchildren="contactinfo">
<tr><td>name:</td><td>{name}</td></tr>
<tr><td>company:</td><td>{company}</td></tr>
</table>
</div>
My problem is that the spry:region won't be updated after
requesting new data via Spry.Data.XMLDataSet(). If I leave out the
getcontactinfo()-function and simply write something like
var contactinfo = new
Spry.Data.XMLDataSet("data.xml.php?contact=1",
"/adressbook/contact", { useCache: false });
everything works fine. Can anybody help me and could give me
a hint what I might do wrong.
Thanks a lot
André Langer
P.S.: btw. does anybody know if there's an option in the
spry:repeatchildren part to implement a similar behaviour like in
XSL where I could find out the tag names (in Spry the column
names), see
<xsl:for-each select="/adressbook/contact/*">
<tr><td><xsl:value-of
select="name()"/>:</td><td><xsl:value-of
select="."/></td></tr>
</xsl:for-each>Hi Ala,
Look into the setURL and loadData functions.
http://labs.adobe.com/technologies/spry/articles/data_set_overview/
You can so something like
<a onClick="
contactinfo.setURL('data.xml.php?contact={contactid}');
contactinfo.loadData();")
http://labs.adobe.com/technologies/spry/samples/data_region/SetURL.html
Hope this helps.
Don -
Spry:region attributes require one or more data set names as values!
Why am I getting this error ?
http://www.magazooms.com/mzLite/index-php.htmlMaby you have to give the div (or what u use) that holds the
spry:region attribute an id... See this
http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WS687EBFF2-AD34-47c5-BEE6-6DBFF 3EB8CCD.html -
ADDT Datepicker and Spry:region
Using ADDT for a datepicker dropdown calendar, the following
code works as expected:
<form action="" method="post">
<input name="test" id="test" value="06/02/2008"
wdg:subtype="Calendar" wdg:mask="<?php echo
$KT_screen_date_format; ?>" wdg:type="widget"
wdg:mondayfirst="true" wdg:singleclick="true"
wdg:restricttomask="yes" />
</form>
When I add a Spry region, the dropdown calendar does not
work:
<div spry:region="ds1">
<form action="" method="post">
<input name="test" id="test" value="06/02/2008"
wdg:subtype="Calendar" wdg:mask="<?php echo
$KT_screen_date_format; ?>" wdg:type="widget"
wdg:mondayfirst="true" wdg:singleclick="true"
wdg:restricttomask="yes" />
</form>
</div>
Anyone have a solution please.
BenAnyone??
Maybe you are looking for
-
10.1.3.4 - How to access custom java methods in worklist ?
We want to invoke a custom java method inside of worklist, when the file attachments are added to the worklist. We are planning to modify the auto-generated jsp page to do the same. We have created the custom jar files, but am not sure where to deplo
-
Business Process Flow for old records
A customer has asked us to decommission the Business Process Flow for a particular security role. I have done this and all is well for new records. Unfortunately the Process Bar still appears for old Leads. I think I can understand the behaviour: if
-
Hello, USING: Graphic Design/PrePress workflow. MAC OS 10.6.7 - CS5 workstation--shinny new! MAC OS 10.5.8 - CS4 (backup old work station) MAC OS 10.3.9 - RIP (Harlaquin Navigator Rip 6.041a) BACKGROUND info: Created InDesign templates placing .AI/P
-
Export repository to filesystem?
Repostet at How to export repository to file system? Hello, within my bachelor thesis I am engaged in parsing ABAP Objects to calculate different code metrics. The analysis tool and many of the known parser-apis do require source-files at the file sy
-
Start up disc full (but its not)
i keep getting a warning saying my disc is almost full, but it is not even close. also my macbook deleted all of my music off of itunes, and it will not let me save any documents, or download any documents, such as my homework off theinternet. also i