Flex nested repeater issue
If someone can explain why I am getting this error, it makes
utterly no sense to me.
Where I try to get the linkrep current index, I get the
error: Error: Access of undefined property linkrepeaterIndices.
EDIT: as it turns out, i changed the name of the inner
repeater from linkrep to something else and it works fine. Is it
that linkrep is some sort of reserved word?
I have been going at this one for quite a while, man!
This can be done by using <mx:Reparent/> tag.
Similar Messages
-
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! -
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 -
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. -
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!!!
>>
>>
>>
>
> -
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?
-
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 -
Flex PHP Wizard Issues (Is Flex/PHP ready for prime time)
I have been designing a website using Flex. I thought of using Flex form many reasons, but one was to reduce the number of languages used in the development process. I am going to be hosting at Godaddy so I thought I would try PHP. I normally would use Java, but Flex seems to want Enterprise Beans and Java Remote Objects which cost to much and would probably not work on Godaddy. I started out with MAMP on a Apple computer and have design 60% of my application, when I started noticing as the database go larger, I started getting communication errors with the MAMP version of mysql. So I installed MySQL and and started using Apache and PHP that comes with OSX. The communication errors are increased.
Any suggestions? I am at the point, if I can find a proven programmer, with GoDaddy/Flex/MySQL/PHP and Java experience to help answer some question, I think I can come up with contract dollars.
First question is Flex ready? or is this an issue with PHP?have moved this thread from the ADDT forums to the Flex Data Services forums
-
Nested Sequence issue: keyframe scale setting changes after rendering?
Hi,
I'm using PremierePro CS5.5, and have been having this same issue since CS4. After nesting a group of clips, I make the timeline effects entries to animate the nested sequence. For this example, let's say I start at 00.00 with the scale set at 150%, and end the sequence with the scale set to 300%. Just zooming in. Looks OK, so I hit return and render the nested sequence. It plays back, all is good, but after it stops the 00.00 setting magically changes to 100% or some other percentage. I've tried everything I can think of, from selecting Hold or Linear for the keyframe, to deleting all the keyframes and redoing the settings. It only happens with nested sequences and it seems to only be the scale setting that goes flukey. Anybody else have this happen and could you tell me what I am doing wrong?
Thanks,
ChristyThanks for checking it out Jim. It doesnt happen every time, you know how that goes... just often enough to drive me batty. I'm doing animated whiteboard videos. Lots of short bits of video layered with graphics and stills, some effects, then all that is nested and sometimes the rate compressed. Then I zoom in a bit and that seems to be the last straw. Maybe I am just doing too much? It's a simple, uncomplicated look to the finished piece, but it takes a lot of cuts and tweaks to get it that way.
Maybe you are looking for
-
Dear All, I am getting a below error while doing ehp6 installation on sybase (high availbility ) can any one help me on this..? An error occurred while processing option SAP Business Suite 7i 2011 > Enhancement Package 6 for SAP ERP 6.0 > SAP Applica
-
Does anyone know whether it's possible to embed a video clip in an email? If so, how? TIA, Pete
-
Solaris 10 Installation for Oracle RAC 10g Rel2
Hello, I have bought Enterprise 4000 and 250 in order to install and explore Oracle 10g Rel2 RAC. In this regard I need some guide lines for 1. Installinig Solaris 10 2. Should I use ASM or other other volume manager? If anybody can give me a startin
-
GL Line Item Display vs F.05
Hi SAP experts, I generated a report for all posted items with poting day 15.07.2009. I saw the document posted in the gl account have a 700,000 EUR Amount in FC and 600,000. GBP Amount in local curr. Now if I'm going to run F.05 Foreign currency val
-
Requery form data block is empty after updating notification attributes
Hello, we build a form to approve/reject open WF notifications. The form data block is based on wf_notifications, wf_local_user_roles, wf_notification_attributes and wf_comments and some additional PSB tables. We use the following API's to perform th