Quantcast
Channel: SmartClient Forums
Viewing all 4756 articles
Browse latest View live

Possible bug: Oracle contraint violation does not cause failure in DSResponse

$
0
0
We experience an issue when saving a Form into Oracle database via JPA2DataSource and some database constraint is violated
(see stack trace below, we deliberately disabled required setting for the field to reproduce the issue). In this case a
transaction is rolled back, but we get no appropriate status code or errors in the DSResponse object on the client.

We have debugged the code a bit (we created a wrapper around the JPA2DataSource and used a decompiler) and it seems that there is a bug in the RPCManager.completeResponse() and RPCManager.onFailure(DataSource).

- the RPCManager.onSuccess() is called, which in turn goes through all data sources and calls onSuccess(RPCManager) method, this calls EMF.commitTransaction method in turn

- when an exception happens during the commit, the JPADataSource.onSuccess(boolean) method is called.

- if there is an exception in that method (thrown in EMF.commitTransaction) the corresponding data source is added to the list of partially committed data sources and onFailure(DataSource) method is called, which in turn calls JPADataSource.onFailure(RPCManager, boolean) method (this calls EMF.rollbackTransaction in turn).

- the RPCManager.onSuccess method throws PartialCommitException, which in turn sets a boolean flag partialCommit = true.

- and that's it (at least what I see in the decompiled code) - the flag is not used in your code anywhere, the corresponding DSResponse.status = 0, the DSResponse.errors remains null.

We have no possibility to react on this error on the client side.

So the question is whether this is bug in SmartGWT or we have missed something in the documentation.

--------------------------------------------------------------------------------------


Additional information about the issue:

1. SmartGWT: SmartClient Version: v9.0p_2013-10-30/Pro Deployment (built 2013-10-30)

2. Firefox, but it does not matter

3. Two classes BgxIDACall and BgxJPADataSource are simple classes that extend corresponding Isomorphic classes and delegate all calls to the overridden methods (convenience to put breakpoints on the methods of classes that do not have source code).

4. Server exception (and some logs)

Code:

[EL Fine]: sql: 2014-01-05 12:17:28.097--ServerSession(1724897630)--Connection(357727017)--Thread(Thread[btpool0-4,5,main])--SELECT PROCESS_SEQ.NEXTVAL FROM DUAL
[2014-01-05 12:17:28,114] [INFO ] [btpool0-4] [org.activiti.engine.impl.bpmn.deployer.BpmnDeployer] Processing resource bgxTestProcess.bpmn20.xml
[2014-01-05 12:17:28,649] [INFO ] [btpool0-4] [org.activiti.engine.impl.bpmn.deployer.BpmnDeployer] Processing resource bgxPricingRequestProcess.bpmn20.xml
[EL Fine]: sql: 2014-01-05 12:17:34.046--ClientSession(1971564735)--Connection(1746904296)--Thread(Thread[btpool0-4,5,main])--INSERT INTO PROCESS (PROCESS_KEY, CREA_TMS, CREA_USER_ACCT_KEY, CUST_KEY, DEAL_TYPE_KEY, REFERENCE_NO) VALUES (?, ?, ?, ?, ?, ?)
        bind => [21994, 2014-01-05 12:15:18.0, 1185, 1, 1, null]
[EL Fine]: sql: 2014-01-05 12:17:34.053--ClientSession(1971564735)--Thread(Thread[btpool0-4,5,main])--SELECT 1 FROM DUAL
[EL Warning]: 2014-01-05 12:17:34.055--UnitOfWork(1610775093)--Thread(Thread[btpool0-4,5,main])--Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: Einfügen von NULL in ("ACTOWUSER"."PROCESS"."REFERENCE_NO") nicht möglich

Error Code: 1400
Call: INSERT INTO PROCESS (PROCESS_KEY, CREA_TMS, CREA_USER_ACCT_KEY, CUST_KEY, DEAL_TYPE_KEY, REFERENCE_NO) VALUES (?, ?, ?, ?, ?, ?)
        bind => [21994, 2014-01-05 12:15:18.0, 1185, 1, 1, null]
Query: InsertObjectQuery(com.smg.bgx.persistence.toolbox.PricingProcess@45d640c5)
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
        at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1991)
        at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:298)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:377)
        at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:165)
        at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:180)
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:489)
        at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
        at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301)
        at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
        at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
        at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1793)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1775)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1726)
        at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:226)
        at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:125)
        at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4196)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1531)
        at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:277)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
        at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:132)
        at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:479)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:121)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:951)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:797)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
        at com.isomorphic.jpa.EMFProviderSpring.commitTransaction(EMFProviderSpring.java:184)
        at com.isomorphic.jpa.EMF.commitTransaction(EMF.java:210)
        at com.isomorphic.jpa.JPADataSource.onSuccess(JPADataSource.java:3982)
        at com.isomorphic.jpa.BgxJPADataSource2.onSuccess(BgxJPADataSource2.java:52)
        at com.isomorphic.jpa.JPADataSource.onSuccess(JPADataSource.java:4003)
        at com.isomorphic.jpa.BgxJPADataSource2.onSuccess(BgxJPADataSource2.java:57)
        at com.isomorphic.rpc.RPCManager.onSuccess(RPCManager.java:1669)
        at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1165)
        at com.isomorphic.rpc.RPCManager.send(RPCManager.java:620)
        at de.mycompany.bgx.server.BgxIDACall.processRPCTransaction(BgxIDACall.java:33)
        at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:137)
        at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
        at de.mycompany.bgx.server.AuthFilter.doFilter(AuthFilter.java:69)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: Einfügen von NULL in ("ACTOWUSER"."PROCESS"."REFERENCE_NO") nicht möglich

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1046)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3694)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1354)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:890)
        ... 72 more


ListGrid and SelectItem type filter editor - keys instead of empty form

$
0
0
SmartGWT Pro 4.0-p / SmartClient Version: v9.0p_2013-10-01/Pro Deployment (built 2013-10-01)

I have a ListGrid with an SQL datasource. Thes Grid has a field, where I have to show strings instead of integer values:
Code:

statuszMap = new LinkedHashMap<String, String>();
statuszMap.put("1", "Jogosítóra vár");
statuszMap.put("2", "Forrásgazdára vár");
statuszMap.put("3", "Tervösszesítőre vár");
statuszMap.put("4", "Ellenőrre vár");
statuszMap.put("5" "Véglegesítőre vár" );
statuszMap.put("99", "Élesítve");

ListGridField statusz = new ListGridField("statusz_id"); //statusz_id is an integer field
statusz.setValueMap(statuszMap);
statusz.setTitle("Státusz");

It works, but when I turn on the grid's filter editor I get "1,2,3,4,5,99" string instead of empty line when there is no filter in this field. When I open down the filter field it show the right lines (empty lines + the values, not the keys), but selecting the empty line and clicking the filter icon brings back the "1,2,3,4,5,99" value.

This numbers have no meaning to the end user and I don't want to show them. How can I get empty filter editor field when there is no filter criteria in that field?

Attached Images
File Type: jpg valuemapkeys1.jpg (17.8 KB)
File Type: jpg valuemapkeys2.jpg (25.9 KB)

Defer drawing using autoDraw

$
0
0
I have an application that generates a large number of widgets. I would like to defer the rendering of these widgets.

I looked the following documentation: http://www.smartclient.com/docs/9.0/docs/SmartClient_Quick_Start_Guide.pdf

After instantiating a Canvas object, I have called "setAutoDraw(false)" and "setAttribute("autoDraw", false, true);".

Attempts:
1) I used "addChild(..)" on the Canvas object and the children are rendered immediately (without me calling 'draw').
2) I used "addChild(widget, name, autoDraw) where the autoDraw flag was disabled and the children were rendered immediately (without me calling 'draw').
3) In my HTML file, I added this line "<script>isc.setAutoDraw(false)</script>" in an attempt to globally disable the autoDraw. This did not work.

Can someone please give me some pointers on what I am missing and how to defer rendering of Canvas children?

Thanks.

SmartGWT version: SmartGWT 4.0p from 12-12-13

My SmartGWT 4.1 client cannot invoke Spring server's bean

$
0
0
hello expectises

I use SmartGWT 4.1 in client side, DMI and send the DSRequest to server for DB fetching and updating. In server side, I integrate SmartGWT to Spring Core 3.2.4-RELEASE

And the web.xml is as following
Code:

    <!-- standard spring configuration -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
 
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener> 

  <listener>
        <listener-class>com.isomorphic.base.InitListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>IDACall</servlet-name>
        <servlet-class>com.isomorphic.servlet.IDACall</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>DataSourceLoader</servlet-name>
        <servlet-class>com.isomorphic.servlet.DataSourceLoader</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>Init</servlet-name>
        <servlet-class>com.isomorphic.base.Init</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
     
    <servlet>
        <servlet-name>HttpProxy</servlet-name>
        <servlet-class>com.isomorphic.servlet.HttpProxyServlet</servlet-class>
    </servlet>

    <!-- RPCManager uses this URL by default for Built-in DataSource operations -->
    <servlet-mapping>
        <servlet-name>IDACall</servlet-name>
        <url-pattern>/showcase/sc/IDACall/*</url-pattern>
    </servlet-mapping>

    <!-- Built-in DataSource operations backcompat -->
    <servlet-mapping>
        <servlet-name>IDACall</servlet-name>
        <url-pattern>/showcase/sc/IDACall.aspx/*</url-pattern>
    </servlet-mapping>

    <!-- DataSourceLoader requests -->
    <servlet-mapping>
        <servlet-name>DataSourceLoader</servlet-name>
        <url-pattern>/showcase/sc/DataSourceLoader</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>HttpProxy</servlet-name>
        <url-pattern>/showcase/sc/HttpProxy/*</url-pattern>
    </servlet-mapping>

    <!-- serve ISC modules compressed, with expires headers -->
    <servlet-mapping>
        <servlet-name>FileDownload</servlet-name>
        <url-pattern>/showcase/sc/system/modules/*</url-pattern>
    </servlet-mapping>

    <!-- General config -->
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <jsp-config>
        <!-- Isomorphic JSP tags -->
        <taglib>
            <taglib-uri>isomorphic</taglib-uri>
            <taglib-location>/WEB-INF/iscTaglib.xml</taglib-location>
        </taglib>
    </jsp-config>

        <!-- Default page to serve -->
        <welcome-file-list>
                <welcome-file>ShowCase.html</welcome-file>
        </welcome-file-list>

and define the DataSource XML in client side as following

Code:

<DataSource
    ID="Account"
    serverType="generic">

    <fields>
        <field name="accountNo" type="text" title="Account No." length="6" required="true" primaryKey="true"/>
        <field name="accountType" type="text" title="Account Type" length="25" required="true">
            <valueMap>
                <value ID="I">Individual</value>
                <value ID="C">Corporate</value>
            </valueMap>
        </field>
        <field name="firstName" type="text" title="First Name" length="100" required="true"/>
        <field name="lastName" type="text" title="Last Name" length="40"/>
    </fields>

    <serverObject lookupStyle="spring" bean="accountServer"/>   
</DataSource>

I checked that it can call the showcase/sc/DataSourceLoader (by SC.say())

But I cannot found it proceed to server Spring Bean, even no error in server log... Seem it cannot invoke the server side, after accessing the DataSource in client side. Hence I want to ask where can I put log ( in client or server side also,) to check the outgoing of DSRequest and reponse stream DSResponse?

What's the internal step in SmartGWT when we submit form and the DS Request is generated in client side?

Dynamically create components

$
0
0
Is the Smart Client able to create components dynamically?

For example, there is a textbox and a HStack.
When the user inputs a number in the textbox, the HStack will generate a row of corresponding "star" image elements,
i.e. If "5" is entered, there will be 5 stars; inputting 10 will result in 10 stars.

Is it possible to code such type of layout creation in Smart Client?

TreeGrid inline editor unexpectedly hides itself when clicked

$
0
0
Hello.

I am using SmartGWT Power Edition 3.1p build 2014-01-01.

I am experimenting with a very simple TreeGrid based on the #tree_editing show case example.

With the editor started (inputs controls visible), whenever I click on a editor control (to select it) it hides itself as if I have clicked outside.

<code>

private void testTree(Layout layout) {
final TreeNode[] employeeData = new TreeNode[] {
new EmployeeTreeNode("4", "1", "Charles Madigen", "Chief Operating Officer", true),
new EmployeeTreeNode("189", "4", "Gene Porter", "Mgr Tech Plng IntIS T", false),
new EmployeeTreeNode("265", "189", "Olivier Doucet", "Asset Spec Lines Stns", false),
new EmployeeTreeNode("264", "189", "Cheryl Pearson", "Dsl Sys Rep", false),
new EmployeeTreeNode("188", "4", "Rogine Leger", "Mgr Syst P P", true) };

Tree employeeTree = new Tree();
// employeeTree.setModelType(TreeModelType.PARENT);
// employeeTree.setRootValue(1);
// employeeTree.setNameProperty("Name");
// employeeTree.setIdField("EmployeeId");
// employeeTree.setParentIdField("ReportsTo");
// employeeTree.setOpenProperty("isOpen");
employeeTree.setData(employeeData);

final TreeGrid test = new TreeGrid();
final TreeGridField type = new TreeGridField("ReportsTo");
// type.setCanEdit(true);
// type.setValueMap("V1", "V2", "V3");
test.setFields(new TreeGridField("Name"), type);
test.setData(employeeTree);
test.setCanEdit(true);
test.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {

@Override
public void onClick(ClickEvent event) {
event.cancel();
}
});
test.setHeight(300);
layout.addMember(test);
}
</code>

I have tracked the mousedown JS event down to a clickMask that ends up calling back isc_ListGrid__handleClickOutsideEditor.

Here are some captured logs:

mouseDown on masked [ScreenSpan ID:isc_EH_screenSpan] firing clickAction, will hide mask
hideClickMask called with ID: isc_DynamicForm_0
hiding clickMask ID: isc_DynamicForm_0[autoHide:true], all masks hidden
focusing in [TreeGridBody ID:isc_TreeGrid_0_body] on clickMask hide with current focusCanvas: [DynamicForm ID:isc_DynamicForm_0]

TileGrid field layout

$
0
0
Dear Support,

I've got a simple question regarding the TileGrids, how can I display the fields horizontally (one after each other, as a table row) instead of vertically... or even more: how can we manage the layout of the fields inside a tile ?

Thank you very much,
Thomas

PDF export layout problems

$
0
0
Hi

So I finally got the PDF export working using a dedicated print skin. Now I've run into another problem which is that the PDF does not reflect the actual CSS as it looks on the screen.

As can be seen from the two attached screenshots. The one with the blue background reflects the app running in the browser and looks fine. The other (white background) is the same snippet from the generated PDF. As you can see in the PDF screen, the red background, the box border and the spacing is not reflected (arrows indicate problem areas). What could be the issue causing this?

I'm using the Enterprise skin with the following CSS added to the layout, to enable the shown screen result.

Code:


@page {
  margin: 10%;

  @bottom-right {
    color: black;
          font-family: Arial, Verdana, sans-serif;
          font-size: 9px;
    font-weight: normal;
    content: "Created with Forecast.it - " counter(page);
  }
}

@media screen, print {
        .pageTitle {
          font-size: 22px;
          color: #3f127a;
        }
       
        .pageTitleLineHeight100 {
          font-size: 22px;
          text-overflow: ellipsis;
          color: #3f127a;
          line-height: 100%;
        }
       
        .pageSubTitle {
          font-size: 16px;
          text-overflow: ellipsis;
          color: #3f127a;
        }
       
        .pageSubTitleLineHeight100 {
          font-size: 16px;
          text-overflow: ellipsis;
          color: #3f127a;
          line-height: 100%;
        }
       
        .reportTile {
          border: 1px solid #ababab;
          padding: 18px;
          background: red; 
        }
       
        .reportTileTitle {
          color: #3f127a;
          font-size: 14px;
          margin-bottom: 8px;
        }
       
        .reportTileData {
          color: #3f127a;
          font-size: 16px;
        }
}


Attached Images
File Type: png Screenshot.png (41.8 KB)
File Type: png PDF export.png (55.0 KB)

Group summary not appearing.

$
0
0
Hi,
I am facing some issues in multi group functionality in Smart GWT.
The first problem is that when we upgraded the Smart GWT version to 4.0 the group summary stopped appearing. After googling I found that this is an issue with the smart GWT code. So I upgraded to the patched version and took the nightly build (2013-12-23). The group summary started appearing. Now there is another issue where the Group summary stops appearing if I use the GroupTitleRenderer.

This is not specific to any browser.

Code snapshot:

direction.setGroupTitleRenderer(groupTitleRenderer );
product.setGroupTitleRenderer(groupTitleRenderer);

private GroupTitleRenderer getGroupTitleRenderer() {
return new GroupTitleRenderer() {
@Override
public String getGroupTitle(Object value, GroupNode groupNode, ListGridField listGridField, String fieldName, ListGrid listGrid) {
return getGroupHeaderTitle(fieldName, value);
}
};
}

getFileURL and Img.src

$
0
0
Dear Support,

as suggested in DataSource.getFileURL() we are using this method to get an url to an image stored in the DB that we can then pass to an Img widget.

Here is the (simple test case) data source:
Code:

<DataSource
    ID="test"
      serverType="sql"
      tableName="SYS_ATTACHMENT"
>
    <fields>
        <field name="ID" type="sequence" sequenceName="SQ_SYS_ATTACHMENT" hidden="true" primaryKey="true" />
            <field name="ATTACHMENT" type="image" title="$attachment"/>
    </fields>
   
</DataSource>

We call the service, which returns a rather long URL:
Code:

Record r = new Record();
r.setAttribute(DSImageAttachment.ID, pictureId);
String url = DataSource.get("test").getFileURL(r, "ATTACHMENT");

The URL:

Code:

http://127.0.0.1:8888/application/sc/IDACall/undefined?isc_rpc=1&isc_v=v9.0p_2013-10-01&isc_tnum=13&_transaction=%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E13%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Cdownload_fieldname%3EATTACHMENT%3C%2Fdownload_fieldname%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3Etest%3C%2FdataSource%3E%3CoperationType%3EviewFile%3C%2FoperationType%3E%3C%2FoperationConfig%3E%3CuseStrictJSON%20xsi%3Atype%3D%22xsd%3Aboolean%22%3Etrue%3C%2FuseStrictJSON%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3Etest_viewFile%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Cdownload_fieldname%3EATTACHMENT%3C%2Fdownload_fieldname%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E
But the data never comes up to the client... we can see a DSRequest issued in the RPC tab, but it stays as "Transaction in Progress", no specific error in the output...
If we copy/paste the URL in the address bar of a browser, we receive a 200 of type html/text.

Can you please help us?
Many thanks (and happy new year to all the team!),

Regards,
Thomas

Partial focus rectangle in grids

$
0
0
SmartClient Version: v9.0p_2013-12-11/LGPL Development Only (built 2013-12-11)

All browsers

Problem is easiest to see in Chrome...

Steps to Reproduce:
1. Using the "Live Filter" example in the SmartGWT Showcase,
2. Filter the content to the "Continent" "Africa",
3. In the "Country" filter type "al" (should show a grid with some empty rows),
4. Click with the mouse in the grid in one of the empty rows (should put a focus rect on the grid).

Notice that the focus rect on the left hand side of the grid is intermittent. Where there are no rows you can see the focus rect, and on every other row of data. However on alternating rows it disappears. Also note that the top of the grid is missing the focus rect as well (except under the "filter" column").

Based upon my testing I've noted the following:
1. If the "filter" column does not exist on the right hand side of the grid, you get the same behavior on that edge of the grid as seen on the left hand side.

2. If the grid has enough rows to scroll, you can see this effect on the right hand side as well. In addition, the focus rect at the top and bottom of the grid will come and go depending upon whether or not the record at the top or bottom has special styling.

3. Selecting a row will remove any focus rect on the border of the grid touched by that record.

In general, it appears that whenever a special style is applied to the row (alternate, selected, etc.) the focus rect gets covered up.

In my app, I apply special styling to both the alternating and standard rows. So, in my app I lose the focus rect on all rows (I only see part of one when there are too few rows to fill the height of the grid). I suspect it has something to do with things in the styling that add the background highlighting.

I see the same behavior in tree grids.

Custom DateTimeInput helper method obfuscated

$
0
0
For dateTimeInput format we wrote our own formatter that takes millisecond into account. Within the process a call is made to the helper Date._splitDateString(). to split up the text into an array. Everything worked fine until we used the obfuscated version of smartclient js libraries that all methods beginning with '_' are obfuscated. I understand that some functions are better not to be exposed but this one is merely a helper that is very helpful in creating our own dateTime input formatter (Another example will be _canExportField() of DataBoundComponent).
Is there any way to get around this?
Thanks

Select All List Grid

$
0
0
Is there a way to have a title for the select all checkbox column?

Issue with preventDuplicates

$
0
0
Hi all,

Im using SmartClient version:
SNAPSHOT_v8.3d_2012-05-26/LGPL Deployment

I have the next scenario:
- One grid with products catalog (canAcceptDroppedRecords = false).
- One grid with Products to Order (canAcceptDroppedRecords = true).

Drag and drop enabled with dragDataAction: 'copy'.

If I drag one record from Products Catalog to Products to Order grid and if I modify this dropped record, if I try to drag and drop the same product again, the grid accepts it.

I think this is due to both records are not exactly equals in all their properties.

How can I prevent duplicate records just checking one property?
For example: Product SKU


Please help, this is delaying us.
Thanks in advance.

FilterEditor SelectItem Items Disappear

$
0
0
I have a ListGridField with icons indicating binary file type ("PDF","DOC","XLS",etc).

For this ListGrid column, I'd like to implement a FilterEditor that lets the user pick from icons.

Cribbing from this Showcase example, http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category, I coded it like so:
Code:

setFilterEditorProperties(new SelectItem() {
 {

  @SuppressWarnings("serial")
  LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>() {

  {
    put("PDF", "Acrobat");
    put("XLS", "Excel");
    put("DOT", "Word");
  }
  };

  setValueMap(valueMap);

  @SuppressWarnings("serial")
  LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>() {

  {
    put("PDF", GWT.getModuleBaseURL() + "Acrobat.png");
    put("XLS", GWT.getModuleBaseURL() + "Excel-16.gif");
    put("DOT", GWT.getModuleBaseURL() + "Word-16.gif");
  }
  };

  setValueIcons(valueIcons);

 }
});

On the first load of the page, all is as expected.

The issue is that after the first use, the items start disappearing from the FilterEditor SelectItem.

See attached graphics.

Please advise, thanks.


------------------
SmartClient Version: v9.0p_2013-12-31/PowerEdition Deployment (built 2013-12-31)

IE8

I'm not seeing any errors in the GWT/SGWT Dev Mode consoles.


Log message: "ERROR ISCObjectPool - return of object already in pool"

$
0
0
During startup of my application, I see the following message in the server log: "[izer] ERROR ISCObjectPool - return of object already in pool"

Please find the complete log in the attached file.

I see the message in hosted mode, as well as in Glassfish.
The application seems to be running ok. However I would like to figure out what is causing the exception, to ensure that it will not cause any problems later on.
Do you have any hint what could be causing that behaviour?

I'm using SmartGWT Framework 4.1 (SNAPSHOT_v9.1d_2014-01-05/PowerEdition). I saw the exception the first time, when I moved from SmartGWT 4.0 to 4.1.

Attached Files
File Type: txt log.txt (18.1 KB)

Configure DMI to send attributes that are skipped?

$
0
0
I have a very simple DMI method that returns java.io.File[] of a directory. Is there a way to configure the DMI to pass values that it seems to skip by default, such as file.length(), file.lastModified(). I assume these values do not get passed because Java does not follow the standard get/set property for these values. Am I thus required to wrap a java.io.File with a class that provides the malformed property getters and setters, or is there a way to tell your framework how to retrieve properties that it does not successfully find?

"Password Item" Validation Error Message Showing Wrong in "Google Chrome" Browser.

$
0
0
Hi,
Version : Smart Gwt-4.0p
Issue : "Password Item" Validation Error Message Showing Wrong in "Google Chrome" Browser.

Procedure :

1. Have one "Password Item' field
2. Please find the attached file to know the properties and validators have been set for the password item.
3. In my case I am not allowing space and "min length" for the password field and I added following validators :
final String PASSWORD_REG_EXP="^(^([\\x00-\\x80]+))$";
passwordStringValidator
.setExpression(PASSWORD_REG_EXP);
passwordStringValidator.setStopIfFalse(true);
passwordStringValidator.setStopOnError(true);
final String GROUP_NAME_REG_EXP2 = "[^\\s]";

4. Run sample application and enter a "space" using space bar from key board.
5. After clicking "OK", Then Password is cleared, and shows an error message like "Invalid Value" .
It is happening in IE.

code for clearing content :
---------------------------
//Blur Handler For Clearing the content from "password item"
ReferringGroupPasswordItem.addBlurHandler(new BlurHandler() {

@Override
public void onBlur(BlurEvent event) {

if (!(ReferringGroupPasswordItem.validate())) {

ReferringGroupPasswordItem.clearValue();
}
}
});
---------------------------

Expected : "Invalid Value" for all the browsers.

Actual Result : "Field is required" in Google Chrome and
"Invalid Value" in IE.


Please find the sample Application from attachments.
File : testsmartGwtProject.java

Please let me know your comments.

Thanks

Attached Files
File Type: java TestsmartGwtProject.java (3.4 KB)

Issue with List Grid filtering

$
0
0
Hi,

In my Application,i have popup window on which i have included smartclient list grid with many fields/columns.

Two of them are movement quantity and LOT. And only LOT is filterable and only movement quantity is editable. After editing movement quantity on one record and just come out of that field and try to filter by LOT in same grid,i am getting error "This action will discard all unsaved edited values for this list." with ok and cancel. This is some thing which is not expected.It is supposed to be hold edited value and show filtered data.

Also without editing filtering is working properly with another issue. Ex., on the same grid LOT with "xyz" is displaying filtered records but when i remove xyz it is showing all data from corresponding table but not as per datasource(with some conditions) defined for that grid.

It would be great if you help me on this.

Thanks in Advance

problems styling hover boxes

$
0
0
SmartClient_v90p_2013-12-19_PowerEdition
IE9
Chrome 31.0.1650.63

I'm unable to get a box shadow working in IE. I'm also unable to get the font size to change to 14 in either chrome or IE. Attached is a standalone sample that illustrates both issues.

Thanks

Attached Files
File Type: css treeGridDF.css (5.6 KB)
File Type: html tree_grid_test.html (7.4 KB)
Viewing all 4756 articles
Browse latest View live