Generate value for f:selectItems in bean
Hello, i use Jdev 10g
values for f:selectItems in bean i'm get from DB and set to list
list = new ArrayList<SelectItem>();
ViewObject vo = am.findViewObject("CountryView");
while (vo.hasNext()) {
CountryViewRowImpl row = (CountryViewRowImpl)vo.next();
SelectItem item = new SelectItem();
item.setValue(row.getCountryCode().stringValue());
item.setLabel(row.getCountryName());
list.add(item);
<af:iterator value="#{informClient_bean.fields}" var="row"
rows="40">
<af:switcher id="sw1" facetName="#{row.type}"
defaultFacet="Text">
<f:facet name="9">
<af:selectOneChoice value="#{row.value}"
requiredMessageDetail="обязательное поле не заполнено"
autoSubmit="#{row.autoSubmit}"
immediate="#{row.immediate}"
label="#{row.label}"
required="#{row.requared}"
readOnly="#{row.readOnly}"
onmouseup="validMask();"
shortDesc="#{row.shortDesc}">
<f:selectItems value="#{row.list}"/>
</af:selectOneChoice>
</f:facet>
</af:switcher>
</af:iterator>when working with a form, select a value from the code we get the selected value .... but sometimes (for example, if the field is read-only true) then the selected value is not the same.
value label
1 a
4 b
5 c
If I choose "b" when working on the shape of the code will be 4
if I open the form and read only true in the bean I get a code 1 and the value of "a"
solved the problem as follows
list = new ArrayList<SelectItem>();
IdentityCardTypeViewImpl vo = (IdentityCardTypeViewImpl)am.findViewObject("IdentityCardTypeView");
vo.executeQuery();
Row[] icTypes = vo.getAllRowsArray();
for(int i=0; i<icTypes.length; i++) {
IdentityCardTypeViewRowImpl row = (IdentityCardTypeViewRowImpl)icTypes;
SelectItem item = new SelectItem();
item.setValue(row.getIdentityCardTypeId().stringValue());
item.setLabel(row.getIctShortName());
list.add(item);
Similar Messages
-
System generated value for a field and incrementing (using module pool pro)
Hi,
I'm getting system generated value for a field and incrementing (i.e done by coding) when i'm saving the screen or transaction (which is created using module pool programming) while modifying, saving its working fine, but when i'm going out of the screen or exit n again i start the screen (with some ztransco) the value for the field again starting from 0 so i want to start from the same value for a field where we exit or got out from the screen n incremented respectively while saving the screen,
Thanks & Regards,
MS
Edited by: Rob Burbank on May 4, 2010 10:40 AMSearch the forum for number range objects.
Rob -
I want to generate value for parameter
Hi experts,
I write one code to generate employee id automatic based on the previous fields in selection screen. ID is generated successfully but I am not able to appear it selection at run time. Please help here is my code.
REPORT ZSELECT_TOP.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
data: id1(4) type c VALUE 'ACEN'.
data: dep like ZACENTIQ_PAGE1-sno.
data: slno(13) TYPE c.
DATA:WA33 TYPE ZACENTIQ_PAGE1.
PARAMETERS:UserName(20) type C ,
Password(10) type C .
PARAMETERS:Depart(15) AS LISTBOX VISIBLE LENGTH 17.
PARAMETERS: Emp_ID(13) TYPE c DEFAULT slno.
AT SELECTION-SCREEN OUTPUT.
NAME = 'DEPART'.
VALUE-KEY = 'DEV'.
VALUE-TEXT = 'DEVELOPMENT'.
APPEND VALUE TO LIST.
VALUE-KEY = 'MARK'.
VALUE-TEXT = 'MARKETING'.
APPEND VALUE TO LIST.
VALUE-KEY = 'CRM'.
VALUE-TEXT = 'CRM'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
SELECT * FROM ZACENTIQ_PAGE1 INTO wa33 UP TO 1 ROWS ORDER BY sno DESCENDING.
dep = wa33-sno.
ENDSELECT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = dep
IMPORTING
OUTPUT = dep
CONCATENATE id1 '/' depart '/' dep into slno.
*----------------------------- At selection screen -------------------------------------
AT SELECTION-SCREEN.
Message was edited by: Manish Kumar : Moderator message: I have edited your post to correct spelling mistakes, all CAPS (shouting) and applied fixed-width font on code for readability. Good formatting can yield better responses.I allready used it in At-SELECTION-SCREEN OUTOUT BUT STILL NOT COMING.
HERE IS MY CODE
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
data: id1(4) type c VALUE 'ACEN'.
data: dep like ZACENTIQ_PAGE1-sno.
data: slno(13) TYPE c.
DATA:WA33 TYPE ZACENTIQ_PAGE1.
DATA INT(3) TYPE I.
PARAMETERS:UserName(20) type C ,
Password(10) type C .
PARAMETERS:Depart(15) AS LISTBOX VISIBLE LENGTH 17 DEFAULT 'DEV'.
PARAMETERS: Emp_ID(13) TYPE c MODIF ID g1.
AT SELECTION-SCREEN OUTPUT.
NAME = 'DEPART'.
VALUE-KEY = 'DEV'.
VALUE-TEXT = 'DEVELOPMENT'.
APPEND VALUE TO LIST.
VALUE-KEY = 'MARK'.
VALUE-TEXT = 'MARKETING'.
APPEND VALUE TO LIST.
VALUE-KEY = 'CRM'.
VALUE-TEXT = 'CRM'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
loop at screen.
IF SCREEN-NAME = 'EMP_ID' AND screen-group1 = 'G1'.
SELECT * FROM ZACENTIQ_PAGE1 INTO wa33 UP TO 1 ROWS ORDER BY sno DESCENDING.
dep = wa33-sno.
ENDSELECT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = DEP
IMPORTING
OUTPUT = dep.
CONCATENATE id1 '/' depart '/' DEP into slno.
EMP_ID = slno.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
*----------------------------- At selection screen -------------------------------------
AT SELECTION-SCREEN.
INITIALIZATION.
START-OF-SELECTION. -
SQLJ-JPublisher - J2T-153, Invalid value for -context:while generating the
Hi All,
I am trying to generate the java code for the oracle types defined for one of the module in our project.for that i have defined a new context by extending the 'DefaultContext'
provided by SQLJ and as mentioned in the below URL.
http://docs.oracle.com/cd/A91202_01/901_doc/java.901/a90214/jpub.htm
Topic : JPublisher Generation of SQLJ Classes
MyContext:-
import java.sql.Connection;
import java.sql.SQLException;
import sqlj.runtime.ref.DefaultContext;
public class MyContext extends sqlj.runtime.ref.DefaultContext{
static {
DefaultContext defaultContext = null;
try {
defaultContext = new DefaultContext(<datasource>);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
DefaultContext.setDefaultContext(defaultContext);
public MyContext(Connection arg0) throws SQLException {
super(arg0);
public Connection getConnection(){
Connection con = null;
try {
con = <datasource>getConnection();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return con;
JPub command:
jpub -user=usr/pwd -context=com.test.context.MyContext -sql=<My Types Here> -compile=false
I am getting the below error while running the jpub command in dos prompt.
Error Log:
J2T-153, Invalid value for -context: com.test.context.MyContext. This must be set to generated or to DefaultContext.
Please let me know if anybody has come across this problem before.
Thanks,
Vijay
Edited by: 905698 on 03-Jan-2012 09:53Hi Vijay,
This post DOES NOT correspond to this forum.
The current forum is for BI Publisher. Your question is for JPublisher and believe it corresponds to PL/SQL forums.
Please close the thread
thanks
Jorge -
Make sure that your bean is implementing the serializable interface and that
you are accessing the bean from the session with the same name.
Bryan
"Sandeep Suri" <[email protected]> wrote in message
news:[email protected]..
Hi, I have quick question about use of USEBEAN tag in SP2. When I
specify a scope of SESSION for the java bean, it does not keep the
values that I set for variable in the bean persistent.Thanks,Sonny
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
Generate Sequential values for a column
Hi,
I had a column in named 'ID' in the block of my form. I want to generate sequential values for the column without using sequence. Suppose if the table does not have any data it has display the starting value what i am providing.(ex. 101).If the data is there in the table If i am executing the query in the last null record it has to show the maxvalue+1 for that column. where can I write the code to get this logic? How to write the code? Can any body please solve my problem?
Thanks in advance
user1Why don't you want to use a sequence? Do the ORDID values have to be sequential without any gaps in between?
If so, this requirement is quite hard to achieve in multi-user environment.
Some approaches:
Select the next available value from the database when creating a new record , e.g. in the WHEN-CREATE-RECORD-Trigger:
DECLARE
CURSOR crMax IS
SELECT NVL(MAX(ORDID), 0)+1
FROM ORD;
BEGIN
OPEN crMax;
FETCh crMax INTO :ORD.ORDID;
CLOSE crMax;
END;Pros: The user can see the new value when he starts entering the data.
Contras: When another user uses the same form to create a new record between the point of time user 1 starts entering the record and the point of time he saves, the same number will be taken again which will fail on insert for the second user (i assume there is a Unique Key on ORDID).
Result: This approach is not suitable in a multi-user environment.
Second approach:
Use the same logic as in approach 1, but select the next available number in the PRE-INSERT-trigger of the block:
Pros: The problem of approach 1 with two users getting the same number gets much more unlikely, for in general the COMMIT goes quite short after the PRE-INSERT has fired, so there will only be problems if both users save at the same moment.
Contras: Problem with duplicate numbers can still occur iunder special circumstances. The number is not shown until the Insert is issued against the database.
Result: This approach is possible, but you have to decide if the restrictions are bearable for your situation.
Further approaches:
Create a "Number table" either with just one record and one column which contains the next suitable number (lets say TAB_ORDID with column NEXT_ORDID) or with a number of records containing the next suitable numbers.
Then with the usage of SELECT FOR UPDATE you can lock a record, take the number from it and either update the row to the next value (one row apporach)or delete the row retrieved (multi row approach). Both cases require some more complex logic for retrieving the next number and can cause some trouble in multi-user-environments (ending up in all users who want to create records waiting for the one user who started and did not save correctly) if the locks are not handled correctly. -
Generate dbsequnce for a table using a bean
Is it possible to generate the next dbsequence for a table using bean?
ThanksIf you are only interested in the number in the bean, you should implement a service method in out application module, expose it to the client interface and call this via the binding layer.
public oracle.jbo.domain.Number getSequenceNumber() {
try {
String seq = "YOUR_DB_SEQUENCE_SEQ";
oracle.jbo.server.SequenceImpl empSeq =
new oracle.jbo.server.SequenceImpl(seq, getDBTransaction());
oracle.jbo.domain.Number zSerienNrSeq = empSeq.getSequenceNumber();
return zSerienNrSeq ;
catch (Exception e) {
e.printStackTrace();
return null;
}Timo -
Cannot generate XML for the List of Values (UX 00072)
Hi,
I had issues with a .LOV file associated with an object.
Cannot generate XML for the List of Values (UX 00072)
[LOV Name] This LOV contains data that does not originate from Corporate Data.
The object maps to data in a table of the DB that will be populated in the future. The LOV file is "empty", but I have to pass the universe into production waiting for the data.
This error doesn't permit me to go from Development to Prod.
Regards,
RiccardoYou need to set the display-property="<<Your name property>>" in item-descriptor tag.
e.g. <item-descriptor name="myItem" display-property="name" />
Cheers
R -
Generating MD5 hash value for any specific flat file
Hi experts,
I am developing a program that will generate flat files and also I should generate the MD5 Hash value for each and every flat files. My question is how can I generate the MD5 hash value for the generated .txt files.
Thanks in advance
ShabirYou can use functions
MD5_CALCULATE_HASH_FOR_CHAR for text file
MD5_CALCULATE_HASH_FOR_RAW for binary -
Generating check value for put key
hi
in globalPlatform doesn't exist anything about check value for put key command.
how can i generate it and change initial key for my java card?s.fallahdoost wrote:hello
in other topic, i saw that you used these commands
for put-key:
cm> set-key 2/1/DES-ECB/ffeeddccbbaa99887766554433221100 2/2/DES-ECB/ffeeddccbbaa99887766554433221100 2/3/DES-ECB/ffeeddccbbaa99887766554433221100
cm> put-keyset 2
*=> 84 D8 00 81 4B 02 80 10 AE 25 9D AE 8A 7F 23 37 ....K....%....#7*
*7F CF AD 42 5C B8 C3 EC 03 F3 9C 09 80 10 AE 25 ...B\..........%*
*9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC 03 F3 ....#7...B\.....*
*9C 09 80 10 AE 25 9D AE 8A 7F 23 37 7F CF AD 42 .....%....#7...B*
*5C B8 C3 EC 03 F3 9C 09 69 54 47 5D 25 8A AA 36 \.......iTG]%..6*
*00 .*
*(259100 usec)*
*<= 02 F3 9C 09 F3 9C 09 F3 9C 09 90 00 ............*
Status: No Error
i know that AE 25 9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC
is your new key and F3 9C 09 is the first 3 bytes of tripleDES with key
ffeeddccbbaa99887766554433221100.
i have a question:
what is ffeeddccbbaa99887766554433221100?!!
how can i calculate it?ffee..00 is the plain text key. Sensitive data encryption is required for the 3 CM keys in the PUT KEY command. I first set off-card the keys I want to be included in the PUT KEY command, and JCOP Tools encrypts it with the DEK key of the current secure channel session. On-card the first the C_MAC is validated, then the keys are decrypted and compared to the key check value. -
How to get the selected value in SelectOneMenu in backing bean
Hello all,
I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
Could you help me out?
Thank you very much in advance,
LngoHi Lingo,
There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
Here is the sample code
<h:selectOneMenu id="catalogue"
binding="#{urbean.catalogue}" onchange="submit()"
valueChangeListener="#{urbean.categoryValueChange}"
<f:selectItem itemLabel="Select Catalogue" itemValue="" />
<f:selectItems value="#{urbean.catalogueList}" />
</h:selectOneMenu>
<h:selectOneMenu id="category"
binding="#{urbean.category}"> <f:selectItem itemLabel="Select Category" itemValue="" />
<f:selectItems value="#{urbean.categoryList}" />
< </h:selectOneMenu>
now in method called by valuechangelistener we need to write the similar code
public void categoryValueChange(ValueChangeEvent event) {
String rfnum = (String) event.getNewValue();
List categoryList = new ArrayList();
List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
for (int i = 0; i < tempList.size(); i++) {
Tablename tablename = (Tablename ) tempList.get(i);
String value = "" + tablename .getrfnum();
String label = tablename .getname();
if (label == null) {
label = "";
SelectItem item = new SelectItem(value, label);
categoryList.add(item);
bean.setCategoryList(categoryList);
///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
Thanks & Regards
Manidhar -
Problem while setting the selected value of h:selectOneMenu to bean
Hi all,
I am new to JSF. I am working on application where i have combo boxe on the page. I am setting some values to the combobox from database using <f:selectItems> tag and one value using <f:selectItem> tag. The value combobox value selected by user is set to the bean property which is String. I am able to display all the values in the combobox but when clicked on button (present at the end of form) i am getting following error-
ERROR HtmlRendererUtils:354 - Error finding Converter for
component with id interviewStageOneForm:acceptanceChannelList
I am setting the combobox selected value to the to the bean property which is String and the value selected in also String. Then which converter it is asking for. I am not able to find out what is the problem.
Your suggestions will be really appreciated.
Here is my code snippet:-
JSF:-
<h:selectOneMenu id="acceptanceChannelList"
value="#{interviewStageOneBean.index}">
<f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
<f:selectItems value="#{MasterDataBean.acceptanceChannelList}" /> <!-- The list coming from database-->
</h:selectOneMenu>Bean:-
public class InterviewStageOneBean {
private String index;
public String getIndex() {
return index;
public void setIndex(String index) {
this.index = index;
}Hi!
First I would try next:
Try to leave out
<f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
line. And check if it works after that. If it didn't repeat step but you leave in message selectItem and dump out database selectItem line.
Second:
I would check acceptanceChannelList creation and what type of objects you put while doing setValue and setLabel on UISelectItem
Probably selectItem value has been assigned an object of type the engine doesn't know how to convert from String to it. -
jsp:useBean error== The value for useBean class is invalid
Can anybody tell me why am i getting the error for the JavaBean.
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /SimpleBean.jsp(9,0) The value for the useBean class attribute com.stardeveloper.bean.test.SimpleBean is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1272)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Generator.generate(Generator.java:3426)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Apache Tomcat/6.0.20
my jsp file is in path c:\tomcat6\webapps\dev\SimpleBean.jsp
my JavaBean compiled class is in path
c:\tomcat6\webapps\dev\WEB-INF\classes\com\stardeveloper\bean\test\SimpleBean.class
and my SimpleBean java class declaration is
package com.stardeveloper.bean.test;
public class SimpleBean implements java.io.Serializable
and my jsp page SimpleBean.jsp pages call to useBean is as follows
<jsp:useBean id="simple" class="com.stardeveloper.bean.test.SimpleBean">
<jsp:setProperty name="simple" property="name" value="Sujoy" />
<jsp:setProperty name="simple" property="age" value="26" />
</jsp:useBean>
Please help me anybody.First, try restarting Tomcat :-)
Main 3 reasons for "useBean class is invalid"
- class must be in a package (ok)
- class must be public, and have public constructor that takes no arguments (check)
- class must be compiled, valid and on the classpath. Normally this means the WEB-INF/classes directory.
From what you have told us, everything seems to check out.
Try recompiling the .class file to ensure it is valid.
Does your constructor do anything which might thrown an exception?
Can you invoke it in scriptlet code without getting an exception?
<%@ page import="com.stardeveloper.bean.test.SimpleBean" %>
<% SimpleBean sb = new SimpleBean() %>Trying it in scriptlet code like this might give you a different error message that might help your diagnosis.
cheers,
evnafets -
Getting problem to generate loop for column of dataTable
Hi everyone, I am trying to generate loop for column of my <h:dataTable rows="1" width="1500" value="#{HeadWiseCrimeMngBean.distName}" styleClass="font-right" var="drow" border="1" >
<c:forEach begin="0" end="#{HeadWiseCrimeMngBean.vectSize}" items="#{HeadWiseCrimeMngBean.counter}" var="index">
<h:column>
<h:panelGrid border="0" cellpadding="0" cellspacing="0" width="100" columns="1" >
<h:outputText value="#{drow[index]}"/>
</h:panelGrid>
</h:column>
</c:forEach>
</h:dataTable>
but I am getting java.lang.NumberFormatException: exception
my bean file is
* HeadWiseCrimeMngBean.java
* Created on August 27, 2007, 3:10 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package gov.nic.cipa.cipaweb.dto;
import gov.nic.cipa.cipaweb.bo.HeadWiseCrimeReportBO;
import gov.nic.cipa.cipaweb.bo.Utility;
import java.sql.Date;
import java.util.Vector;
* @author cipa
public class HeadWiseCrimeMngBean {
/** Creates a new instance of HeadWiseCrimeMngBean */
public HeadWiseCrimeMngBean() {
private Date startDate = Utility.getDatabaseDate(Utility.getDateFromDateString("01-07-2007"));
private Date endDate = Utility.getDatabaseDate(Utility.getDateFromDateString("10-07-2007"));
private String statCode = "08";
private String recp = "ps";
private String distCode="173";
private String type="w";
private Vector vec = new Vector();
public Date getStartDate() {
return startDate;
public void setStartDate(Date startDate) {
this.startDate = startDate;
public String getStateCode() {
return statCode;
public void setStateCode(String statCode) {
this.statCode = statCode;
public String getRecp() {
return recp;
public void setRecp(String recp) {
this.recp = recp;
public Date getEndDate() {
return endDate;
public void setEndDate(Date endDate) {
this.endDate = endDate;
public String getDistCode() {
return distCode;
public void setDistCode(String distCode) {
this.distCode = distCode;
public String getType() {
return type;
public void setType(String type) {
this.type = type;
public int getVectSize() {
Vector ver=null;
int size=0;
HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
if(recp.equals("dist"))
try {
ver=hcrbo.districtVect(getStateCode());
} catch (Exception ex) {
ex.printStackTrace();
}else if(recp.equals("ps"))
try {
ver=hcrbo.psVect(getDistCode());
} catch (Exception ex) {
ex.printStackTrace();
size=ver.size();
return size;
public int getCurrentYear()
int year=0;
HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
try {
year=hcrbo.getCurrentYear(getStartDate());
} catch (Exception ex) {
ex.printStackTrace();
return year;
public int getPreviousYear()
int year=0;
HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
try {
year=hcrbo.getPreviousYear(getStartDate());
} catch (Exception ex) {
ex.printStackTrace();
return year;
public Vector getDistName() throws Exception
Vector distName=null;
HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
try {
distName=hcrbo.districtVect(getStateCode());
} catch (Exception ex) {
ex.printStackTrace();
return distName;
public int getCounter() throws Exception
int c=0;
return c++;
public Vector getDetails() throws Exception{
HeadWiseCrimeReportBO bo = new HeadWiseCrimeReportBO();
vec = bo.reterive(getStartDate(),getEndDate(),getStateCode(),getDistCode(),getType(),getRecp()) ;
return vec;
public static void main(String ar[])
Vector v=new Vector();
int p;
HeadWiseCrimeMngBean a=new HeadWiseCrimeMngBean();
try{
p=a.getVectSize();
System.out.println(p);
}catch(Exception e)
{e.printStackTrace();}
can anyone please tell me what is wrong here.............
Message was edited by:
mayank_mcaI've been able to create all of these except the profile. It works for non DEFAULT named profiles. For instance we have a profile named DBA_PROF that I can create the DDL for.
-
I am new to JSF ( done a lot of struts/JSTL though )
I am trying to get a dataTable displayed with onChange event from a dropdown menu.I have been succesful with a submit button but I guess things are different in the JSF world when it comes to JS events like onChange .Do I need "listeners" for this.Could I get an example...Not sure but I think it's something like:
JSP:
<h:selectOneRadio value="#{mgdBean2.currentSearchType}"
immediate="true" onclick="this.form.submit()"
valueChangeListener="#{mgdBean2.changeSearchType}">
<f:selectItems value="#{mgdBean2.allSearchTypes}"/>
</h:selectOneRadio>
Bean:
public void changeSearchType(ValueChangeEvent evt)
String newSearchTypeValue = evt.getNewValue().toString();
if (newSearchTypeValue.equals(KEYWORD_VAL))
setKeywordSearch(true);
else if (newSearchTypeValue.equals(AUTHOR_VAL))
setAuthorSearch(true);
FacesContext.getCurrentInstance().renderResponse();
Hope it's of some use, it's straight out of some training material we have lying around!
Maybe you are looking for
-
Why isnt the iphone showing up as a device in itunes?
Why isnt "devices" showing up in I tunes? Just got this iphone 4,didnt have this prob with the 3! Help me out here, someone-PLEASE Trying to put what was backed up on to this phone.
-
New properties not reflecting in ACC
Hi, I am new to ATG.I was trying to add some properties in ACC. So, that i have added the item-descriptor in userprofiling.xml and created the related tables in oracle database.I have created 5 tables.Among them one was previously present in the data
-
Hi, I have problem with my N81 phone memory (25Mb) .... with very fewer applications are installed it shows only 5 mb free. How to keep it more free ? How to erase the unwanted / temp files ? Pleas advise Br Bala
-
Photoshop Camera Raw 7.4 update is not installing because of error code U43M1D207. What needs to be done to resolve this issue?
-
(SOLVED)autostart.sh sleep issue
Hello all, I have my laptop in a state I am pretty happy with. When I boot I backgrounded all my daemons so I would get a fast boot (about 12 seconds). When conky starts I have it getting my external ip as well as my wireless ip. To try and solve the