Nested Repeat - ASP
I've know that out of the box, DW won't let you nest multiple recordsets within each other.
So this would need to be a proprietary fix.I've done something like this before but how do you tie the second recordset to the current record in a repeat region? What is the "MM" server variable to use or is this an ASP?
ID
WarningID
ProductID
1
1
part0001
2
4
part0002
3
2
part0003
4
3
part0001
ID
WarningID
WarningText
1
1
Warning 1
2
2
Warning 2
3
3
Warning 3
4
4
Warning 4
This is a little more background just to make sure we're on the same page.
The TBLWARNING table holds the part association (there will be multiple ProductIDs with different warning numbers
The other (TBLWARNTYPE) holds the warning number and the actual warning message. There are only nine of these.
The SP then needs to know what partnumber so it can associate the WarningID in the TBLWARNING table with WarningID in the TBLWARNTYPE table.
Similar Messages
-
Dreamweaver CS3
ASP / VBScript
Hi,
I'm trying to create a nested repeat region to display a list
of categories
and, in brackets afterwards, a count of the number of
sub-categories
contained in it E.g.
Cats (12)
Dogs (43)
Fish (92)
Etc
I have managed to create my repeat region ok because as soon
as I drop a
field in from the recordset, it loops through them all and
displays them
correctly. However, when I try and simply write out the total
number of
records found, it doesn't display anything.
Recordset 1 is a straighforward select from the table.
Recordset 2 adds a
WHERE clause usinga variable based on the 1st recordset. Here
is the code
i'm using for the 2 recordsets:
Recordset 1 :
<%
Dim Level1
Dim Level1_cmd
Dim Level1_numRows
Set Level1_cmd = Server.CreateObject ("ADODB.Command")
Level1_cmd.ActiveConnection = MM_SemiDirectory_STRING
Level1_cmd.CommandText = "SELECT * FROM TBL_Level1 ORDER BY
[Description]
ASC"
Level1_cmd.Prepared = true
Set Level1 = Level1_cmd.Execute
Level1_numRows = 0
%>
Recordset 2 :
<%
Dim Level2__varLink
Level2__varLink = "1"
If (level1.fields.item("Level1_ID").value <> "") Then
Level2__varLink = level1.fields.item("Level1_ID").value
End If
%>
<%
Dim Level2
Dim Level2_cmd
Dim Level2_numRows
Set Level2_cmd = Server.CreateObject ("ADODB.Command")
Level2_cmd.ActiveConnection = MM_SemiDirectory_STRING
Level2_cmd.CommandText = "SELECT * FROM TBL_Level2 WHERE
Level1_ID = ? ORDER
BY Level1_ID ASC"
Level2_cmd.Prepared = true
Level2_cmd.Parameters.Append
Level2_cmd.CreateParameter("param1", 5, 1, -1,
Level2__varLink) ' adDouble
Set Level2 = Level2_cmd.Execute
Level2_numRows = 0
%>
Now for the repeated code :
<%
While ((Repeat1__numRows <> 0) AND (NOT Level1.EOF))
%>
<li><a
href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
(<%=(Level2_total)%>)
</li></a>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Level1.MoveNext()
Wend
%>
Can anyone tell me what I need to do to this code to make it
display the
number of sub-categories?
Thanks!!!Ok folks,
I found a way to get what I want. It's not pretty as I had to
make an extra
query in the database (that select of the count of all child
table results
for each parent category) and am pulling from that but it
works and that's
the main thing. I'm sure there is a more effective way of
doing it but
that's life!
I'm still interested in knowing the 'proper' way (if there is
such a thing)
so if you have the time to show me, i'm all ears!
Cheers!
"Mintyman" <[email protected]> wrote in message
news:[email protected]...
> Ok,
>
> So I closed the <li> code before the <a>
code. D'oh!
>
> Anyway, it returns a number now........the problem now
is that it returns
> the same value for each parent repeat!!!
>
> "Mintyman" <[email protected]> wrote in message
> news:[email protected]...
>> Dreamweaver CS3
>> ASP / VBScript
>>
>> Hi,
>>
>> I'm trying to create a nested repeat region to
display a list of
>> categories and, in brackets afterwards, a count of
the number of
>> sub-categories contained in it E.g.
>>
>> Cats (12)
>> Dogs (43)
>> Fish (92)
>> Etc
>>
>> I have managed to create my repeat region ok because
as soon as I drop a
>> field in from the recordset, it loops through them
all and displays them
>> correctly. However, when I try and simply write out
the total number of
>> records found, it doesn't display anything.
>>
>> Recordset 1 is a straighforward select from the
table. Recordset 2 adds a
>> WHERE clause usinga variable based on the 1st
recordset. Here is the
>> code i'm using for the 2 recordsets:
>>
>> Recordset 1 :
>>
>> <%
>> Dim Level1
>> Dim Level1_cmd
>> Dim Level1_numRows
>>
>> Set Level1_cmd = Server.CreateObject
("ADODB.Command")
>> Level1_cmd.ActiveConnection =
MM_SemiDirectory_STRING
>> Level1_cmd.CommandText = "SELECT * FROM TBL_Level1
ORDER BY [Description]
>> ASC"
>> Level1_cmd.Prepared = true
>>
>> Set Level1 = Level1_cmd.Execute
>> Level1_numRows = 0
>> %>
>>
>> Recordset 2 :
>>
>> <%
>> Dim Level2__varLink
>> Level2__varLink = "1"
>> If (level1.fields.item("Level1_ID").value <>
"") Then
>> Level2__varLink =
level1.fields.item("Level1_ID").value
>> End If
>> %>
>> <%
>> Dim Level2
>> Dim Level2_cmd
>> Dim Level2_numRows
>>
>> Set Level2_cmd = Server.CreateObject
("ADODB.Command")
>> Level2_cmd.ActiveConnection =
MM_SemiDirectory_STRING
>> Level2_cmd.CommandText = "SELECT * FROM TBL_Level2
WHERE Level1_ID = ?
>> ORDER BY Level1_ID ASC"
>> Level2_cmd.Prepared = true
>> Level2_cmd.Parameters.Append
Level2_cmd.CreateParameter("param1", 5,
>> 1, -1, Level2__varLink) ' adDouble
>>
>> Set Level2 = Level2_cmd.Execute
>> Level2_numRows = 0
>> %>
>>
>>
>> Now for the repeated code :
>>
>>
>> <%
>> While ((Repeat1__numRows <> 0) AND (NOT
Level1.EOF))
>> %>
>> <li><a
>>
href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
>> (<%=(Level2_total)%>)
>> </li></a>
>>
>>
>> <%
>> Repeat1__index=Repeat1__index+1
>> Repeat1__numRows=Repeat1__numRows-1
>> Level1.MoveNext()
>> Wend
>> %>
>>
>> Can anyone tell me what I need to do to this code to
make it display the
>> number of sub-categories?
>>
>> Thanks!!!
>>
>>
>>
>
> -
Nested Repeat Regions in Dreamweaver 8
I am waying the option of upgrading from MX to 8 or just
getting MX Looper to do nested repeat regions. Any advice? Are
nested repeat regions built into Dreamweaver 8?SmellyPete wrote:
> I've got a problem with nested templates in my site. I
don't think it's an
> error or bug as such, just a really strange limitation,
that I hope there is a
> work around for.
>
> I've setup a menubar with a repeating table region in a
template. Then I laid
> out the content (editable) regions in a nested template.
The system works
> really well in dreamweaver, if you want to add a menu
item, you do so to the
> parent template, and then it filters through out the
site.
>
> The problem is that when I try to edit the pages as a
client with contribute
> (even as an administrator) it will not allow access to
edit a .dwt file, even
> if it has editable regions in it. This means I can't use
contribute to add an
> item to the menubar, because I need to be able to edit
the nested template. I'm
> sure it's possible, because a .dwt is just an .htm file
with a different hat on.
>
> There must be some way of doing this. As soon as I read
about the template
> system I immediately thought this would be one of it's
strengths, and would be
> very surprised if the contribute user were limited to
making changes on every
> individual page.
>
> PS. I'm sure someone will suggest that I just move the
repeating region into
> the nested template. I could do this, but the whole
point is that with one
> change I want it to will filter down through the whole
site. I thought maybe
> SSI might be the answer, but would that just confuse
contribute even more?
>
It seems to me the whole point of using Contribute is to keep
users from
changing basic site configurations such as the menu. Use
Dreamweaver or
one of the simple HTML editors around. -
Limit records in nested repeat region
I am using the nested repeat region behaviour and I need to limit the amount of records in the detail table.
in ADDT it guides you through a wizard for master and detail tables to use this nesting which works great but it also returns all the records in the detail. I would like to limit the amount.
I tried modifying the query by adding
$maxRows_detail4tbl_products = 4;
$pageNum_detail4tbl_products = 0;
if (isset($_GET['pageNum_detail4tbl_products'])) {
$pageNum_detail4tbl_products = $_GET['pageNum_detail4tbl_products'];
$startRow_detail4tbl_products = $pageNum_detail4tbl_products * $maxRows_detail4tbl_products;
still returns all rows. any help is greatly appreciated.In the Application Panel, select the tab Biddings
dbclick Recordset Detail. Click the Advanced button, in the last SQL command ORDER BY
You add LIMIT 0,4 -
URGENTLY NEED HELP WITH NESTED REPEAT REGION
Im using dreamweaver to deevelop a page that displays questions in ann assessment to the user. First of all the page shows the assessment name to the user and then it gets some information about the questions in the assessment from the table called Item. It gets the Question_ID and then there is a repeat region which uses the Question_ID to display the questions in the assessment. There is a nested repeat region inside this which displays the possible answers the user can respond to the question with It gets this information from a table called outcome. The page should display each question and then all the possible answers but i am having problems and im not sure wether i am doing this in the correct way. What is wrong with my code? PLEASE HELP! can someone tell me what is going wrong and how i can fix this problem thamks.
here is my code.
Driver DriverassessmentRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
Connection ConnassessmentRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
PreparedStatement StatementassessmentRecordset = ConnassessmentRecordset.prepareStatement("SELECT Assessment_ID, Assessment_Name, Time_Limit, Display_Random, Record_Answers FROM Assessment.assessment WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
ResultSet assessmentRecordset = StatementassessmentRecordset.executeQuery();
boolean assessmentRecordset_isEmpty = !assessmentRecordset.next();
boolean assessmentRecordset_hasData = !assessmentRecordset_isEmpty;
Object assessmentRecordset_data;
int assessmentRecordset_numRows = 0;
%>
<%
Driver DriveritemRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
Connection ConnitemRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
PreparedStatement StatementitemRecordset = ConnitemRecordset.prepareStatement("SELECT Question_ID, Assessment_ID FROM Assessment.item WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
ResultSet itemRecordset = StatementitemRecordset.executeQuery();
boolean itemRecordset_isEmpty = !itemRecordset.next();
boolean itemRecordset_hasData = !itemRecordset_isEmpty;
Object itemRecordset_data;
int itemRecordset_numRows = 0;
%>
<%
Driver DriverquestionRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
Connection ConnquestionRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
//PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" + (((itemRecordset_data = itemRecordset.getObject("Question_ID"))==null || itemRecordset.wasNull())?"":itemRecordset_data) +"' ");
//ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
%>
<%
Driver DriveroutcomeRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
Connection ConnoutcomeRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
PreparedStatement StatementoutcomeRecordset = ConnoutcomeRecordset.prepareStatement("SELECT Outcome_Number, Outcome_Text, Score, Feedback FROM Answer.outcome WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+ "' ");
ResultSet outcomeRecordset = StatementoutcomeRecordset.executeQuery();
boolean outcomeRecordset_isEmpty = !outcomeRecordset.next();
boolean outcomeRecordset_hasData = !outcomeRecordset_isEmpty;Object outcomeRecordset_data;
int outcomeRecordset_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
itemRecordset_numRows += Repeat1__numRows;
%>
<%
int Repeat2__numRows = -1;
int Repeat2__index = 0;
assessmentRecordset_numRows += Repeat2__numRows;
%>
<!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"><!-- InstanceBegin template="/Templates/assessment.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Assessment</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="190"><img src="../img/assessment_login.png" alt="" name="navigation" width="1000" height="190" border="0" id="navigation" /></td>
</tr>
<tr>
<td height="19"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="19"><!-- InstanceBeginEditable name="main" -->
<table>
<tr>
<td width="990">Assessment Name:<%=(((assessmentRecordset_data = assessmentRecordset.getObject("Assessment_Name"))==null || assessmentRecordset.wasNull())?"":assessmentRecordset_data)%> </td>
</tr>
<tr>
<td><% int count = 1; %> </td>
</tr>
<tr>
<td valign="top"><table>
<% while ((itemRecordset_hasData)&&(Repeat1__numRows-- != 0)) { %>
<tr>
<td width="21">
</td>
<td width="86">Question:<%= count %></td>
</tr>
<tr>
<td></td>
<td>
<%
PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+"' ");
ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
boolean questionRecordset_isEmpty = !questionRecordset.next();
boolean questionRecordset_hasData = !questionRecordset_isEmpty;
Object questionRecordset_data;
int questionRecordset_numRows = 0;
%> <%= questionRecordset.getObject("Question_Wording") %></td>
</tr>
<tr>
<td></td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>
<table>
<% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
<tr>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
</tr>
<%
Repeat2__index++;
outcomeRecordset_hasData = outcomeRecordset.next();
%>
</table>
<table>
<tr> </tr>
<tr> </tr>
</table></td>
</tr>
<%
Repeat1__index++;
itemRecordset_hasData = itemRecordset.next();
count++;
//questionRecordset.close();
//StatementquestionRecordset.close();
//ConnquestionRecordset.close();
%>
Here is the exception i am gettingorg.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 115 in the jsp file: /delivery/session.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:220: cannot find symbol
symbol : variable outcomeRecordsetRecordset_data
location: class org.apache.jsp.delivery.session_jsp
out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
^
An error occurred at line: 116 in the jsp file: /delivery/session.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:223: cannot find symbol
symbol : variable outcomeRecordsetRecordset_data
location: class org.apache.jsp.delivery.session_jsp
out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
^
An error occurred at line: 117 in the jsp file: /delivery/session.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:226: cannot find symbol
symbol : variable outcomeRecordsetRecordset_data
location: class org.apache.jsp.delivery.session_jsp
out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
^
An error occurred at line: 118 in the jsp file: /delivery/session.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:229: cannot find symbol
symbol : variable outcomeRecordsetRecordset_data
location: class org.apache.jsp.delivery.session_jsp
out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
^
An error occurred at line: 119 in the jsp file: /delivery/session.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:232: cannot find symbol
symbol : variable outcomeRecordsetRecordset_data
location: class org.apache.jsp.delivery.session_jsp
out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
^
An error occurred at line: 119 in the jsp file: /delivery/session.jsp
Generated servlet error:
Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses or overrides a deprecated API.
An error occurred at line: 119 in the jsp file: /delivery/session.jsp
Generated servlet error:
Note: Recompile with -Xlint:deprecation for details.
An error occurred at line: 119 in the jsp file: /delivery/session.jsp
Generated servlet error:
Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses unchecked or unsafe operations.
An error occurred at line: 119 in the jsp file: /delivery/session.jsp
Generated servlet error:
Note: Recompile with -Xlint:unchecked for details.
5 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Hi,
Dont have much time to go through your code, but apparently i can see the error is becoz of the following reason.
In the following code, you have used "outcomeRecordset_data ", but its not declared. You need to declare the variable first before you can use it.
<% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
<tr>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
<td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
</tr>
<%
Repeat2__index++;
outcomeRecordset_hasData = outcomeRecordset.next();
%>Try declaring the "outcomeRecordset_data " on top as an object
Hope it helps -
PDF template - Looking for syntax to handle non-nesting repeat groups
All,
I followed XML publisher documentation for the first repeat group using BODY_START, T1_G1, T1_G2,,,,BODY_END. It works as expected. Could anyone post the syntax to handle more than one repeat group within a PDF template. These are not nesting repeat groups.
Really appreciate any help to point me in the right direction.
Thanks in advance
GopalYour question was "... but the font on the footer is much larger than that of the template", yes?
I only can repeat, look at the difference of:
1. index.html (Font-size > medium) >
2. Calendar.html (Font-size > no entry):
> "... font on the footer is much larger than that of the template",
Hans-Günter
P.S.
See us again - maybe - at Monday > we will do a nice little trip to Austria. -
I've got a page where I need nested repeat regions using the
same data.
Basically, list people who have donated money in groupings by
level:
$100-$199
Murray
Nadia
Thierry
$200-$299
Dan
Dan
Patty
I'm looking at Tom Muck's "Simulated Nested Region" extension
so I can do
this using one Recordset (seems silly to set up a recordset
for each
donation level) but the only problem is it looks like the
donation levels
have to sort in order to work, and they don't.
Anyone know of any other extensions or easy ways to make this
work?
Oh yeah.....MySQL and PHP.
Thanks!
Mad DogSmellyPete wrote:
> I've got a problem with nested templates in my site. I
don't think it's an
> error or bug as such, just a really strange limitation,
that I hope there is a
> work around for.
>
> I've setup a menubar with a repeating table region in a
template. Then I laid
> out the content (editable) regions in a nested template.
The system works
> really well in dreamweaver, if you want to add a menu
item, you do so to the
> parent template, and then it filters through out the
site.
>
> The problem is that when I try to edit the pages as a
client with contribute
> (even as an administrator) it will not allow access to
edit a .dwt file, even
> if it has editable regions in it. This means I can't use
contribute to add an
> item to the menubar, because I need to be able to edit
the nested template. I'm
> sure it's possible, because a .dwt is just an .htm file
with a different hat on.
>
> There must be some way of doing this. As soon as I read
about the template
> system I immediately thought this would be one of it's
strengths, and would be
> very surprised if the contribute user were limited to
making changes on every
> individual page.
>
> PS. I'm sure someone will suggest that I just move the
repeating region into
> the nested template. I could do this, but the whole
point is that with one
> change I want it to will filter down through the whole
site. I thought maybe
> SSI might be the answer, but would that just confuse
contribute even more?
>
It seems to me the whole point of using Contribute is to keep
users from
changing basic site configurations such as the menu. Use
Dreamweaver or
one of the simple HTML editors around. -
3 level nested repeat region?
hi all,
I tried to follow the ADDT tutorial related to creatìng 3 level nested
repeat region.
All is ok and I can list all continend, countries and cities.
But, how can I show only continent and countries that have cities set and
hide all those continents and countries that do not contains any city?
Example:
EUROPE
France
Paris
Spain
Madrid
ITALY
Germany
Monaco
In this example, how can I hide the ITALY country? Or how can I hide entire
continent/countries with no city set yet?
TIA
tonyCiao Tony,
you´ll most probably just need to add the IS NOT NULL comparison function to the query´s WHERE clause, example:
WHERE city IS NOT NULL
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?
I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?
-
Hi All,
I have a nested Repeater structure (please see attached
code). There is an outer Repeater which contains a VBox with
another inner Repeater inside that. I add items one at a time to
the Repeaters to create a tree like structure that should look
like:
Outer0
Inner0
Inner1
Outer1
Inner0
Inner1
If the outer Repeater is set with recycleChildren="true"
then the inner Repeater data is shown incorrectly, specifically it
looks like:
Outer0
Inner0
Inner0 (Should be Inner1)
Outer1
Inner0
Inner1
If the VBox between the outer and inner Repeaters is removed
then the Repeaters work correctly.
I believe there is a problem here in that when a Repeater
recycles it's components it checks to see if each component is also
a [nested] Repeater and if so it executes that Repeater. However,
if the nested/inner Repeater is not a direct descendent of the
outer Repeater (ie. in this example there is a VBox between the
inner and outer Repeaters) then any [grand]child Repeaters are not
executed.
Has anyone else come across this? Am I doing something wrong
and/or is there a workaround? I may be able to fix it if I can
force the Repeater to execute, but unfortunately the execute method
is private.
Incidentally, I do not want to set recycleChildren to false
as this causes a flicker, and I need the VBox inbetween for layout
purposes.
Thanks a lot,
Chris.
----Hi Chris,
I was excited when I see your question because I am having the same issue now, but I was turned down when there is no reply to your questions. Do you happen to solve this issue after all? Your feedback will be appreciated! Thanks in advance! -
Nested repeat Region - run time var PHP
I have tried several attempts at creating a nested region
with no luck of sucess
sql & PHP
There are 2 record sets
rsProduct and
rsCourse
rsProduct
SELECT *
FROM svProductList
WHERE svProductList.productOrder
ORDER BY productOrder ASC
rsCourse
SELECT *
FROM trainingCourseTBL
WHERE trainingCourseTBL.product = colname
ORDER BY trainingCourseTBL.courseOrder ASC
colname
type numeric
default value -1
runtim value $row_rsProduct['productOrder']
Start repeat region 1
rsProduct.productName
Start repeat region 2
rsCourse.course
END repeat region 2
END Start repeat region 1
I would like to set up a run time var for the rsCourse where
I get the value from the first repeat regions productID
Can someone point me towards the right direction?On 21 May 2007 in macromedia.dreamweaver.appdev, cdembek
wrote:
> Can someone point me towards the right direction?
I don't have time for a long explanation right now, but do a
web search
for 'Nested Repeat Region'.
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/contact.php -
Nested Repeat Region (How to convert from table to list)
Sorry, i am really no PHP hero :-(
i created a menu with the "nested repeat region" wizzard. Now i want to change the HTML from TABLE to LIST.
I thought i just need to delete <table>- and <td>-tags, replace <tr> with <ul> and that's it. (But ist's NOT!)
This is my code:
------- START ----------------
<ul id="nav">
<?php do { ?>
<li><?php echo $row_master1waa_page_top['top_name']; ?></li>
<?php
if ($totalRows_master1waa_page_top>0) {
$nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
mysql_select_db($database_WAA);
$detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
$row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
$totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
$nested_sw = false;
if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) {
do { //Nested repeat
?>
<ul>
<li> <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
</ul>
<?php
} while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next
?>
<?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
</ul>
------- END -----
The problem is located in line 3. the result is a list like this:
<ul id="nav">
<li>xxx</li>
<li>xxx</li>
<ul>
<li>xxx</li>
<li>xxx</li>
</ul>
<li>xxx</li>
</ul>
Of course it will not work. I need the nested list inserted like this:
<ul id="nav">
<li>xxx</li>
<li>xxx
<ul>
<li>xxx</li>
<li>xxx</li>
</ul>
</li>
<li>xxx</li>
</ul>
Can someone please help me changing my code to get this result?Hi,
I had trouble replying. I may be of some assistance until one of the Guru's get on.
The whole thing works on loops based inside do and while
EX.
<?php
do{ //end php, use html
?>
I can repeat anthing here in HTML!
<?php } while ( /* some critera exist ex: i<5 */ ); ?>
so, your 'options' tag or LI' tags should only exist inside the first loop, check your { }
The entire LIST would repeat if you add the UL tags inside the nested loop area
You may find it easier to reaplace the table with div tags and then indent the sub or nested loop with a class
I don't have time to test this but try this:
<ul id="nav">
<ul>
<?php do { ?>
<li><?php echo $row_master1waa_page_top['top_name']; ?></li>
<?php
if ($totalRows_master1waa_page_top>0) {
$nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
mysql_select_db($database_WAA);
$detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
$row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
$totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
$nested_sw = false;
if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) { ?>
<ul>
<?php do { //Nested repeat ?>
<li> <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
<?php } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next ?>
</ul>
<?php
?>
<?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
</ul>
Hit me back if its close but wonky..
J -
Inner nested repeater cannot be controled at repeat time
I have two repeaters one nested within the other.
The first one I can control at repeater run time by
setting the
AccRept.startingIndex = 0; //and...
AccRept.count = 1;
I can gain no control over the inner nested repeater
as it does not respond to setting the startingIndex and
count properties. The entire data provider is stepped
through instead.
Here is the script section:
<mx:Script>
<![CDATA[
[Bindable]
public var WkLabel:Array=["Week One","Week Two","Week Three","Week Four"];
[Bindable]
public var DoWLabel:Array=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday"];
public function initApp():void
//Sets up the repeater controls with the right number of components
//Accordion panes
AccRept.startingIndex = 0;
AccRept.count = 1;
//Open the first pane
if (AccRept.count > 0){
SPAcc.selectedIndex = 1;
//DoW labels
DayBlock.startingIndex = 3;
DayBlock.count = 2;
]]>
All of the elements in the DowLabel array are cycled through even though the
DayBlock repeater's properties are set to start at 3 for a total of 2.
Here are the control definitions:
<mx:ArrayCollection id="acDOWNames" source="{DoWLabel}"/>
<mx:ArrayCollection id="acAccPanes" source="{WkLabel}"/>
<mx:Accordion x="10" y="10" width="900" height="600" id="SPAcc">
<mx:Canvas label="Meal Plan" width="100%" height="100%">
</mx:Canvas>
<mx:Repeater id="AccRept" dataProvider="{acAccPanes}">
<mx:VBox label="{AccRept.currentItem}" width="100%" height="100%">
<mx:Repeater id="DayBlock" dataProvider="{acDOWNames}" >
<mx:HDividedBox width="100%" height="71" liveDragging="true" >
<mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#FFFFCC">
<mx:Label x="10" y="10" text="{DayBlock.currentItem} - Breakfast"/>
</mx:Canvas>
<mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99ccff">
<mx:Label x="10" y="10" text="{DayBlock.currentItem} - Lunch"/>
</mx:Canvas>
<mx:Canvas label="Canvas 3" width="100%" height="100%" backgroundColor="#99cc99">
<mx:Label x="10" y="10" text="{DayBlock.currentItem} - Dinner"/>
</mx:Canvas>
</mx:HDividedBox>
</mx:Repeater>
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
</mx:Application>Hi,
Since it's an issue about Outlook for Mac 2011, I recommend you post this problem in Office for Mac forum:
http://answers.microsoft.com/en-us/mac
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
their knowledge or learn from your interaction with us. Thank you for your understanding.
Regards,
Melon Chen
TechNet Community Support -
XML data with nested repeating nodes
First let me prelude with my skill set; "I am an XML,
JavaScript and Spry newbie". My xml data looks like this:
<report>
<header>
<column type="[string|real|int]>some
value</column>
<column type="[string|real|int]>some
value</column>
</header>
<details>
<row>
<cell type="[string|real|int]">some value</cell>
<cell type="[string|real|int]">some value</cell>
</row>
<row>
<cell type="[string|real|int]">some value</cell>
<cell type="[string|real|int]">some value</cell>
</row>
</details>
</report>
- report/header/column is completely dynamic and not known in
advance
- each report/header/column is the table column name value
- each report/details/row/cell is the table cell value
- type="[string|real|int]" is data type of the cell value
Using Spry 1.5 I have been able to successfully populate the
table column header row dynamically and repeat the appropriate
number of rows.
Spry is Cool!
I have not been able to figure out how to repeat
report/details/row/cell for each repeating row node. If I nest
spry:repeat it appears to go into an endless loop.
I will also need to equate data type to a Spry data type so
that I may sort the columns appropriately for their respective data
type.
Here is the code I have so far:
<script language="JavaScript" type="text/javascript"
src="includes/xpath.js"></script>
<script language="JavaScript" type="text/javascript"
src="includes/SpryData.js"></script>
<script language="JavaScript" type="text/javascript"
src="includes/SpryNestedXMLDataSet.js"></script>
<script type="text/javascript">
var dsReport = new
Spry.Data.XMLDataSet("data/cmbcov_raw.xml", "/iqreport");
var dsHeaders = new Spry.Data.NestedXMLDataSet(dsReport,
"header/column");
var dsRows = new Spry.Data.NestedXMLDataSet(dsReport,
"details/row");
var dsCells = new Spry.Data.NestedXMLDataSet(dsReport,
"details/row/cell");
Spry.Data.Region.debug = true;
</script>
<link href="/report/css/samples.css" rel="stylesheet"
type="text/css" media="all" />
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Reports</title>
</head>
<body>
<h3
spry:region="dsReport">{dsReport::@title}</h3>
<div class="liveSample" spry:region="dsReport dsHeaders
dsRows dsCells">
<table class="dataTable">
<tr>
<th
spry:repeat="dsHeaders">{dsHeaders::column}</th>
</tr>
<tbody>
<tr spry:repeat="dsRows">
<td>{dsCells::cell}</td> <!--if I use
spry:repeat here browser hangs - endless loop?-->
</tr>
</tbody>
</table>
</div>
</body>
</html>
Your assistance will be greatly appreciated!
Thank you in advance,
nomadcanuckDon,
Thanks for forcing me to read the nested data set sample
again, three times the charm as they say :). I made the following
addition to get it to work.
var dsDetails = new Spry.Data.NestedXMLDataSet(dsReport,
"details");
var dsRows = new Spry.Data.NestedXMLDataSet(dsDetails,
"row");
var dsCells = new Spry.Data.NestedXMLDataSet(dsRows, "cell");
<tbody spry:repeat="dsDetails">
<tr spry:repeat="dsRows">
<td spry:repeat="dsCells">{dsCells::cell}</td>
</tr>
</tbody>
I am still stumped with respect to sorting the dynamic
header/column. Any chance of being pointed in the right direction,
either document or hint is appreciated.
Thanks again,
nomadcanuck -
Nested Repeater and Binding Problem - Please Help
I have nested repeaters and binding seems to work with the
outer repeater, but not with the inner repeater. I have boiled it
down to a pretty concise case. If someone could offer hints I would
be most appreciative!
I understand the objects I am using to store data could be
different, but it only looks strange because I had to boil down a
complex case to a simple case.
Type a user and then an email address then click to add them,
the user TextInput and label gets created, but not the email
address label and text input.
Basically I want users in an ArrayCollection, and their
multiple email addresses in an ArrayCollection stored in an Object,
where I get that email ArrayCollection using the user as the key to
the object acting as an associative array.
The attached code should compile fine, so please have a go at
this. Thanks!"Greg Lafrance" <[email protected]> wrote in
message
news:gn5p1k$cv9$[email protected]..
>I have nested repeaters and binding seems to work with
the outer repeater,
>but
> not with the inner repeater. I have boiled it down to a
pretty concise
> case. If
> someone could offer hints I would be most appreciative!
>
> I understand the objects I am using to store data could
be different, but
> it
> only looks strange because I had to boil down a complex
case to a simple
> case.
>
> Type a user and then an email address then click to add
them, the user
> TextInput and label gets created, but not the email
address label and text
> input.
>
> Basically I want users in an ArrayCollection, and their
multiple email
> addresses in an ArrayCollection stored in an Object,
where I get that
> email
> ArrayCollection using the user as the key to the object
acting as an
> associative array.
I wouldn't bind to methods like that...I'd make properties
and bind to
those.
Maybe you are looking for
-
Can Final Cut Pro 7 be installed on more than one computer?
I am looking to purchase a Final Cut product, maybe Final Cut Pro 7, and wondering how many computers I can install the software on. I'm doing some basic video editing stuff for a sketch comedy team and we use more than one computer at times for edi
-
System freezes every time I use a Java based app
Hi all, Very new to all this as I don't really know what to do, where to post or really how to ask about this. It started out that I wanted to try to use JAlbum, a program that creates photo albums to share on the web etc..... I upgraded the Java app
-
Now that AIR supports the MinimumOSVersion key, apps can set a specific minium version they will support. It wasn't available before, so it ended up in the app store with the default of 4.0. Any device that AIR supported had to have ARMv7 anyways and
-
Hi all Does anyone know how to set SATA as AHCI. The only options I have in bios v1.6 are RAID or IDE?
-
2-tier Client/server Architecture(Urgent!!!!)
Hi,anyone can help me to do a client/server architecture.The server is able to track and store the client's name,IC number and his machine's IP.And the server is able to broadcast a question stored in the database and get the answer to the question w