Edit_Attachment method of CL_GOS_DOCUMENT_SERVICE
Hi ABAPers,
I have used the method create_attachment of the class CL_GOS_DOCUMENT_SERVICE and i am able to attach the file.
but i have a need to edit the attached file.
Anybody can please tell me that how i may use the edit_attachment of the same class? It would be good for editing the filename?
Please also tell me what i have to pass in the parameters of the method edit_attachment for ip_attachment.
Thanks
Dhananjay
Am i Asking the wrong question or am i at wrong place for this type of questions??
Please help me Gurus, I am new to this SAP and fresher also.
Regards
Dhananjay
Similar Messages
-
GOS: How to display attachment?
Hello,
I want to display the first attachment. I found the function GOS_ATTACHMENT_LIST_POPUP, but I haven't found a possibility to display an attachment directly. Does anybody know how to do this?
Please help.
Have a nice day. Bye.
FrankThis may not be the purist way of doing it, but hopefully it may help you along the way.
Jonathan
report zlocal_jc_sdn_gos_test.
tables:
srgbtbrel. "Relationships in GOS Environment
parameters:
*"Defaults here are an FI doc with GOS Note visible in FB03
p_objkey like borident-objkey
default '100000120618312008',
p_objtyp like borident-objtype
default 'BKPF'.
start-of-selection.
perform display_attachment.
*& Form display_attachment
form display_attachment.
data:
l_objkey type swo_typeid,
lo_gos_service type ref to cl_gos_document_service,
ls_srgbtbrel type srgbtbrel,
lt_srgbtbrel type srgbtbrel occurs 10.
*" Get a list of the links and choose one:
select *
into corresponding fields of table lt_srgbtbrel
from srgbtbrel
where instid_a = p_objkey
and typeid_a = p_objtyp
and reltype = 'NOTE'.
*" Exit if no attachments found
if lines( lt_srgbtbrel ) is initial.
exit.
endif.
*" Choose first one and set up the ident for the BOR
sort lt_srgbtbrel by utctime. "put oldest top for this demo
read table lt_srgbtbrel into ls_srgbtbrel index 1.
l_objkey = ls_srgbtbrel-instid_b. "i.e. the Note's ID
create object lo_gos_service.
call method lo_gos_service->display_note
exporting
ip_note = l_objkey
ip_disp_html = 'X'.
*"Methods in cl_gos_document_service include:
*" DISPLAY_ATTACHMENT
*" DISPLAY_NOTE
*" DISPLAY_PERSONAL_NOTE
*" DISPLAY_URL
endform. "display_attachment -
CL_GOS_DOCUMENT_SERVICE / DELETE_ATTACHMENT
Hi,
I have requirement to delete an attachment attach to a sales document.
For this i am using the following class CL_GOS_DOCUMENT_SERVICE and method DELETE_ATTACHMENT.
My issue is in method DELETE_ATTACHMENT the parameter IP_ATTACHMENT is mandatory . I don't know how to arrive the value of IP_ATTACHMENT.
Here i have value for OBJKEY = (sales document numner) and OBJTYPE.= (YSALESATTA).
I like to know to how to arrive value IP_ATTACHMENT ( This is value for folder information).
Thanks
aRstry this FM
BDS_BUSINESSDOCUMENT_DELETE
where you need to pass logical system, calssname, classtype (BO),client and ojbect key (which is sales docu number)
Raja -
Error while calling a method on Bean (EJB 3.0)
I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
Error is -->
Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
Stack Trace:
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:75)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
at $Proxy34.close(Unknown Source)
at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
at $Proxy84.addDepartment(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
End of Stack Trace
|#]
RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
javax.transaction.SystemException
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
at $Proxy84.addDepartment(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)Means theres an error in XML/ABAP conversion probably due a syntax error...
Regards
Juan -
I would love some help with this issue. I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0 I have a test account set up with lab.acme.com to use the ACS.
When I log into my site using Windows Auth, everything is great. However when I log in and select my ACS token issuer, I get sent, to the logon page of the ADFS, after selected the ADFS method. My browser prompt me which Certificate identity I want
to use to log in and after 3-5 second
and return me the logon page with error message “Authentication failed”
I base my setup on the technet article
http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
I validated than all my certificate are valid and able to retrieve the crl
I got in eventlog id 300
The Federation Service failed to issue a token as a result of an error during processing of the WS-Trust request.
Request type: http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
Additional Data
Exception details:
Microsoft.IdentityModel.SecurityTokenService.FailedAuthenticationException: MSIS3019: Authentication failed. ---> System.IdentityModel.Tokens.SecurityTokenValidationException:
ID4070: The X.509 certificate 'CN=Me, OU=People, O=Acme., C=COM' chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed
correctly, but one of the CA certificates is not trusted by the policy provider.
at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
--- End of inner exception stack trace ---
at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.BeginGetScope(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.BeginIssue(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.DispatchRequestAsyncResult..ctor(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginDispatchRequest(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult..ctor(WSTrustServiceContract contract, DispatchContext dispatchContext, MessageVersion messageVersion, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext
serializationContext, AsyncCallback asyncCallback, Object asyncState)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String
trustNamespace, AsyncCallback callback, Object state)
System.IdentityModel.Tokens.SecurityTokenValidationException: ID4070: The X.509 certificate 'CN=Me, OU=People, O=acme., C=com' chain building
failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
thx
Stef71This is perfectly correct on my case I was not adding the root properly you must add the CA and the ADFS as well, which is twice you can see below my results.
on my case was :
PS C:\Users\administrator.domain> $root = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
cer\SP2K10\ad0001.cer")
PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "domain.ad0001" -Certificate $root
Certificate : [Subject]
CN=domain.AD0001CA, DC=domain, DC=com
[Issuer]
CN=domain.AD0001CA, DC=portal, DC=com
[Serial Number]
blablabla
[Not Before]
22/07/2014 11:32:05
[Not After]
22/07/2024 11:42:00
[Thumbprint]
blablabla
Name : domain.ad0001
TypeName : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
DisplayName : domain.ad0001
Id : blablabla
Status : Online
Parent : SPTrustedRootAuthorityManager
Version : 17164
Properties : {}
Farm : SPFarm Name=SharePoint_Config
UpgradedPersistedProperties : {}
PS C:\Users\administrator.domain> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
cer\SP2K10\ADFS_Signing.cer")
PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "Token Signing Cert" -Certificate $cert
Certificate : [Subject]
CN=ADFS Signing - adfs.domain
[Issuer]
CN=ADFS Signing - adfs.domain
[Serial Number]
blablabla
[Not Before]
23/07/2014 07:14:03
[Not After]
23/07/2015 07:14:03
[Thumbprint]
blablabla
Name : Token Signing Cert
TypeName : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
DisplayName : Token Signing Cert
Id : blablabla
Status : Online
Parent : SPTrustedRootAuthorityManager
Version : 17184
Properties : {}
Farm : SPFarm Name=SharePoint_Config
UpgradedPersistedProperties : {}
PS C:\Users\administrator.PORTAL> -
Using G_SET_GET_ALL_VALUES Method
Hi,
I need to use the following method. G_SET_GET_ALL_VALUES. But I'm not sure of the data type that it returns.
CALL FUNCTION 'G_SET_GET_ALL_VALUES'
EXPORTING
CLIENT = ' '
FORMULA_RETRIEVAL = ' '
LEVEL = 0
setnr = wa_itab_progrp-setname
VARIABLES_REPLACEMENT = ' '
TABLE = ' '
CLASS = ' '
NO_DESCRIPTIONS = 'X'
NO_RW_INFO = 'X'
DATE_FROM =
DATE_TO =
FIELDNAME = ' '
tables
set_values = ????????
EXCEPTIONS
SET_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Can anyone please let me know what I should do at the SET_VALUES section.
Thanks
LilanHi,
See the FM Documentation,
This function module determines all the values of a set or its subordinate sets. The required call parameter is the set ID (SETNR). The other parameters are optional:
FORMULA_RETRIEVAL: 'X' => The formulas in the set are also returned (default ' ' requires fewer database accesses)
LEVEL: The default value is 0 and means "expand all levels". Values other than 0 determine the level to which they are to be expanded
VARIABLES_REPLACEMENT: 'X' => The value variables in the set hierarchy are replaced by their default values (this means additional database accesses for each variable)
NO_DESCRIPTIONS: 'X' => The short descriptions of the sets and set lines are not read from the database. For performance reasons you should only set this parameter to ' ' if you need the texts
The values determined are returned to the internal table SET_VALUES.
Thanks. -
Clearing values from request in decode method
I am using a custom table paginator. In its decode method I have the next code to control whether next link is clicked:
String pLink = (String)requestMap.get("pLink" + clientId);
if ((pLink != null) && (!pLink.equals(""))) {
if (pLink.equals("next")) {
} else if (pLink.equals("previous")) {
}But the next sequence produces some problems:
1. Initial page load.
2. Click on next link.
3. Table navigates ok to next page.
4. Reload page (push F5).
5. The previous click still remains in the request, so decode method think next link is pressed again.
6. Application abnormal behaviour arises.
So, I am trying to clear the next_link key from the request, but next code throws an UnsupportedOperationException:
String pLink = (String)requestMap.get("pLink" + clientId);
if ((pLink != null) && (!pLink.equals(""))) {
if (pLink.equals("next")) {
} else if (pLink.equals("previous")) {
requestMap.put("pLink" + clientId, "");
}Do any of you have some ideas?Hey, where are you RaymondDeCampo, rLubke, BalusC ... the masters of JSF Universe?
;-) -
Hi,
Is there a method that get the all the values of a row? I've gone through the java api but didn't found one, but wanted to be sure.
If not I'll have to do getValueAt for every column?
GrtzHere is one possible implementation using RowTableModel (a self made class).
To access a row, we can use this: Product product = (Product) model.getRow(rowIndex);
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
public class Tabel extends JPanel {
private JTable table;
private JTextField filterText;
private TableRowSorter<MyTableModel> sorter;
private String output;
private final MyTableModel model;
public Tabel() {
//Create a table with a sorter.
model = new MyTableModel();
sorter = new TableRowSorter<MyTableModel>(model);
table = new JTable(model);
table.setRowSorter(sorter);
table.setPreferredScrollableViewportSize(new Dimension(500, 200));
table.setFillsViewportHeight(true);
//Single selection
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//Making sure columns can't be dragged and dropped
table.getTableHeader().setReorderingAllowed(false);
//Double click event
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent mouseEvent) {
if (mouseEvent.getClickCount() == 2) {
System.out.print(output);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
JPanel form = new JPanel();
JLabel l1 = new JLabel("Filter Text:");
form.add(l1);
filterText = new JTextField(15);
//Whenever filterText changes, invoke newFilter.
filterText.getDocument().addDocumentListener(
new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
newFilter();
public void insertUpdate(DocumentEvent e) {
newFilter();
public void removeUpdate(DocumentEvent e) {
newFilter();
l1.setLabelFor(filterText);
form.add(filterText);
add(form);
* Update the row filter regular expression from the expression in
* the text box.
private void newFilter() {
RowFilter<MyTableModel, Object> rf = null;
//If current expression doesn't parse, don't update.
try {
rf = RowFilter.regexFilter("(?i)" + filterText.getText(), 0); //"(?i)" => Zoeken gebeurd case-insensitive
} catch (java.util.regex.PatternSyntaxException e) {
return;
sorter.setRowFilter(rf);
class MyTableModel extends RowTableModel {
private final List<Product> mData;
private final List<String> cNames;
public MyTableModel() {
super(Product.class);
mData = new ArrayList<Product>();
mData.add(new Product("Frontline Small", 5, 1));
mData.add(new Product("Frontline Medium", 10, 2));
mData.add(new Product("Frontline Large", 15, 1));
mData.add(new Product("Frontline Extra Large", 20, 2));
mData.add(new Product("Frontline spuitbus", 7.5, 3));
cNames = new ArrayList<String>();
cNames.add("Product");
cNames.add("Prijs");
cNames.add("Aantal stuks beschikbaar");
setDataAndColumnNames(mData, cNames);
setColumnClass(0, String.class);
setColumnClass(1, Double.class);
setColumnClass(2, Integer.class);
public Object getValueAt(final int rowIndex, final int columnIndex) {
switch (columnIndex) {
case 0:
return mData.get(rowIndex).getDescriction();
case 1:
return mData.get(rowIndex).getPrice();
case 2:
return mData.get(rowIndex).getNumber();
return null;
@Override
public Class getColumnClass(int column) {
return super.getColumnClass(column);
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
Tabel newContentPane = new Tabel();
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(final String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
class Product {
private String descriction;
private double price;
private int number;
Product(final String descriction, final double price, final int number) {
this.descriction = descriction;
this.price = price;
this.number = number;
public String getDescriction() {
return descriction;
public void setDescriction(final String descriction) {
this.descriction = descriction;
public int getNumber() {
return number;
public void setNumber(final int number) {
this.number = number;
public double getPrice() {
return price;
public void setPrice(final int price) {
this.price = price;
@Override
public String toString() {
return descriction + ", " + price + ", " + number;
} -
How can I move an ArrayList from one method to another?
As the subject reveals, I want to know how I move an ArrayList. In one method, I fill my ArrayList with objects, and in the next I want to pick an arbitrary object out of the ArrayList.
How do I make this work??You pass the same array list to both the method. Both method are getting the same thing.
void main(){
//create array list here
ArrayList aList = new ArrayList();
//pass it to a method to fill items
fillArrayList(aList);
//pass the same arraylist to another method
printArrayList(aList);
void fillArrayList(ArrayList list){
list.add("A");
void printArrayList(ArrayList list){
//The array list will contain A added by the previos method
System.out.println(list);
FeedFeeds : http://www.feedfeeds.com -
HT1918 Can I have multiple payment methods on one account
Currently, both of my teenage sons and I are sharing an Apple account with one payment method. I would like to have a payment method for each of us.
If they are teenagers, it is not too soon to set up individual accounts per person.
This will address the separate payments issue, and will make it much easier in a few years when they start heading off to university or moving to their own living arrangements. -
A method to convert an existing iCloud account to a Child iCloud Account for Family Sharing
I do not see any method by which to convert an existing iCloud account (we have three set up for our kids, all their birthdays are set later than their actual birthdays so we could grab their actual names before they were all gone years ago) to a new Child iCloud Account for use with Family Sharing (namely to be able to take advantage of the new features: Family Calendar, Photostream, 'Ask to Buy' on the Stores, etc. on their own iPad minis.
If this is just not possible under the current scheme, please oh please Apple make this an option - there are probably thousands of others in this same boat, and I refuse to give up my kids' iCloud accounts!I've read every string and workaround solution on these forums (to date). There's really no good options here.
USER STORY: My kid (age 7) has an iPad 2. I created an email address for him (which he doesn't know about). I created an apple ID for him (which he also doesn't know or care about) and I set up his Apple ID with my credit card. In addition I've set up parental controls on the iPad to lock it down and make it more age appropriate. Over the past year or so it's worked out fine, he sees something he might like, brings the iPad to me and if I approve, I enter the Apple ID Password and approve the purchase. After a year of doing this, he has a nice little collection of apps, kid songs, a few movies, etc. I would like to move my kid over to a legitimate kid account now that Apple has released features that support this. Currently the ability to convert an account does not exist. Seems like it should be easy to change a birthday, etc.
Almost seems like Apple is penalizing us for getting our kid an iPad last year.
Apple - Please consider my user story for your upcoming feature enhancements. -
How can i execute ejb method in a servlet?
hi
I am using a IBM HTTP Server and Weblogic Server.
I could execute below source in a main method of application but i could not that in a init method of servlet because of ClassCastException.
(a classpath of weblogic contains client's classpath)
// source code
Hashtable props = new Hashtable();
props.pu(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
props.put(Context.PROVIDER_URL,
"t3://192.168.1.5:7001");
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("session.LigerSessionHome");
LigerSessionHome home = (LigerSessionHome) PortableRemoteObject.narrow (obj, LigerSessionHome.class);
// error code
Exception : session.LigerSessionBeanHomeImpl_ServiceStub
java.lang.ClassCastException: session.LigerSessionBeanHomeImpl_ServiceStub
at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:253)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136)
at credit.getCreditResearch(credit.java:41)
at creditResearchClient.doGet(creditResearchClient.java:122)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
thanksHave your stubs somehow got out of sync? So that your Servlet engine is pointing to a different jar than that of your jvm on which you were running your client application
hi
I am using a IBM HTTP Server and Weblogic Server.
I could execute below source in a main method of
application but i could not that in a init method of
servlet because of ClassCastException.
(a classpath of weblogic contains client's classpath)
// source code
Hashtable props = new Hashtable();
props.pu(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
props.put(Context.PROVIDER_URL,
"t3://192.168.1.5:7001");
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("session.LigerSessionHome");
LigerSessionHome home = (LigerSessionHome)
PortableRemoteObject.narrow (obj,
LigerSessionHome.class);
// error code
Exception :
session.LigerSessionBeanHomeImpl_ServiceStub
java.lang.ClassCastException:
session.LigerSessionBeanHomeImpl_ServiceStub
at
com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(Porta
leRemoteObject.java:253)
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObj
ct.java:136)
at credit.getCreditResearch(credit.java:41)
at
creditResearchClient.doGet(creditResearchClient.java:12
at
javax.servlet.http.HttpServlet.service(HttpServlet.java
740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java
865)
thanks -
Can I use classes and methods for a maintenance view events?
Hello experts,
Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!Hi viraylab,
1. The architecture provided by maintenance view
for using EVENTS and our own code inside it -
It is provided using FORM/PERFORM
concept only.
2. At this stage,we cannot use classes.
3. However, inside the FORM routine,
we can write what ever we want.
We can aswell use any abap code, including
classes and methods.
(But this classes and methods won't have any
effect on the EVENT provided by maintenance view)
regards,
amit m. -
How to call a specific method in a servlet from another servlet
Hi peeps, this post is kinda linked to my other thread but more direct !!
I need to call a method from another servlet and retrieve info/objects from that method and manipulate them in the originating servlet .... how can I do it ?
Assume the originating servlet is called Control and the servlet/method I want to access is DAO/login.
I can create an object of the DAO class, say newDAO, and access the login method by newDAO.login(username, password). Then how do I get the returned info from the DAO ??
Can I use the RequestDispatcher to INCLUDE the call to the DAO class method "login" ???
Cheers
KevinThanks for the reply.
So if I have a method in my DAO class called login() and I want to call it from my control servlet, what would the syntax be ?
getrequestdispatcher.include(newDAO.login())
where newDAO is an instance of the class DAO, would that be correct ?? I'd simply pass the request object as a parameter in the login method and to retrieve the results of login() the requestdispatcher.include method will return whatever I set as an attribute to the request object, do I have that right ?!!!!
Kevin -
How to select a specific column in a bean method?
Hey everyone,
I'm trying to select a specific column in my adf table so i can hightlight the ones i can after, with a method bean that does a match from another table. I'm using JDeveloper 12.1.2.0.0.
Here's my table at the moment (its a static list that Timo and Alejandro helped me create, thanks to them again!):
<af:table value="#{bindings.Anos1.collectionModel}" var="row"
rows="#{bindings.Anos1.rangeSize}"
emptyText="#{bindings.Anos1.viewable ? 'No data to display.' : 'Access Denied.'}"
rowBandingInterval="0" fetchSize="#{bindings.Anos1.rangeSize}"
filterModel="#{bindings.Anos1Query.queryDescriptor}"
queryListener="#{bindings.Anos1Query.processQuery}"
filterVisible="false" varStatus="vs" id="t5"
styleClass="AFStretchWidth" columnSelection="multiple"
inlineStyle="max-width:100%;" columnStretching="multiple"
columnSelectionListener="#{ControlBean.onAnoColumnSelect}"
disableColumnReordering="true"
binding="#{ControlBean.dimAnos}">
<af:column sortProperty="#{bindings.Anos1.hints.A2011.name}"
filterable="true" sortable="false"
headerText="2011"
id="c54" width="16%">
<af:outputText value="#{row.A2011}"
shortDesc="#{bindings.Anos1.hints.A2011.tooltip}"
id="ot54">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Anos1.hints.A2011.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="#{bindings.Anos1.hints.A2012.name}"
filterable="true" sortable="false"
headerText="2012"
id="c55" width="16%">
<af:outputText value="#{row.A2012}"
shortDesc="#{bindings.Anos1.hints.A2012.tooltip}"
id="ot55">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Anos1.hints.A2012.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="#{bindings.Anos1.hints.A2013.name}"
filterable="true" sortable="false"
headerText="2013"
id="c56" width="16%">
<af:outputText value="#{row.A2013}"
shortDesc="#{bindings.Anos1.hints.A2013.tooltip}"
id="ot56">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Anos1.hints.A2013.format}"/>
</af:outputText>
</af:column>
</af:table>
I've deleted some of the columns because they are all equal and by doing so, you have less problems in reading it.
In my method i have a matchEm but i'm trying to select a column by using this line:
dimAnos.setColumnSelection("A2012");
dimAnos is the binding for my table Anos (Years in Portuguese). I even tried another values fro the columnSelection but i couldn't make it selected. Am i doing anything wrong?
Please help me or give me an idea of how can i do this.
Regards,
Frederico.Hi Frederico,
The method setColumnSelection is meant to set whether your table supports column selection or not. It doesn't select the column. In order to select the column, you need to set the column attribute Selected to true. So I don't know if its an option for you but you can create a binding to all the columns you have in you bean, and then call the method A2012.setSelected(true), and then add a partial target to the table to re render it and show the selected column.
Hope this helps
Maybe you are looking for
-
I keep getting "script" errors and my computer locking up while using Mozilla Firefox on some of my websites. I don't have this problem while using Internet Explorer. Why has this just started and how can I resolve this? I like Firefox, but will have
-
Max. amount of nodes in feature SCHKZ in ERP2004/2005
Hello, I'm utilizing feature SCHKZ for IT0007. The structure is like field WERKS (10001, 10002, 1003, etc.) --> PERSK (if 10 then NORM or else then STAN) So there are two levels and no includes, just "simple" fields and return values. My concer
-
Failover from MPLS network to EIGRP network, need help.
I hope I explain this right. We are about to add an MPLS Circuit between HA and SA sites. Currently We have HA Connecting to AV site via ATM and SA connecting to AV site via Frame-relay. All routes are via EIGRP. From what we gather from MPLS you nee
-
I own multiple systems. I have hardened one browser following the guideline provided by CISecurity. Instead of repeating all the configurations performed on that one system, can I just copy all the ".js" files from the secured system to my other syst
-
Ok, heres a quick run through of the issue i've been having. When I want the captivate file to link to a pdf file I use the link to file option on a click button and pop in the URL of the PDF document. Only problem is when the user clicks on the butt