Dynamic Image Gallerry First Previous Next Last
I had a friend help me build this but now he's gone and I
don't understand arrays or coldfusion really. I have an image
gallery that works beautifully except that I want to be able to add
two behaviors to the page. 1.Pagination. 2. Display Record Count.
(I know how to use the Dreamweaver built in Server Behaviors with
Dynamic Tables but this is a little different from that b/c he's
using arrays to build the table instead. I've almost go the
pagination working. Except I can't figure how to show the last
record. I've got "First, Next, & Previous" to work. But the
"Last" doesn't. This is the part of the code that I'm concerned
with as everything else is working.
<cfset CountUp=Count + 10>
<cfset CountDown=Count - 10>
<p align="center"><cfif Count gte 1><a
href="gallery.cfm">First</a></cfif> <cfif
Count gte 10><a
href="gallery.cfm?Count=<cfoutput>#CountDown#</cfoutput>">Previous</a></cfif> <cfif
ArrayLen(PhotoArray) gt CountUp><a
href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Next</a></cfif><cfif
ArrayLen(PhotoArray) lt CountUp><a
href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Last</a></cfif>
I have no idea how to write the "Display record counts" so if
someone can help me write that part I would be so greatful.
Here is all of the code for this page attatched...
Nobody's helping me
Similar Messages
-
First/Previous/Next/Last buttons not working in Applications Master Detail
Jdeveloper version: fusiondrop5primeb26
accessed through appstta.oraclecorp.com
I attempted to create an Applications Master Detail UI by selecting Applications : Master Detail from the Applications Component Palette. I created the UI using my headers table (APPLCORE_SHIPMENT_HEADERS) as the master and the lines table (APPLCORE_SHIPMENT_LINES) as the detail. The master is shown as a form and the details are displayed as a table below. On the screen with the checkboxes to include First, Previous, Next, Last buttons, I checked all of them.
On the backend, my headers table has two rows.
When I ran the page:
1. When the page comes up, it shows the data for shipment header 1 and the associated details in the table below. This is correct.
2. However, the First and Previous buttons are enabled at the top. They should not be enabled since I am on the first record, and there is no previous record. This is incorrect.
3. When I click Next, the data does not update to the the next header record (shipment header 2). The data is still for shipment header 1. This is incorrect.
4. When I click Next once more, an Error window pops up:
Messages for this page are listed below.
ShipmentLineId Error java.lang.NullPointerException
ShipmentHeaderId Error java.lang.NullPointerException
LineNumber Error java.lang.NullPointerException
ItemName Error java.lang.NullPointerException
(same error is shown for all other columns in the lines table)
I was under the impression that we do not need to do anything special for the First/Previous/Next/Last buttons to work, other than checking the boxes in the page creation process.
The application in question is here:
/home/sheyu/jdevhome/descflexdemo/.
The ui project specifically is in this folder:
/home/sheyu/jdevhome/descflexdemo/mywork/descflexdemo/ui/
I have tried to start from scratch several times to no avail. Please advise.
Thanks,
SherrySherry, please use the internal JDeveloper forum at http://www.oracle.com/technology/products/jdev/customers/index.html for questions like this.
The OTN forum is meant for versions that are available for the public. -
Which driver supports the previous, next, last, first methods defined in jd
which driver supports the previous, next, last, first methods defined in jdbc2.0?
erm... all JDBC2.0 drivers.
Check out http://industry.java.sun.com/products/jdbc/drivers u can do a search for JDBC2.0 Drivers.
Hope this helps!
Sam -
First, Prev, Next, Last Display
In NetDyanmics I was able to show or not show the First, Previous,
Next and Last buttons depending on the state of the repeated. For
instance, if the repeated was display the first rows of data and
there were no previous rows, I would not display the First and
Previous buttons. Likewise if the repeated was displaying the last
set of data and there were no additional rows to display, I would not
show the Next and Last buttons.
This was accomplished by using getCurrFirstRow and
lastRecordIsDisplayed methods of the CSpCommonRepeated.
Is there any way in JATO to duplicate this functionality? I have
attempted to figure out how many total rows the Model had and which
rows are currently being displayed but it appears that the Model only
contains the needed rows for display.
Any help is appreciated.
Jason Smith
jsmith@E...Hi Jason--
The following method will allow you to determine the current position within
the result set:
ResultSetModelBase.getLocationOffset()
If this value is 0 or less, you're at the beginning of the result set.
Otherwise, you're somewhere else in the result set.
Determining if you're at the end of the result set is more difficult. One
technique would be to check whether the number of rows in the model were
less than the max displayable number in the tiled view, and base your
decision on this. This wouldn't work if the total number of rows were a
multiple of the max dispaly size, but might be adequate for most situations.
Detecting if you're at the end the result set because of a last() operation
is even more difficult, because then an equal number of rows will be
available as the max displayable rows because the fetch starts from the end
of the result set. In this case, though, you could just set a flag in your
Last button request event handler to hide the button on the redisplay.
Sorry I don't have a cleaner technique for you at the moment. I'll look
into making this easier in the future.
Todd -
Dynamic Image Gallery First, Next,Previous,Last
had a friend help me build this but now he's gone and I don't
understand arrays or coldfusion really. I have an image gallery
that works beautifully except that I want to be able to add two
behaviors to the page. 1.Pagination. 2. Display Record Count. (I
know how to use the Dreamweaver built in Server Behaviors with
Dynamic Tables but this is a little different from that b/c he's
using arrays to build the table instead. I've almost go the
pagination working. Except I can't figure how to show the last
record. I've got "First, Next, & Previous" to work. But the
"Last" doesn't. This is the part of the code that I'm concerned
with as everything else is working.
<cfset CountUp=Count + 10>
<cfset CountDown=Count - 10>
<p align="center"><cfif Count gte 1><a
href="gallery.cfm">First</a></cfif> <cfif
Count gte 10><a
href="gallery.cfm?Count=<cfoutput>#CountDown#</cfoutput>">Previous</a></cfif> <cfif
ArrayLen(PhotoArray) gt CountUp><a
href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Next</a></cfif><cfif
ArrayLen(PhotoArray) lt CountUp><a
href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Last</a></cfif>
I have no idea how to write the "Display record counts" so if
someone can help me write that part I would be so greatful.
Here is all of the code for this page attatched...
Attach CodeYour code is more complicated than it needs to be. I honestly
didn't dig through it, but here are a few suggestions.
Use ArrayLen(array[]) to count the number of rows in an aray.
Use array[ArrayLen(array)] to find the last record -
Previous month first data and previous month last date
can any body have query to get previous month first date and previous month last date.
Ex: First day of the previous week:
TIMESTAMPADD(SQL_TSI_DAY,-6, (TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)))
Last day of the previous week:
TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)
can anybody have it for first day of the previous month,last day of the previous month?
Edited by: user12255470 on Apr 7, 2010 3:30 AMHi,
1st day of previous month :
TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)) * -1) + 1, TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE))
last day of previous month :
TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)) * -1 , TIMESTAMPADD(SQL_TSI_MONTH, 1, TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)))
Please mark Q answered and award points for correct answers !
Thanks
Alastair -
For the previous month first day and last day
i want to schedule my reports from the last month first date to last month last date.
any body have queries for the while scheduling to uuse it.
Ex:sysdate() - today's date
first_day_of_month()- first day of current month
first day of last month ---?
last day of the last month ---?In the parameter, put this
{$FIRST_DAY_OF_MONTH()$}other values you can use in default parameter values are
{$SYSDATE()$} - to get current date
{$FIRST_DAY_OF_MONTH()$} - to get first day of the current month
{$FIRST_DAY_OF_YEAR()$} - to get first day of the current year
{$LAST_DAY_OF_MONTH()$} - to get last day of the current month
{$LAST_DAY_OF_YEAR()$} - to get last day of the current year
Re: Default date as first of month
TO get last day of last month
{$FIRST_DAY_OF_MONTH()-1$}You can add/subtract number with these functions and no other functions are available. -
How to make a Previous/Next Menu
Hi there. This is my first time posting in the Adobe forums so please be patient if I don't do things correctly.
I currently have the Adobe Web Design CS5 package and all the programs that come with it, but my question is specifically about Dreamweaver. My computer is a Macbook with the latest operating system as far as I know.
I've been trying to create a next/previous menu for parts of my own personal website. It's http://www.aidenart.com . If you click on the link to the Concept Art page you should see a bunch of image thumbnails that act as links. Click on any one of those images and you're suppose to see the full image from the thumbnail in a whole new page. On the pages with the full images I would like to include, at the bottom, a jump menu so that a visitor can pick any of the pages that they might want to see (I already know how to do this part), but I would also like to include buttons which allow the visitor to visit the next image in the list and also the previous one in the list. You know, a previous and next menu. I've seen other websites using those kinds of buttons so I know it's possible somehow.
By looking at the source code of some websites and doing a bit of research on my own, I think this can be done using javascript of some kind. Maybe by using an "onClick" behaviour or something. I looked at a few different web help sites, including W3 Schools, and I still haven't found any clear cut explanations on how to make a previous/next menu. If someone could just show me the basic code for making a simple one that actual works then I could probably work from that.
I would prefer it if I didn't have to bother with the dreamweaver extenstions section because most things listed in the exchange are something you have to pay for. And for those of you who think I should just make individual links on each page, please keep in mind that I'll want to add more pages in the future. Most likely a lot of pages. I also want to be able to make previous/next menus for the comics section of my website for when I have more comic pages available, so I really need to know how to do this.
I hope that was enough information for you guys. I can try to provide code if you guys want although I'm not sure how that would help solve my current problem.Only way to do pagination effectively requires either a database or XML files containing your data. Neither way is really for a beginner based on my experience with both. And based on the size of your library right now, pagination isn't what you really need.
If it is going to be an image gallery you could look into the php Gallery script if you have a mySQL database ( http://gallery.menalto.com/ ). But for simple solutions.
For even smaller solutions you can look to JQuery solutions. They require minimal amounts of coding, mostly just file inclusions.
http://galleria.aino.se/
http://fancybox.net/
http://www.twospy.com/galleriffic/#1
It's just about finding one that meets your needs and gives you the ability to customize as you see fit. -
Showing dynamic images in BI Publisher PDF report
I defined a RTF report layout in BI Publisher. Almost done, but one requirement missing...
I should be able to include a dynamic image (so every "object" on the report has it's own image).
At first I embedded the base64 converted image in the XML output, but then I am running into the 32K limit. (Small pictures render fine).
Although Marc Sewtz sort of promised in June 2008 (!) : "One issue, which we'll address in the next version of Application Express, is the 32k limit on report columns." on his blogpost http://marcsewtz.blogspot.com/2008/06/one-question-about-pdf-printing-feature.html , it still not addressed.
So I tried to embed the image in the report using a trick described on the forum (and BIP documentation), by embedding a dummy picture and set the "Alt-text" of the picture to
(as an example) : url:{'http://www.oracleimg.com/us/assets/oralogo-small.gif'}.
The strange thing is, that works fine for HTML Output and Excel output, but not for Word and PDF (why it does work for Excel and not for Word is very mysterious....). And of course I need a PDF output.
I also tried to embed a FO snippet:
<fo:block>
<fo:external-graphic src="url:{'http://www.oracleimg.com/us/assets/oralogo-small.gif'}" />
</fo:block>
But that doesn't (seem to) work on any output...
But
<fo:block>
<fo:external-graphic src="D:\Users\rhartman\Documents\PrintScreen Files\Screenshot004.jpg" />
</fo:block>
does produce the image on the PDF output.
So who has an idea how to solve this issue?? You'll be rewarded with a lot of pionts ;-)
TIA
RoelHi Carsten
That was exactly* I was looking for. Maybe I should Google more in German ;-)
The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
After moving the image inside the group....it works great!
(One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
@Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
The way I use it now (very similar to Carsten's description) there is no limit....
Thank you all!
Roel -
SQL select Statement -first day and last day of the month - 1 year from now
Hi,
I need to write a SQL to get the dates in between first day and last day of the month one year from now.
SELECT last_day(add_months(sysdate,12)) as lastday from dual
What could be the Query to get the first day of the month one year from now..
ie ..Sysdate - 3-DEC-2009
Result - 1-DEC-2010
thank youHi,
You can use TRUNC with 2 arguments to get the first DATE in a month, year, quarter, week, hour, minute, ISO year, ...
SELECT TRUNC ( ADD_MONTHS ( SYSDATE
, 12
, 'MONTH'
) AS first_of_month
FROM dual
;The DATE returned will be in the same month, year, quearter, ... as the first argument.
\We convered the last day of the month in [your previous question|http://forums.oracle.com/forums/message.jspa?messageID=3942939#3942939].
At that time, I warded about using LAST_DAY as a cutoff point; TRUNC is a much better way.
For example, to find all appointment_dates in the current month next year:
SELECT *
FROM appointments
WHERE appointment_date >= TRUNC (ADD_MONTHS (SYSDATE, 12), 'MONTH')
AND appointment_date < TRUNC (ADD_MONTHS (SYSDATE, 13), 'MONTH')Note that
the first part of the WHERE clause calls for dates on or equal to the beginning of the 12th month in the future, but
the second part of the WHERE clause calls for dates before, not equal to , the beginning of the 13th month in the future. -
In RoboHelp HTML, is it possible to add something like Main /
Previous / Next button in header / top of each topic, rather than
using the Browse Sequence.
I'm using other HAT previously, but switch to RoboHelp
recently, would like to get it back. :) Thanks in advance.As it happens I am investigating something like this right
now, having found several problems with the Browse Sequence
mechanism.
It isn't too much work if you plan it carefully. Here's how I
did it.
I made a couple of small images (actually I grabbed the
Back/Forward buttons from Explorer) and inserted them into one
topic, at the end of the Heading 1 which starts each topic. I set
Image_Properties > Text_Wrapping to "Right" so that they appear
in the top right-hand corner of each topic. Note that if you do
this, you must insert the Right arrow first, then a space, then the
Left arrow (without the space, RoboHelp only allowed one link for
both images). I then added a screen tip to the image "Next/Previous
in sequence". Then I added hyperlinks.
After this I was able to select both images, and use
Copy/Paste to add them to all topics. When you double-click, you
get the hyperlink properties dialog, and can correct the links. I
arranged my screen so that the relevant part of the ToC was open on
the screen, so I could see where I was in the sequence.
Of course this is a PITA and error-prone, but testing is
relatively easy, if you have Auto-synchronize_TOC in Window
Properties. The buttons are always in the same place, so you can
just click repeatedly while watching the ToC.
Success!
--- Derek -
How to display a dynamic image file from url?
Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
//PlayJpg.java:
import java.awt.*;
import java.applet.*;
import java.net.*;
public class PlayJpg extends Applet implements Runnable {
public static void main(String args[]) {
Frame F=new Frame("My Applet/Application Window");
F.setSize(480, 240);
PlayJpg A = new PlayJpg();
F.add(A);
A.start(); // Web browser calls start() automatically
// A.init(); - we skip calling it this time
// because it contains only Applet specific tasks.
F.setVisible(true);
Thread count = null;
String urlStr = null;
int sleepTime = 0;
Image image = null;
// called only for an applet - unless called explicitely by an appliaction
public void init() {
sleepTime = Integer.parseInt(getParameter("refreshTime"));
urlStr = getParameter("jpgFile");
// called only for an applet - unless called explicitely by an appliaction
public void start() {
count=(new Thread(this));
count.start();
// called only for applet when the browser leaves the web page
public void stop() {
count=null;
public void paint(Graphics g) {
try{
URL location=new URL(urlStr);
image = getToolkit().getImage(location);
}catch (MalformedURLException mue) {
showStatus (mue.toString());
}catch(Exception e){
System.out.println("Sorry. System Caught Exception in paint().");
System.out.println("e.getMessage():" + e.getMessage());
System.out.println("e.toString():" + e.toString());
System.out.println("e.printStackTrace():" );
e.printStackTrace();
if (image!=null) g.drawImage(image,1,1,320,240,this);
// called each time the display needs to be repainted
public void run() {
while (count==Thread.currentThread()) {
try {
Thread.currentThread().sleep(sleepTime*1000);
} catch(Exception e) {}
repaint(); // forces update of the screen
// end of PlayJpg.java
My Html file looks like here:
<html>
<applet code="PlayJpg.class" width=320 height=240>
<param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
<param name=refreshTime value="1">
</applet>
</html>
I only get the first frame picture for ever by my html.But the jpg file is dynamic.
Why?
Can you help me?
Thanks.
JoeHi,
Add this line inside your run() method, right before your call to repaint():
if (image != null) {image.flush();}Hope this helps,
Kurt. -
How do get a dynamic image to open in new browser window
I'm using DW CS3, mysql (MAMP) OS 10.6.2 I'm designing my online store. I need the customer to be able to click dynamic image/thumbnails to view a larger image in a new browser pop up window 400 x 400. An example of this functionality can be seen at :
http://www.designpublic.com/spot-on-square-roh-dresser
So far I can get the separate new browser window to open with the dynamic image, using the open new browser behavior, but the on click also advances to next page with the larger image. You have to press the back button to get back to the product page. I want the customer to be able to see the product page , while viewing larger image, and then close larger image, and still have the product page open. I don't understand why 2 windows are opening.
Thanks for the help people!
WilliamHi
I did look at it but, (and this is only my opinion, I do not like such effects) it is your decision.
If you view source you will see -
<a href="#" onclick="popWin('http://www.designpublic.com/catalog/product/gallery/id/12706/image/91883/', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="Spot on Square Roh Dresser" class="gallery-image-link"><img src="http://arcsmedia01.s3.amazonaws.com/catalog/product/cache/2/thumbnail/56x56/5e06319eda06f020e43594a9c230972d/r/o/roh_dresser1.jpg" alt="" /></a>
Which is controlled by the javascript function
popWin()
which you can view using the firefoxe dev toolbar - view javascript function.
PZ -
Hi,
I want to create Badges from employee table (ID, NAME, JOB_TITLE, PHOTO). I downloaded and installed a demo application "USING DYNAMIC IMAGES IN PDF REPORT". It works fine with smale images < 20K. I'm getting the following error for images > 20K :
"ORA-06502: PL/SQL: numeric or value error: raw variable length too long"
it seems like a buffer problem.
could you pls help to solve this problem
Thanks,
RibhiHi Carsten
That was exactly* I was looking for. Maybe I should Google more in German ;-)
The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
After moving the image inside the group....it works great!
(One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
@Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
The way I use it now (very similar to Carsten's description) there is no limit....
Thank you all!
Roel -
Query for back 2nd motnh first day and last day
Any body please provide me the query for back 2nd month first day to back 2nd month last day?
last month first day
TIMESTAMPADD(SQL_TSI_MONTH,-1, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE))
last month last day
TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)), CURRENT_DATE)
anyone please provide me the queries for previous months like above queries?
2nd back month first day --?
2nd back month last day--?
3rd back month first day --?
3rd back month last day --?Hi,
Check with this...
Previous month last day -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)
Last day of 2nd month -
TIMESTAMPADD(SQL_TSI_MONTH,-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
Last day of 3rd month -
TIMESTAMPADD(SQL_TSI_MONTH,-2,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
(OR)
Previous month last day -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)
Last day of 2nd month -
TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
Last day of 3rd month -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)))*-1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)))
Regards,
Srikanth
Maybe you are looking for
-
Information on Requirements type in scheduling agreement
Does anyone can give me infomation about 'requirements type' found in the procurement tab of the scheduling agreement?
-
i want to port labview program to my target LPC2100,such as LPC2119.But i do not know what i should do first,and how to do it? second,third.......please give me some help.
-
Combining CFChartSeries in one graph
I have a chart that has four vertical bar graphs. The results show how much percentage of a goal has been reached. If/when any bar exceeds the 100% of goal mark, I bump the scaleTo up to 200 and show a horizontal line at the 100% mark. Everything wor
-
Best HDTV for using with the mini
I would like to purchase a new flat screen TV that will be relatively plug and play with my intel mini. Basically I would like it to watch DVD's and use Front Row. TV screen size around 42" and a dpi of 1080. What TV's should I be looking at? Cheers,
-
Windows 10 HP pavilion a1510y Solution For Graphics ATI Radeon Express 1100
I want to upgrade to Windows 10 from Win 7but can not due to outdated Graphics Which is the ATI Radeon Xpress 1100 Integrated graphics. Is there a way to fix this problem or upgrade to a higher graphics card. And what type of card should be used. or