JavaScript, JSTL help. Anyone please.
Hi All,
I got a Page1.jsp and corresponding Page1.java. Their is a button on the Page1.jsp. On the onclick event i write a javascript which have to call a method in my Page1.java. How can i get about doing it. Am using JSTL also in the jsp page. If that might be of any help.
Help will be appreciated.
Thanks.
Vivek.
Thanks for the prompt reply. Will look in to the links. Meanwhile what i wanna do is that i wanna open another window in the onclick window using the window.open() and at the same time invoke a method in the bean for executing some business logic required to render the new page that will open from window.open().
If i do the code invoking the business logic in the action method the form gets submitted this is what i dont want. And also the action is done after the window.open() executes so for the first time the window is blank. So what i plan is to call the bussiness logic method first and then open another window. by window.open().
Hope this is helpful.
Similar Messages
-
I want to upgrade from Photoshop Extended CS5 to PS Extended CS6 Mac (I do NOT want CC) but have been unable to find this at a sensible price (or sometimes at all). Help, anyone please? This is in UK, btw!
What do you consider a sensible price? PS CS6 extended is available only when you purchase the CS6 Suite, which is around $1000 for the upgrade from CS5. PS 6, which is not extended, is about $200, but I'm not sure about upgrading to a single app from a suite. Adobe used to allow it, but I'm not sure about now. PS CC and Lightroom 5 combo is $9.99 a month or PS CC alone for $19.99 or the whole CC suite for $29 a month. The latest CC apps are "extended."
-
OS10.6.8, Firefox 24.0
The new Yahoo mail shows no graphics using Firefox 24.0 - just identical rectangles where new icons should be.\. However, the new Yahoo mail displays correctly in Safari and Chrome. I believe this has to to with the settings for Javascript. Those settings aren.t easy to access in the most recent Firefox 24.0 version. Help me, please.The settings for Javascript are either on or off, Fireefox 24 doesn't give you a option to turn off Javascript, unless you installed something like NoScript extension (or some other Javascipt blocking add-on)
If NoScript, then you need to use the View > Toolbars > Customize and drag the NoScript "Temp Allow All" button to the toolbar area to enable all enabled scripts (including Javascript) on that web page.
Under the Firefox Help menu is a option to restart with add-ons disabled to see if something you might have installed is causing your problem.
Reinstall Firefox or create another user account and run Firefox there to try to localize your issue.
I'm having no problem here on 10.6.8 in Firefox, Chrome or Safari, Yahoo Mail works perfectly. -
New work phone 2 months old. Help anyone please?
I have a new work phone 3Gs. two months old. Just updated itunes and lost all my data and contacts. Have set phone back to default and reinstalled itunes. Phone will not sync. Itunes keeps freezing. Can't find support numbers in Auckland for Apple. Is there a patch or can anyone help please?
You are under warranty. You can call Applecare and get advice from the tech rep, or you can bring it to an Apple store or authorized Apple service provider.
-
I accidentally dragged the Lion download from the dock onto my desktop and it disappeared in a puff. This seems to have halted the download as it is now 8 hours since purchase and has stuck at 1.75gigs. Could anyone advise please?
The icon in the dock is NOT the file itself. You simply removed the dock icon. Go into your Applications folder and you'll find "Install Mac OSX..." and you have what you want.
-
JavaScript, Mootools help anyone?
Hi all, I'm using the mootools JavaScript library to make the
Accordion effect. And I have little expand/collapse characters
within my togglers. [+]/[--]. Now this is the code I'm using for my
toggler.
<div class="toggler">
<div class="toglabel">Relative 1:</div>
<div class="togtext">
<span class="floatr"><a href="#relative1">Expand
Details [+]</a> </span>
<a href="#relative1">Anthony J Rubino</a>
</div>
</div>
The problem is, the way my code is currently, it swaps the
entire contents of the "toggler" div. I would like for it to only
swap out the content inside the anchor element. There has to be a
way, I'm just not sure how...
Attached is my javascript (based on prototype) code.Thanks for the prompt reply. Will look in to the links. Meanwhile what i wanna do is that i wanna open another window in the onclick window using the window.open() and at the same time invoke a method in the bean for executing some business logic required to render the new page that will open from window.open().
If i do the code invoking the business logic in the action method the form gets submitted this is what i dont want. And also the action is done after the window.open() executes so for the first time the window is blank. So what i plan is to call the bussiness logic method first and then open another window. by window.open().
Hope this is helpful. -
hi all
just a question i have an i touch and itunes which was connected to this windows xp computer i had to restore my pc to factory settings when i plugged in my i touch after downloading itunes it said it is synced to another pc . now i have tried to deautorise it but this has not worked so basically im wondering as i have a music on my itunes which i cant get onto my itouch i have tried manually but this didnt work either this music wud be file share music
id be thankful for any helpjohn peden wrote:
Hi im a new user of the iPhone and was wondering if anyone could help me out with a few things?
1. How do i record a voice message to myself as a memo? 02 doesnt seem to let me phone my own voicemail?
You can't at this time.
2. How to Reject spelling suggestion ? iPhone keyboard tries to guess which word
you mean and offer correction. Space bar accepts suggestion but how do I refuse
suggestion and stick with my actual typed wording?
When it suggests the replacement it will pop up above the word you are typing in a little box. Press the X in the box and it will reject the suggestion.
3. How do i move emails into folders?
If you have an IMAP account and the folders sync'd to the phone then you can press the folder button on the bottom and move the message.
4. On the keyboard how do i set capslock on and off?
You have to enable caps lock in Settings > General > Keyboard. Then just double click the shift button to enable capslock -
I need help what's a good target bitrate and a maximum bitrate for uploading to youtube 1080p please help and to keep my video file size small thanks
-
Help my ipod wont connect to the computer help anyone please
k just a couple of days ago i tried to plug my ipod into my computer to charge and put new songs on it but when i plugged it into the usb port nothing happened the ligth on the ipod wouldnt flash and the computer would not say that it was plugged in. someone please help me.
Hi,
If there is no light on the front of the iPod shuffle when connected to the computer, try in another USB port.
Check for the front status light and battery status light when it is not connected to the computer.
If you have determined that there are no lights then send the iPod shuffle for service at http://depot.info.apple.com/ipodshuffle/
Apple phone no's http://www.apple.com/contact/phone_contacts.html
Santo -
Errors while trying to create object Tables,kindly help.Anyone,please
Oracle 10.2g
This is what Iam trying to do
Creating the School Type
CREATE TYPE type_school AS OBJECT
( SCHOOL VARCHAR2(30)
, VA NUMBER(4)
, ID NUMBER(4)
, SN VARCHAR2(30)) ; /Creating the School Information Type
CREATE TYPE type_schoolInfo As OBJECT
( SCHOOLID REF type_school
, SCHOOLNAME VARCHAR2(50)
, PHONELIST VARCHAR2(50)
, ADDRESS ROW ( STREETNAME VARCHAR2(30),
POSTCODE VARCHAR2(30))
, HEADTEACHERNAME VARCHAR2(30)
, LEAPASSWORD VARCHAR2(30)) ;
Warning: Type created with compilation errors.
SQL> show errors type type_schoolInfo;
Errors for TYPE TYPE_SCHOOLINFO:
LINE/COL ERROR
5/29 PLS-00103: Encountered the symbol "VARCHAR2" when expecting one
of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
The symbol "." was substituted for "VARCHAR2" to continue.
6/16 PLS-00103: Encountered the symbol "VARCHAR2" when expecting one
of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
LINE/COL ERROR
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
The symbol "." was substituted for "VARCHAR2" to continue.Thank you.
Edited by: Trooper on Jan 13, 2009 5:59 PMThe problem is here
ADDRESS ROW ( STREETNAME VARCHAR2(30),
POSTCODE VARCHAR2(30))Solution
écrit file afiedt.buf
1 CREATE TYPE address_objtyp AS OBJECT (
2 streetname VARCHAR2(30),
3* postcode VARCHAR2(30));
SQL> /
Type créé.
SQL> edit
écrit file afiedt.buf
1 CREATE TYPE type_schoolInfo As OBJECT
2 ( SCHOOLID REF type_school
3 , SCHOOLNAME VARCHAR2(50)
4 , PHONELIST VARCHAR2(50)
5 , ADDRESS address_objtyp
6 , HEADTEACHERNAME VARCHAR2(30)
7* , LEAPASSWORD VARCHAR2(30)) ;
SQL> /
Type créé.[http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10799/adobjdes.htm]
Edited by: Salim Chelabi on 2009-01-13 13:14 -
Can't connect to App Store on newly purchased iPhone 5c - help anyone please?
Hi, have submitted a case for email response, but would love some suggestions in the meantime.
New iPhone 5c purchased last week, all setup fine. App Store working, WiFi and cellular all working. Downloaded software update 8.1, App Store no longer works. WiFi and cellular network still all fine.
Ideas? Have already rebooted, done full reset, pushed out purchased Apps to try to initiate the Store... no luck.Have you logged onto iTunes and then the app store since you did the update? There is a new set of terms and conditions to accept and you may find you need to do that first. If you haven't yet done that try and see if that solves your problem.
-
New 6280 owner - Help anyone please!!!
Just got the phone-looks great-took AGES to load PC Suite- it worked for ONE day only- can't get the manual to download on my PC (WindowsXP SP2)-only want to use it to download some tunes from my Music library to use as ringtone !!!-is that asking too much???
Hiya,
Just read your post but not following exactly... What exactly is your problem? PC Suite, or the handset? Could you be a little more specific...
If it's the PC Suite, I think this is in the wrong board but that'll be decided by someone else lol
I'll look again when there's more info
Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5 -
BT email not working. Cannot send emails from btconnect SMTP after iOS upgrade. This is the only difference I am aware of. Apple iPad 3. Can anyone help me please.
All resolved at last
Deleted the SMTP setting
Recreated the SMTP using the same settings
Able to send emails now
No logic - as usual - just a bug! -
I am trying to learn HANA on my own.i have product id,product name,delivery date and Grossamount in my calculated view.i am trying to create calculated column where i need Grossamount in two columns based on delivery date.I have 2012 and 2013 as values for my delivery date.so i have created two column as grossamount_2012 and grossamount_2013.if i have delivery date as 4thdec,2012 i want the grossamount value to be in coloumn grossamount_2012 and the grossamount_2013 should be blank.i have written an expression like this
if("Deliverydate" <= longdate(2012-12-04),"Grossamount","0")
and it looks like this is wrong.i am getting the text Grossamount rather than values for that field in my output.so can anyone help me please?Hi chandra
i am trying to get the same result by using sql script and CE functions.i have written the following code
select A."PRODUCTID",
E."TEXT" as "PRODUCTNAME",
C."COUNTRY",
D."DELIVERYDATE",
Sum(D."GROSSAMOUNT") as "GROSSAMOUNT"
from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products" as A
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.BusinessPartner" as B
on A."SUPPLIERID" = B."PARTNERID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Addresses" as C
on B."ADDRESSID" = C."ADDRESSID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Purchase.Item" as D
on A."PRODUCTID" = D."PRODUCTID"
inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts" as E
on A."NAMEID" = E."TEXTID"
GROUP BY A."PRODUCTID",E."TEXT",C."COUNTRY",D."DELIVERYDATE";
this is working fine but i want to split the grossamount based on current year and last year.Any idea how to do this
In calculation view using script can we use if and case statements? -
Can anyone help me, please
Hello again:
Please run my coding first, and get some view from my coding.
I want to add a table(it is from TableRenderDemo) to a JFrame when I click on the button(from DrawCalendar) of the numer 20, and I want the table disply under the buttons(from DrawCalendar), and the table & buttons all appear on the frame. I added some code for this problem(in the EventHander of the DrawCalendar class), but I do
not known why it can not work.Please help me to solve this problem.
Can anyone help me, please.
Thanks.
*This program for add some buttons to JPanel
*and add listeners to each button
*I want to display myTable under the buttons,
*when I click on number 20, but why it doesn't
*work, The coding for these part are indicated by ??????????????
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.GridLayout;
public class DrawCalendar extends JPanel {
private static DrawCalendar dC;
private static TestMain tM;
private static TableRenderDemo myTable;
private static GridLayout gL;
private static final int nlen = 35;
private static String names[] = new String[nlen];
private static JButton buttons[] = new JButton[nlen];
public DrawCalendar(){
gL=new GridLayout(5,7,0,0);
setLayout(gL);
assignValues();
addJButton();
registerListener();
//assign values to each button
private void assignValues(){
names = new String[35];
for(int i = 0; i < names.length; i++)
names[i] = Integer.toString(i + 1);
//create buttons and add them to Jpanel
private void addJButton(){
buttons=new JButton[names.length];
for (int i=0; i<names.length; i++){
buttons=new JButton(names[i]);
buttons[i].setBorder(null);
buttons[i].setBackground(Color.white);
buttons[i].setFont(new Font ("Palatino", 0,8));
add(buttons[i]);
//add listeners to each button
private void registerListener(){
for(int i=0; i<35; i++)
buttons[i].addActionListener(new EventHandler());
//I want to display myTable under the buttons,
//when I click on number 20, but why it doesn't
//work
private class EventHandler implements ActionListener{
public void actionPerformed(ActionEvent e){
for(int i=0; i<35; i++){
//I want to display myTable under the buttons,
//when I click on number 20, but why it doesn't
//work
if(i==20){ //???????????
tM=new TestMain(); //???????
tM.c.removeAll(); //??????
tM.c.add(dC); //???????
tM.c.add(myTable); //????
tM.validate();
if(e.getSource()==buttons[i]){
System.out.println("testing " + names[i]);
break;
*This program create a table with some data
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableColumn;
import javax.swing.DefaultCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TableRenderDemo extends JScrollPane {
private boolean DEBUG = true;
public TableRenderDemo() {
// super("TableRenderDemo");
MyTableModel myModel = new MyTableModel();
JTable table = new JTable(myModel);
table.setPreferredScrollableViewportSize(new Dimension(700, 70));//500,70
//Create the scroll pane and add the table to it.
setViewportView(table);
//Set up column sizes.
initColumnSizes(table, myModel);
//Fiddle with the Sport column's cell editors/renderers.
setUpSportColumn(table.getColumnModel().getColumn(2));
* This method picks good column sizes.
* If all column heads are wider than the column's cells'
* contents, then you can just use column.sizeWidthToFit().
private void initColumnSizes(JTable table, MyTableModel model) {
TableColumn column = null;
Component comp = null;
int headerWidth = 0;
int cellWidth = 0;
Object[] longValues = model.longValues;
for (int i = 0; i < 5; i++) {
column = table.getColumnModel().getColumn(i);
try {
comp = column.getHeaderRenderer().
getTableCellRendererComponent(
null, column.getHeaderValue(),
false, false, 0, 0);
headerWidth = comp.getPreferredSize().width;
} catch (NullPointerException e) {
System.err.println("Null pointer exception!");
System.err.println(" getHeaderRenderer returns null in 1.3.");
System.err.println(" The replacement is getDefaultRenderer.");
comp = table.getDefaultRenderer(model.getColumnClass(i)).
getTableCellRendererComponent(
table, longValues[i],
false, false, 0, i);
cellWidth = comp.getPreferredSize().width;
if (DEBUG) {
System.out.println("Initializing width of column "
+ i + ". "
+ "headerWidth = " + headerWidth
+ "; cellWidth = " + cellWidth);
//XXX: Before Swing 1.1 Beta 2, use setMinWidth instead.
column.setPreferredWidth(Math.max(headerWidth, cellWidth));
public void setUpSportColumn(TableColumn sportColumn) {
//Set up the editor for the sport cells.
JComboBox comboBox = new JComboBox();
comboBox.addItem("Snowboarding");
comboBox.addItem("Rowing");
comboBox.addItem("Chasing toddlers");
comboBox.addItem("Speed reading");
comboBox.addItem("Teaching high school");
comboBox.addItem("None");
sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
//Set up tool tips for the sport cells.
DefaultTableCellRenderer renderer =
new DefaultTableCellRenderer();
renderer.setToolTipText("Click for combo box");
sportColumn.setCellRenderer(renderer);
//Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = sportColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer)headerRenderer).setToolTipText(
"Click the sport to see a list of choices");
class MyTableModel extends AbstractTableModel {
final String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
final Object[][] data = {
{"Mary ", "Campione",
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml",
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath",
"Chasing toddlers", new Integer(2), new Boolean(false)},
{"Sharon", "Zakhour",
"Speed reading", new Integer(20), new Boolean(true)},
{"Angela", "Lih",
"Teaching high school", new Integer(4), new Boolean(false)}
public final Object[] longValues = {"Angela", "Andrews",
"Teaching high school",
new Integer(20), Boolean.TRUE};
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
* JTable uses this method to determine the default renderer/
* editor for each cell. If we didn't implement this method,
* then the last column would contain text ("true"/"false"),
* rather than a check box.
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
* Don't need to implement this method unless your table's
* editable.
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
if (col < 2) {
return false;
} else {
return true;
* Don't need to implement this method unless your table's
* data can change.
public void setValueAt(Object value, int row, int col) {
if (DEBUG) {
System.out.println("Setting value at " + row + "," + col
+ " to " + value
+ " (an instance of "
+ value.getClass() + ")");
if (data[0][col] instanceof Integer
&& !(value instanceof Integer)) {
//With JFC/Swing 1.1 and JDK 1.2, we need to create
//an Integer from the value; otherwise, the column
//switches to contain Strings. Starting with v 1.3,
//the table automatically converts value to an Integer,
//so you only need the code in the 'else' part of this
//'if' block.
try {
data[row][col] = new Integer(value.toString());
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
JOptionPane.showMessageDialog(TableRenderDemo.this,
"The \"" + getColumnName(col)
+ "\" column accepts only integer values.");
} else {
data[row][col] = value;
fireTableCellUpdated(row, col);
if (DEBUG) {
System.out.println("New value of data:");
printDebugData();
private void printDebugData() {
int numRows = getRowCount();
int numCols = getColumnCount();
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + data[i][j]);
System.out.println();
System.out.println("--------------------------");
*This program for add some buttons and a table on JFrame
import java.awt.*;
import javax.swing.*;
public class TestMain extends JFrame{
private static TableRenderDemo tRD;
private static TestMain tM;
protected static Container c;
private static DrawCalendar dC;
public static void main(String[] args){
tM = new TestMain();
tM.setVisible(true);
public TestMain(){
super(" Test");
setSize(800,600);
//set up layoutManager
c=getContentPane();
c.setLayout ( new GridLayout(3,1));
tRD=new TableRenderDemo();
dC=new DrawCalendar();
addItems();//add Buttons to JFrame
private void addItems(){
c.add(dC); //add Buttons to JFrame
//c.add(tRD); //add Table to JFrameClick Here and follow the steps to configure your Linksys Router with Version FIOS.
Maybe you are looking for
-
Using a JIT call with stock transport scheduling agreement
Hi, I have a requirement to send forecast schedules for a stock transport scheduling agreement from procuring plant to producing plant. Production would be done in producing plant against these forecast schedules. Producing plant would only ship agai
-
PDF file displays different number of text blocks in Acrobat Pro CC 2014 and CS6 versions
Hi, I've inherited a file at work that displays different numbers of text blocks, depending on the version of Acrobat Pro used to view the file. Here's the specific issue: As viewed in CC 2014: "Chapter 1 - Chapter One Title": Appears as two text blo
-
Sony cyber shot, getting the memory due to work with the iPad camera kit
Has anyone been able to find this SD card / memory stick adapter? I checked with Amazon and can not locate. My issue is Im leaving for England on Saturday so I have a week to try to find something that will allow my Sony DSC-HX5V 10.2MP CMOS Digital
-
Error:A Generic exception occurred during loading Customizations
Hi All, I need to extend two standared VO's which are connected by Viewlink. i have extended first VO sucessfully ,and it is showing Good,but when i extend second VO iam getting error as below: the two VO's are query based . i have no idea for what r
-
Connect Lookout 5.0 to PLC5 using SST 5136 SD DH+
Hi, I'm from Purolite (ex Virolite) Romania Company, and we have some problems configuring Lookout 5.0. We used lookout with Allen Bradley PLC5. The interface between them was 1784 KTX supported by lookout. Now we are running out of this boards, so w