Hola JE: Lo de un botón para volver directamente al inicio del menú ya lo tenemos hecho. Estará en XavaPro 7.3, para abril del 2024. El mes que viene.
Hi Bart, What I want is a textfield that "behaves" in some way In that case, editors for annotations is perfect for you: https://openxava.org/OpenXavaDoc/docs/customizing_en.html#editors-for-annotations Help others in this forum as I help you.
Hi friends, Finally this feature is implemented in XavaPro and it will available for v7.3, in April 2024, just the next month. How we solved the problem of other opened sessions? We take a simple approach, when a user logins his other sessions are invalidated. So we don't have the problem when the user closes the browser without clicking in logout.
Hi Ngo: Yes. It seems that XLS files has a limit of 65553, this is an Excel limitation for that format. Why not export to CSV, then open with Excel and save as an XLSX format? If that is not a good solution for you and you need you user get directly the XLSX when it click on the button, you should create your own action that calls your own servlet, and use POI from it to generate the Excel. Moreover, given that there is many records, it could be a long process, so you can launch it in a separate...
Hola JE: Esto ya está hecho. Estará incluido en OpenXava 7.3, disponible en abril.
Hola Gregorio: A partir de la versión 7.3 tanto OpenXava como XavaPro cumplen con OWASP Top Ten. De hecho, OpenXava ahora pasa la prueba de seguridad web ZAP de OWASP al 100%, sin ninguna alerta de nivel crítico, medio o bajo. OpenXava 7.3 estará disponible en abril del 2024, en un mes.
Hi Lucio: OpenXava says "Controller BaseEntity non found", and it is right. There is no a controller called BaseEntity. Just change: <env-var name="XAVA_SEARCH_ACTION" value="BaseEntity.searchExcludingDeleted" /> By: <env-var name="XAVA_SEARCH_ACTION" value="SoftDeleter.searchExcludingDeleted" /> Help others in this forum as I help you.
Hi Bart, You can attach your own editors to your own annotations: https://openxava.org/OpenXavaDoc/docs/customizing_en.html#editors-for-annotations But this is not your case, you don't want a custom editor you want a way to define your own search action. The way to define your own search action is by means of @SearchAction. We have not a way to define your own annotation for that. Defining a custom annotation just to declare a custom action for search too much work for the developer, so we have no...
Hola Ignacio: ¿Es posible realizar esto en OX? No. OpenXava no usa AJAX inverso, o commet, o websockets, o programación reactiva, etc. Para ese módulo en concreto te lo tendrás que hacer tú. La opción más sencilla sería un código JavaScript que consultara el servidor cada cierto tiempo. Aunque si quieres usar websocket o algo más sofisticado también es posible. Es cosa tuya. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Ngo: Just go to your module and click in Generate Excel. It generates a CSV file you can import with Excel and them, from Excel save it in the format you want. As alternative, you can use TypicalRealExcel controller in your module, so you application wlll generate Excel files directly instead of CSV when clicking on Generate Excel. Help others in this forum as I help you.
Hi Filippo: in Application Tab give NullPointerEx I should look at the trace to know the cause, possibly some problem in the getter, maybe start is null in some records. it's not possible to filter on 'getDescriptionForLists' since is dynamically generated You're right about it. A solution is using @Formula to concat, that allows filgering and sorting in the list. In this way: public class Event extends Identifiable { @org.hibernate.annotations.Formula("CONCAT(CODE, ' ', START)") private String descriptionForLists;...
Hola JE: Tienes razón, lo he conseguido reproducir. Añádelo como bug con un vínculo a este hilo y lo arreglaremos. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Lucio: I need to limit user access to specific entities in a collection, based on the return value of a custom java method. Is that possible? Yes, it's possible but programmatically, and you do even with plain OpenXava. For that case just create a calculated collection and use Users.getCurrent() inside the getter to filter the data. If you give me more details I can give a more accurate solution. Help others in this forum as I help you.
Hi Lucio: The 'admin' user always work, in any computer and in any application. It allows you to use XavaPro for development in any computer, to develop many application. If you buy a single final user license, you have 'admin' + other user. While you're developing and before you're in production, you can use both the 'admin' and the user. Then when you go to production, just activate that user for the production server, and it will be deactivated for your development machine. But you always keep...
Hola José: Añadelo como bug. Lo revisaremos. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Filippo: Don't fill the bug. It's not a bug, it's the way it should work. Indeed in 7.0.3 we solved: Fix: Bad values for list filter in combos if @DescriptionsList uses several fields for description. Just because it worked originally like you want. That is, if you write: @DescriptionsList(descriptionProperties = "code, start", order = "code, start") private Event event; What if you have in the list the property event.code, and the property event.start, and the user want to filter for the code...
Hi Dusan, The X for closing modules is already implemented, and it will be available in the upcoming OpenXava 7.3
Hi Filippo: I tried your code and you're right. Add it as a bug. We'll fix it for future releases. Help others in this forum as I help you.
Hi Bart: I achieved reproduce your problem. I tried it in Invoice > InvoiceDetail > Product of openxavatest, adding a @SearchAction in product and annotating description of Product as @SearchKey. It worked fine the first time, if you don't edit the value, but after that, if you put any value in product description the values in product subview of InvoiceDetail are always empty. Please add it as a bug, with a link to this thread, so we'll fix it. In the meantime continue using your solution with parameters....
Hi friends, We have a new edition of XavaPro available. XavaPro Subscription. We invite you to read the announcement here: https://openxava.org/blog/new-xavapro-subscription Cheers
Hi Lucio: Yes, @DescriptionsList does not support large datasets. We plan to solve it in future releases: https://openxava.org/xavaprojects/o/OpenXava/m/Issue?detail=ff808081702156050170274028940005 By now, you have not remove the @DescriptionsList, so the user will use a dialog to choose the value. This dialog supports large datasets. Help others in this forum as I help you.
Hola Juan: Claro, es lo más fácil del mundo. Convierte el enum en un clase Java anotada con @Entity, y donde usas el enum lo anotas con @ManyToOne y @DescriptionsList. Es decir si tienes: public class Animal extends LivingBeing { public enum Type { HERBIVORE, CARNIVORE, OMNIVORE }; Type type; } Crea una clase AnimalType: @Entity @Getter @Setter public class AnimalType extends Identifiable { @Column(length=20) @Required String description; } Y deja Animal así: public class Animal extends LivingBeing...
Hola MariLuz: Parece que sí, hay un plugin para Eclipse (OpenXava Studio está basado en Eclipse) para usar Copilot: https://marketplace.eclipse.org/content/copilot4eclipse Ten en cuenta que GitHub Copilot no es gratis, hay que pagar una suscripción. Además, todos los IDE que lo incluye, lo hacen sólo en su versión de pago. Otra opción es usar IntelliJ en lugar de OpenXava Studio. De hecho, muchos programadores OpenXava usan IntelliJ. Pero aquí también, solo la versión de pago de IntelliJ incluye...
Hola JE: Tienes razón, lo acabo de probar y va tan mal como cuentas. Por favor, añadelo como bug para que lo podamos arreglar. Si lo quieres arreglar mientras tanto tendrás que refinar la acción de escoger. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Bart, I think the problem is that naam does not exist in the previous view. Try to change: Object ingredNaam = getPreviousView().getValue("naam"); By: Object ingredNaam = getPreviousView().getValue("ingredient.naam"); Help others in this forum as I help you.
Hola José: Este tema ya lo tratamos aquí: https://sourceforge.net/p/openxava/discussion/437013/thread/965fa85d14/ Recuerda que el problema está en que una vista de detalle puede tener varias colecciones y las mayoría de las acciones de las colecciones son comunes. Por eso no está soportado. He añadido el soporte de colecciones a la petición que hiciste, le he puesto un vínculo a este hilo y le he subido la prioridad: https://openxava.org/xavaprojects/o/OpenXava/m/Issue?detail=ff808081835f79800183683d6523001b...
Hi Christian, also calls a custom action to save a log in the DB or to print a console message Ok, I understand your needs, I think. A way is to define an action with after-each-request in controlles.xml: <action name="onOpenCollectionDialog" ... after-each-request="true"/> And then in that action: public void execute() throws Exception { if (getManager().isShowDialog() && getView().isRepresentCollection()) { // Do your logic } } I didn't try the code, it's just to give you an inspiration. Surely...
Hi IB, I'm not configured any OpenXava application in a load balancing environment, so I cannot give you direct tips to use. However, many OpenXava developers deploy their OpenXava application in a load balancing environment, indeed many of improvements in OpenXava to support Zero downtime deployment(ZDD) and horizontal scaling are contributions from OpenXava developers using OpenXava in such environment. On the other hand, OpenXava is a regular Java web application that use session state, so any...
Hola Fabio: Lo de usar JDBC directo es una opción, también podías haber usado native queries de JPA, e incluso JPA puro. En JPA, no puedes consultar directamente una @ElementCollection. Deberías basar tu consulta en la entidad base que contiene la @ElementCollection. Por ejemplo, si tienes una entidad Factura que contiene una @ElementCollection de Detalle, tu consulta podría verse así: SELECT SUM(d.cantidad) FROM Factura f JOIN f.detalles d WHERE d.producto_numero = :numero En este caso, detalles...
Hi Christian: specifically to when a collection detail dialog opens But the only way a detail dialog button is opened is clicking in a button. So, what is the problem of using @NewAction? Tell me more about your specific case, so I understand why the current OpenXava options are not enough. Help others in this forum as I help you.
Hola Rubén: Cualquier servicio de hosting para Tomcat te debería de servir. Yo personalmente prefiero un servicio de hosting que me ofrezca simplemente un Linux básico y así yo puedo instalar la versión de Java y Tomcat que prefeiera. Además de instalar en la base de datos que yo quiero configurada como yo quiero. Estos son algunos servicios de hosting que usan algunos usuarios para sus aplicaciones OpenXava: - https://www.anw.es/ : Hosting Tomcat muy barato - https://javapipe.com/ : Hosting Tomcat...
Hola Rubén: Cualquier servicio de hosting para Tomcat te debería de servir. Yo personalmente prefiero un servicio de hosting que me ofrezca simplemente un Linux básico y así yo puedo instalar la versión de Java y Tomcat que prefeiera. Además de instalar en la base de datos que yo quiero configurada como yo quiero. Estos son algunos servicios de hosting que usan algunos usuarios para sus aplicaciones OpenXava: https://www.anw.es/: Hosting Tomcat muy barato https://javapipe.com/: Hosting Tomcat muy...
Hola Manu: La solución que te propuse es a nivel visual, no tiene en cuenta las validaciones. Claro, las propiedades ocultas siguen existiendo y al grabar no se cumple su validación. Te propongo dos alternativas. La primera sería cambiar el uso @Length por @Mask. Mira la documentación de @Mask aquí: https://www.openxava.org/OpenXavaDoc/docs/model_es.html#mascaras La segundo alternativa es quitar todos los @Lengh y poner un @PropertyValidator propio en documento o poner una validación a nivel de entidad...
Hola Fabio: Entiendo. La segunda forma que usas, la de una propiedad calculada con un query debería funcionar. ¿Qué es lo que ocurre? ¿No te da el resultado que esperas, o te da algún error? Si te da un error pon aquí el error que te da y la traza de la excepción. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Ch, If you want to change the title for all collections in your application, you have to add an entry collection_report_title in your messages (not labels) file in i18n. Like this: collection_report_title={0} de {1}: {2} Where {0} is the collection name, {1} the parent name and {2} the id of the parent. On other hand, if you want to rename just a collection and want to do it in based of some specific logic, you can do it by code, from an action, in this way: getView().getSubview("mycollection").getCollectionTab().setTitle("My...
Hi Dusan, the others on the right side move to the left and the user clicks on the second button Instead of hidding the button, just disable it. I would like to eliminate the real cause Yes, we're going to fix the real cause, but them you should upgrade to the OpenXava version with that fix. Help others in this forum as I help you.
Hola Fabio: Lo de hacer una propiedad calculada en una buena solución, pero tendría que estar en la clase Factura, donde podrías recorrer la colección sin necesidad de usar JPQL. Si solo lo quieres para mostrar en la interfaz de usuario una solución más sencilla aún sería usar un sumatorio, con un +. Así: @ElementCollection @ListProperties("producto.numero, producto.descripcion, cantidad, importe+") Collection<Detalle> detalles; Fíjate en el + detrás de importe. La clase detalle tendría que tener...
Hola Yino: Lo he probado y a mi me ha funcionado bien. Usando tu código de Usuario y una clase Direccion inventada por mi, doy de alta una dirección y después doy de alta un usuario escogiendo esa dirección y graba perfectamente. Este es el código que he usado para Usuario: package com.tuempresa.miaplicacion723.modelo; import javax.persistence.*; import org.openxava.annotations.*; import lombok.*; @Entity @Getter @Setter public class Usuario { @Id @Column(length=8) String dni; @Column(length=30)...
Hi Dusan, I was not thinking in IJavaScriptPostAction, because it has the same problem of removeActions(), it is applied after the action cycle, too late. Put your JavaScript code in an JS file inside xava/editors/js of your project. Call it, nodoubleclick.js, for example. Inside, you can put this code: openxava.addEditorInitFunction(function() { $('#ox_invoicedemo_Invoice__CRUD___save').on('click', function(e) { $(this).hide(); }); }); Remember to adjust the id. Help others in this forum as I help...
Hola Manu: A nivel de base de datos tienes que tener una longitud fija, que será la del máximo posible. Entonces mapea la columna con una propiedad persistente y usa propiedades no persistentes (con getter y setter, pero sin atributo) para tener otros puntos de vista, Algo así; @Column(length=20) String documento; @Column(length=9) public String getDni() { return documento; } @Column(length=9) public String setDni(String dni) { documento = dni; } @Column(length=10) public String getPasaporte() {...
Hola Yino: Creo que sé donde está el problema. Has dichoe que dirección es obligatoria, al poner optional=false. @ManyToOne (fetch=FetchType.LAZY, optional=false) @DescriptionsList Direccion direccion; Entonces si al grabar escoges una dirección que está siendo usada por otro usuario, hay que quitar la dirección del otro usuario, y eso no le gusta a la base de datos porque se rompe la integradad referencial. Es decir, la base de datos no quiere que en la tabla de usuarios haya un referencia nula...
Hola JE: Estamos teniendo mala suerte, no consigo reproducirlo. He usado un módulo de solo detalle con una colección, teniendo activado lo de redimensionar columnas. He puesto un valor largo en uno de los campos (en este caso en nombre del cliente) y he probado redimensionarlo de varias manera. Haga lo que haga siempre sale bien. Te adjunto el pantallazo. Tiene que ser alguna combinación específica que tenemos que encontrar. Crea un proyecto de cero, que tenga solo dos clases y que reproduzca el...
Hi IB, One option is using parameters instead of labels when you design the report, and the send the value of the parameters in your report action, like this: public class MyI18ReportAction extends JasperReportBaseAction { ... public Map getParameters() throws Exception { Map parameters = new HashMap(); parameters.put("articleLabel", Labels.get("article)); parameters.put("familyLabel", Labels.get("family)); return parameters; } Labels.get() allows you to get the labels value from i18n labels files....
Hi Christian: which has its own on-init action but doesn’t fire up. As I explained before, the on-init action is for the module not for the entity, and you're not in the Child module. The module is in the URL of the browser. That is, if you have a Product with a collection of Warehouse. If in the browser is /yourapp/m/product, then the on-init of warehouse is not executed. Because on-init is for initializing modules, not entities. I want to believe there must be a way to fire up an action as soon...
Hi Dusan, I understand, the removeAction() is done after the action is executed in the server and come back, so the user still has the button there to click all the times he wants. The solution is to remove it via JavaScript, so we remove it just after click. Use this JavaScript code for that: $('#ox_invoicedemo_Invoice__CRUD___save').on('click', function(e) { $(this).hide(); }); Of course, you have to change the id, don't use ox_invoicedemo_Invoice__CRUD___save but the id of your action. Help others...
Hola Mariluz: Sí, si es una librería JS sí que la puedes integrar. Aquí tienes la forma de hacerlo: https://www.openxava.org/OpenXavaDoc/docs/customizing_es.html Otra cosa diferente es aprender a usar esa librería para que haga lo que tu quieres. Eso es algo que ya no tiene que ver con OpenXava. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Yino: Parece un problema de restricción referencial de la base de datos. ¿Has comprobado que el DNI que utilizas no existe ya? ¿Has probado grabar con otro DNI? ¿Qué ocurre si no le pones dirección? Ayuda a otros en este foro como yo te ayudo a ti.
Hola Mariluz: Me alegra de que lo hayamos encontrado. Añádelo por favor como un bug, porque esa entrada, que es la que viene por defecto al crear un proyecto, no funciona tal y como está. Debería corregir eso para evitar que futuros usuarios caigan en lo mismos. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Mariluz, Si en el módulo hay muchos registros lo suyo sería utilizar "Agrupaciones de marcadores" o "Clústeres de marcadores" Eso no va a funciona. Cuando pienso en muchos registros, pienso en millones. Muchas aplicaciones OpenXava tienen tablas grande, de millones de registros. Si un usuario abre uno de esos módulo y pulsa en mapa la aplicación se congelará, porque leer un millón de registro, agruparlos por cercanía y después añadirlos al mapa, va a costar. Pero poner un corte de registros...
Hi Christian: That is because the on-init action, and the controller itself is for the module, not for the model. The model is the Java class you have anotated as an @Entity, let's say Invoice, while the module is that you define in controllers.xml. OpenXava generates automatically a module for each model, just you as programmer save time. That is, there is a default Invoice module for an Invoice entity. The question is that you can define many module for the same module. Let's say InvoiceReadOnly,...
Hi Dusan: I'll add the bug but can I expect some earlier debug to implement it in version 6.6.3. ? We will debug when we start to fix the bug, because we'll need to run the suite and possible redo the fix until the code meets all the existing case. It sometimes can take sometime, maybe several days. Although sometimes you can solve the bug in just a few hours, it depends. The problem maybe it's related with the fact that OpenXava block the execution of new actions for the same module, and in this...
Hola Manú: La documentación dice esto sobre los enums: "Desde v5.3 si pones @Required, la primera opción es por defecto y ya no mostrará valor vacío." Una solución sencilla para conseguir lo que quieres es user @PropertyValidator usando un NotNullValidator por ejemplo. Así ya no tenemos el @Required y OpenXava te pondrá en blanco, pero justo es validación no dejará pasar el nulo. De esta forma: @Column @PropertyValidator(org.openxava.validators.NotNullValidator.class) @Enumerated(EnumType.STRING)...
Hola Mariluz: Depende si es una aplicación cliente Java, hecha con Swing, AWT o SWT, o es una aplicación web Java, hecha con servlets o algo similar. Si es una aplicación Swing no vas a poder, porque ya hace años que los navegadores no ejecutan Java. Si lanzas una aplicación Java Swing desde una acción OpenXava te aparecerá en el servidor, donde no hay nadie para verla, puede que el servidor no tenga ni pantalla. Dame la URL del producto que estás considerando y te diré si se puede integrar. En general,...
Hola Mariluz: Sí que se puede. Alfresco está basado en Java y lo podrías correr en el mismo servidor que OpenXava. Puedes hacer tu propia vista personalizada para un módulo para allí incluir la parte de Alfresco que necesites. Aquí se explica com hacer una vista personalizada con OpenXava: https://openxava.org/OpenXavaDoc/docs/customizing_es.html#Personalizacion-Vistas+JSP+propias+y+taglibs+de+OpenXava Alfresco tiene lo que ellos llaman WebScripts que están pensado justo para poder integrar Alfresco...
Hola Mariluz: Cambia en tu xava.properties esto: mapsTileProvider=http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png Por esto: mapsTileProvider=http://a.tile.openstreetmap.org/{z}/{x}/{y}.png Y dime si te funciona. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Mariluz: Entiendo, lo quieres es un formato de modo lista, como tenemos ahora con los gráficos, las tarjetas o el calendario. A la hora de incluirlo en OpenXava mi duda es ¿qué pasaría si el módulo tienes muchos registros, digamos un millon? Aunque bueno, siempre podemos sacar los 100 primeros, o algo así. Para hacer lo que buscas tendrás que crear tu propio formato de lista, aquí se explica como hacerlo: https://openxava.org/OpenXavaDoc/docs/customizing_es.html#Personalizacion-Editores-Editores+para+formatos+de+lista+%28nuevo+en+v5.7%29...
Hi Sudhakar, No, because nobody asked by GCP IAM. Seems like Azure AD is more used at corporate level, at least amongs our customers. Some customer asked us for SSO with Red Hat Single Sign-On, but not for Google. Anyways, I took note so if more developers ask for it we'll include in future XavaPro versions. Cheers
Hi Dusan: Changing the JS of OpenXava just to solve a case is to a good idea. Just now you have the fortune that i fails, but it's far worse that it works, because the change in the JS code could break some laterl cases that you have not tested. And maybe you users will find. Anytime, you change a single line of OpenXava code you should pass the complete test suite included in the openxavatest project, to be sure that you have not broken OpenXava. For this particular case, why not to hidde the action...
Hi Dusan: Save and delete standard actions from OpenXava could use more than one connection. However, you you do your own action that not extends SaveAction or DeleteActon or Remove...Action, you're going to use the same connection for all action cycle. Remember that if you click again in your action, it could use a different connection that in previous execution. Help others in this forum as I help you.
Hola Mariluz: ¿Qué exactamente lo que quieres conseguir? ¿Quieres que un módulo de OpenXava aparezca dentro de tu Alfresco? ¿O quieres visualizar algo de Alfresco desde dentro de un módulo de OpenXava? Dime exactamente lo que quieres hacer. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Christian: The "control 1..9" is not the label, but the keystroke. All the action with keystroke shows the keystroke in the tooltip. So if you want to remove it, you have to remove the keystroke too. You can do it adding the next xml fragment in your controllers.xml: <controller name="Sections"> <action name="change" class="org.openxava.actions.ChangeSectionAction" keystroke=""/> </controller> However, the use of Control + a number to change section will no longer work. Help others in this forum...
Hi Christian: he JavaScript method triggers both things It could be because in the URL you have the id of the object, something like ?detail=3. In that case you could try to use an IForwardAction that just go to the same module you're now. Anyways, why do you need to reload the page? Help others in this forum as I help you.
Hola Mariluz: Pero en esa entidad solo hay una propiedad coordeanadas. Yo esperaba ver varias propiedades coordenadas o una colección cuyos elementos tuvieran una coordenada, o algo así. ¿De donde saco los otros puntos para ponerlos en el mapa? Ayuda a otros en este foro como yo te ayudo a ti.
Hola Mariluz: Refused to load the image 'http://a.tile.openstreetmap.org/15/16039/12362.png' because it violates the following Content Security Policy directive: "img-src 'self' data: blob: http://{s}.tile.openstreetmap.org/" Puede ser que en el xava.properties añadiera un nuevo proveedor de mapas sin comentar o borrar el anterior. Revisa a ver si es eso, si no lo encuentras pon aquí el contenido de tu xava.properties y lo revisaré. Ayuda a otros en este foro como yo te ayudo a ti.
Hi IB, Collection action must have a viewObject property. That is on that way, because you could create a reusable action to be used in several of your collection, so the action has a way to know what collection it is. To get rid of your error just create a viewObject property in your action, thus: @Getter @Setter String viewObject; But better that this, you can extends your action from CollectionElementViewBaseAction, so the viewObject is already included. And still better extends from CreateNewElementInCollectionAction,...
Hola Juan: En la distribución de XavaPro tienes un archivo install.txt. Sigue sus instrucciones. Por cierto, ¿la versión de la aplicación OpenXava y la versión de XavaPro es la misma? Si no, ¿en qué versión tienes tu aplicación OpenXava y en cual tu distribución XavaPro? Ayuda a otros en este foro como yo te ayudo a ti.
Hola Willian: src/main/webapp/xava/editores/textAreaEditorCustom.jsp Ese es el sitio. Adjunta aquí tu editores.xml, para comprobar si tiene algún error. Y sobre todo pone la traza que se genera en el servidor cuando falla, es ahí donde está la clave. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Dusan, Does Xava can guarantee (and how) that No. Inside a OpenXava action call cycle, in the moment you call to XPersistence.commit() the connection is returned to the pool, and a new one is used from that moment. OpenXava do ti, in SaveAction, for example to refresh the data in UI after saving if you use the resetAfter option in the action. Morever, after the action is executed and before the rendering is done other commit is produced. So well, generally you have the same persistence manager...
Hola Manu: Lo más sencillo es sobrescribir los mensajes estándar poniendolos en tu propio archivos de mensajes en i18n. Por ejemplo, para el caso del patallazo añade la entrada 'required' en tu archivo de mensajes, así: required=No dejes {0} en blanco, es obligatorio en {1} Para ver las entradas que hay disponible puedes mirar y buscar aquí: https://github.com/openxava/openxava/blob/master/openxava/src/main/resources/i18n/Messages_es.properties Si necesitas algo más sofisticado, como quitar un mensaje...
Hola José: De acuerdo, añádelo como una petición. Vamos a intentar que esté lo antes posible, para la 7.3 o 7.4. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Mariluz: Lo que quieres es un único mapa con varios marcadores. Eso actualmente no se puede con el @Coordinates de OpenXava. Por supuesto, te puedes hacer tu propio editor para conseguirlo, pero no viene por defecto. Lo cierto es que sería interesante añadirlo a OpenXava. ¿Me puedes poner aquí las clases de tu módulo? Para conocer me jor tu problema y pensar en formas de implmentar una solución sencilla en OpenXava. Ayuda a otros en este foro como yo te ayudo a ti.
Hi IB, You have to refine the action to choose from the list too. In this way, you can get the value you want from the list and update acordly the reference view. For overwriting the choose action you have to indicate your own controller in SearchDrugByWarehouse, thus: public class SearchDrugByWarehouse extends ReferenceSearchAction { public void execute() throws Exception { String warehouseId = getView().getValueString("warehouse.id"); super.execute(); getTab().setModelName("WarehouseInventory");...
Hola Mariluz; ¿Qué limitaciones tiene con respecto a la complejidad de la base de datos? La herramienta que se usa en el tutorial es una herramienta de terceros, no es parte de OpenXava. Se llama Dali y está incluida dentro de Eclipse. No te puedo decir muchos sobre sus limitaciones porque no la conozco. Tendrás que probarla. Aunque mi sensación es que no va a cubrir casos muy complejos, solo te será útil para la creación inicial de las clases, a partir de ahí tendrás que depurar tú. Pruébala con...
Hola José: Lo que quieres es ¿que lo incluyamos en una versión nueva de OpenXava o hacerte tu tu propio editor? Ayuda a otros en este foro como yo te ayudo a ti.
Hola JE: Lo he probado, con una @OnChange en un @DescriptionsList de una @ElementCollection, y con la última versión no me pasa como a ti, lo que ocurre es que el foco va al primer elemento de la vista. Lo cual también es mal. Añádelo como un bug con un vínculo a este hilo y lo arreglaremos. He intentando llamar a getView().setFocus() desde la acción al-cambiar para buscar una solución temporal y no ha funcionado. Así que tendrás que esperar a que arreglemos el bug. Ayuda a otros en este foro como...
Hi IB, Surely the problem is because we use the same logic for @Calculation in collection in @ElementCollection and in @OneToMany collection. In @OneToMany collections it must work in that way, because when you add or modify an element the changed is done immediately in database, not as in @ElementCollection case. So yes, you're right. We should modify the logic for the @ElementCollection case, to cover the case when the entity is not saved. Please, add as a bug, so we'll fix in future OpenXava releases....
Hola José: Tienes razón, porque con el formateador lista solo controla la genarción del dato, no de la celda. En CSS no tenemos una forma de que teniendo el id o clase de un elemento se afecte al elemento padre. Pero por fortuna somos programadores, lo que significa que podemos hacer cualquier cosa que imagenimos. Así que esto se puede resolver con un poco de JavaScript. Añade un colorear.js en tu xava/editors/js con un contenido como este: openxava.addEditorInitFunction(function() { $(".color-para-servicio").closest("td").addClass("color-para-servicio");...
Hola José: El problema con el foco en las @ElementCollection se resolvió en la versión 7.2.3. ¿Qué versión de OpenXava estás usando? Ayuda a otros en este foro como yo te ayudo a ti.
Hi Christian, You can use JavaScript. Write an OpenXava action like this: public class RefreshPageAction extends BaseAction implements IJavaScriptPostAction { public void execute() throws Exception { } public String getPostJavaScript() { return "location.reload();"; } } BTW, why do you need to reload the full page? Help others in this forum as I help you.
Hola JE: De vez en cuando se te olvida que no tengo poderes mágicos. ¿Cómo voy a saberlo? Necesito datos. ¿Qué versión de OpenXava estás usando? Pon aquí el código completo, de una de las entidades que va lenta. Puede que sea alguna propiedad calculada. Activa el show_sql en persistence.xml y pon aquí el trozo de log que se genera al pulsar en filtrar en modo lista. Además, también es posible que sea un asunto no relacionado con OpenXava o el código de la aplicación como un problema de latencia entre...
Hi friends, XavaPro 7.2.3 is already available. I invite you to have a look at the announcement: https://www.openxava.org/blog/xavapro-7.2.3-released Cheers
Hola José: cuando se pinte tipoOferta.valor, y en funcion de su valor, se pinte de un color u otro. Justo te he explicado como hace eso, con código incluido. Ayuda a otros en este foro como yo te ayudo a ti.
Hi Rommel: LocalDateTime is not supported yet: https://openxava.org/xavaprojects/o/OpenXava/m/Issue?detail=ff80808186932b040186958a7c810007 If you cannot wait to 7.3, you can create your own editor for LocalDateTime, following these instructions: https://openxava.org/OpenXavaDoc/docs/customizing_en.html Help others in this forum as I help you.
Hola Willian, Pon la excepción que se produce, para saber que está fallando. Aunque al ver lo de XPersistence.getManager() ya veo algo que está mal, lee este hilo: https://sourceforge.net/p/openxava/discussion/437013/thread/90962be0/ Ayuda a otros en este foro como yo te ayudo a ti.
Hi Guillem, OpenXava look for an action called "new" in any of the controllers of the module. Just remove or rename that action. If you don't achieve it put here the declaration of your module in application.xml, and the declaration of the controllers used by your module in controllers.xml. I'll help you. Help others in this forum as I help you.
Hi friends, OpenXava 7.2.3 is already available. I invite you to have a look at the announcement: https://www.openxava.org/blog/openxava-7.2.3-released Cheers
Hola Juan: Claro que sí. Puedes hacer lo que quieras. Por ejemplo, redirecciona desde tu acción a un JSP llamado irse.jsp y en él pon algo así: <%@include file="../xava/imports.jsp"%> <% session.invalidate(); %> <script type="text/javascript" <xava:nonce/>> window.location="/dondetuquieras%>"; </script> O también puedes hacer un acabar.jsp: <% session.invalidate(); %> <b>Se acabo</b> Ayuda a otros en este foro como yo te ayudo a ti.
Hi Ch, No, no. The Module.java is not correct. Those class have a lot of methods that you just have removed. You have to modify the Module.java I attached you above in this file. The one you modified correctly the first time, so you give me me a log output. Do the modification and attach here the output in the log and the complete Module.java you're using. Basically, your proxy works differently that the ones I tried, so I need to know what headers it used, maybe it uses x-forwarded-proto instead...
Hola Juan: Claro, si invalidas la sesion y te quedas donde estás todo va a fallar. Estarías anulando la sesión a mitad del ciclo de ejecución de una acción. Simplemente haz una acción que implemente IForwardAction y redirecciona a /naviox/signOut.jsp Ayuda a otros en este foro como yo te ayudo a ti.
Hola José: Un solución para ese problema es crear un formateador lista para un editor, y aplicarlo a todas las propiedades que que necesiten color. Algo así: <editor name="Colorido" url="textEditor.jsp"> <list-formatter class="org.openxava.test.formatters.ColoridoFormatter"/> <for-stereotype stereotype="COLORIDO" /> </editor> Ojo, si usas editores.xml (en lugar de editors.xml) tendrás que poner el XML en español Ahora en tu entidad: public class MyEntity { @Stereotype("COLORIDO") String tipo; } En...
Hi Robson: So the solution was use the underlaying JDBC connection. In this way you avoid the flush/commit recursion because of JPA, but the isolation problems should persist, I think. Thanks a lot for put your solution. It will be useful for others with your problem, for sure.
Hola José: View tiene dos métodos addActionForProperty() y removeActionForProperty(). ¿Los has probado? removeActionForProperty() solo quita acciones añadidas previamente con addActionForProperty(). Esto permite añadir y quitar acciones por código. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Alberto: La acción la veo bien. Para eso puedes sobrescribir la acción CRUD.new y la acción XAVA_SEARCH_ACTION. Sin embargo, yo creo que es más sencillo, simplemente marcar la acción como al-iniciar=true, y así se hace la carga sólo una vez, la primera vez que se inicia el módulo. Ayuda a otros en este foro como yo te ayudo a ti.
Hi IB, I'm glad you solved your problem. OpenXava stores the user preferences for the @Tab and @ListProperties in a special folder. Whenever a user visits a tab, the layout is saved for future uses. To reflect your code changes, remove the .openxava folder of you home folder, or the home folder of the user that starts the tomcat. Help others in this forum as I help you.
Hola José: Ya, pero el contador de OpenXava también tiene que salir, porque es una característica pedida expresamente por un patrocinador principal de OpenXava, así que no la puedo quitar. Sin embargo sí que puedes quitar el contador que pone OpenXava con CSS. Ayuda a otros en este foro como yo te ayudo a ti.
Hola Manu: He probado tu código original y funciona perfectamente. Es decir, sí que obtiene la fecha. Es decir, he hecho un proyecto nuevo y copiado tu código para Servicios, Responsables, ResponsablesServicios y BuscarServiciosDesdeResponsables. Además, he copiado tu controlador a mi controladores. Solamente he añadido un print, dejando tu acción así: public class BuscarServiciosDesdeResponsables extends ReferenceSearchAction{ public void execute() throws Exception { View respserv = getPreviousView().getSubview("responsablesservicios");...
Hi IB, Try to add mappedBy to @OneToOne_ public class GeneralConsent extends Identifiable { @OneToOne(fetch = FetchType.LAZY, mappedBy="generalConsent") @ReferenceView("Simple") @Required Patient patient; Note the mappedBy="generalConsent" I added. Help others in this forum as I help you.
Hola Gregorio: Si funciona bien con OpenXava 7.2.2, pueden ser dos cosas: Que sea un bug arreglado entre la 6.6.2 y la 7.2.2, o Que sean los permisos asignados al rol con XavaPro. Para averiguarlo, puedes crear una aplicación con OpenXava 6.6.1 plano y llano. Ayuda a otros en este foro como yo te ayudo a ti.
Hola José: Puede que esté relacionado con algún bug resuelto. Lo que veo en la imagen es que el contador de OpenXava es el bueno. Simplemente pon tu código así: getView().getSectionView(Albaran.SECC_TRANSPORTE).setTitle("TRANSPORTE"); Sin el contador. Ayuda a otros en este foro como yo te ayudo a ti.
Hola José: Ya lo probé e iba mal. Además,muchas veces las consultas de modo lista en escritorio son pesadas. Fíjate que el propio Google requiere que pulse ENTER. De todas formas añadelo como petición y lo volveremos a probar, a lo mejor ahora, en el 2024, va mejor. Siempre lo podemos poner como una opción de configuración en xava.properties. Ayuda a otros en este foro como yo te ayudo a ti.