Are you using RFHUtil but looking for some alternatives for
Editing the message on the fly
PrettyPrint XML/JSON messages
List All queue details with human understandable format
Purge selective messages
Move messages from one queue manager to another
Move selective messages
Create Queue
Queue Properties
Search Queues
Read message from two different queue from the same window
Get description of the MQ Return Code
Trigger N messages at a time for load testing
And many more
Yes. We were also looking for the same and so built a tool to help you improve your productivity and lessen the development/testing time. This tool has most of the sought features available in RFHUtil. Here is the video demonstrating the features and how to use this tool.
This is tool is a web-based tool and so works on all platforms. All you need is to run the below command and open a browser,type localhost:8080
java -jar mqedit-1.0-SNAPSHOT.jar
Main Page
You can put all your queue manager configuration details like in a text file and put them in your user’s directory
IIBv10QMGR;LOCALHOST;1414;SYSTEM.DEF.SVRCONN
To purchase this software, please contact us at support@vaithu.com.
For immediate response, you can WhatsApp us at +1 6123058684.
This is my another post in learning my Vaadin journey through Holon Platform. There is already an example here https://vaadin.com/learn/tutorials/dynamic-web-forms-with-validation-in-java explaining the concepts but I just want to mimic the same so that I can learn more about the Holon Platform APIs myself.
Here is the simplified code for the Dynamic WebForm example of SnackOrder
Holon-Platform works on Properties. So, it is always best to have all your definitions modeled in an interface like here
import com.holonplatform.core.Validator;
import com.holonplatform.core.datastore.DataTarget;
import com.holonplatform.core.property.BooleanProperty;
import com.holonplatform.core.property.NumericProperty;
import com.holonplatform.core.property.PropertySet;
import com.holonplatform.core.property.PropertyValueConverter;
import com.holonplatform.core.property.StringProperty;
/**
* Product property model
*/
public interface Product {
public static final NumericProperty<Long> ID = NumericProperty.longType("id").message("Id");
public static final StringProperty SKU = StringProperty.create("sku");
public static final StringProperty DESCRIPTION = StringProperty.create("description").message("Description");
public static final StringProperty CATEGORY = StringProperty.create("category");
public static final NumericProperty<Double> UNIT_PRICE = NumericProperty.doubleType("price")
// not negative value validator
.withValidator(Validator.notNegative());
public static final BooleanProperty WITHDRAWN = BooleanProperty.create("withdrawn")
// set a property value converter from Integer model type to Boolean
.converter(PropertyValueConverter.numericBoolean(Integer.class));
// Product property set
public static final PropertySet<?> PROPERTY_SET = PropertySet
.builderOf(ID, SKU, DESCRIPTION, CATEGORY, UNIT_PRICE, WITHDRAWN).withIdentifier(ID).build();
// "products" DataTarget
public static final DataTarget<?> TARGET = DataTarget.named("products");
}
Note that, every table should have a primary key and if there is none, you cannot update the row using Holon-Platform and if you try to do it, this is the message you would see
2020-07-16 10:16:36.842 WARN 32220 — [nio-8080-exec-4] com.holonplatform.datastore.jdbc : (Save operation) Cannot obtain the primary key for operation [PropertyBoxOperationConfiguration [value=PropertyBox – PROPERTIES: [“transactionId”:java.lang.Long],[“interfaceName”:java.lang.String],[“createTime”:java.time.LocalDateTime] – VALUES: (“transactionId”=1065093643),(“interfaceName”=test),(“createTime”=2020-01-17T08:21:55.983), target=DataTarget [name=Product, type=java.lang.String]]]: an INSERT operation will be performed by default
As it says, it will be doing INSERT operation instead of UPDATE. So, ensure there is a primary key and if not, tell the PropertySet which column to use as the primary key (you can combine multiple columns to make them as primary key if needed) like
public static final PropertySet<?> PROPERTY_SET = PropertySet.builderOf(TRANSACTIONID,INTERFACENAME,CREATETIME)
.withIdentifier(TRANSACTIONID)
.build();
Now, we can create any components binding using this model definition. Let’s first see how to create a grid using Holon Platform Listing API
So, how can we convert a column values to a component like button or span? Here is an example which shows, how to convert the Withdrawn property into a span component. The steps to do are
Include @JsModule(“@vaadin/vaadin-lumo-styles/badge.js”)
Include @CssImport(value = “./styles/shared-styles.css”, include = “lumo-badge”)
Add a new method componentRenderer to the fluent builder PropertyListing like
Now is the time to implement ItemClickListener. I feel it is the better way to show the details or any other action to the user when he/she clicks the row. Here I want to show a dialog window which will have the row values in a form and allow the user to edit the same. Once the YES button is clicked, the editing item is saved to the backend and the row is refreshed to show the new values. The code to achieve this function is
When there are thousands of records available in a database table, how do we load them lazily into our grid? The Holon-Platform datastore API makes everything super simple and here is the code to justify that.
Do you’ve any other API to make this so simple and that works like a charm? I bet, NO.
Is there any difference in the page loading or user see any difference? I did some local testing and it worked perfectly fine. I’ll have to do some load test to authenticate my above statement.
Next,let us see how to remove a row from the grid. The Datastore API has method to remove an item and the code to use is
datastore.delete(Product.TARGET,properties);
Since it is a virtual column, we can use the same method withComponentColumn and add it to the grid like
Are you wondering what about the validation? What if someone edits the row with invalid values? Does Holon Platform automatically take care of the validations already defined in the model file? Of course, YES. Here is an example to show the validation error when category property goes beyond 10 char limit. Not only this, it also takes care of preventing invalid values entered by the user. For example, if user tries to enter characters in place of numerals, it is automatically prevented by the framework. No, explicit code validation is required.
public static final StringProperty CATEGORY = StringProperty.create("category")
.withValidator(Validator.max(10))
;
Next, let’s see how to set some footer and a value to it. If you look into the column UNIT_PRICE, the values are in numeric. So, obviously we want to the total of all Product’s UNIT_PRICE. Here is the code to set footer
What if user deletes a product? How can the footer show the updated value? To set the footer accordingly, we need first get the footer cell and then set the value like
I thought it is hard to change the themes on the fly but after looking into a sample, there is a simplest way to achieve that. So, here is the code which changes from Dark mode to Light and vice versa.
Here is an example which explains how Vaadin Form works. I’d like to show the same using Holon Platform. This is more simple, less code and easy to understand.
First, we need to create an interface with all Form fields and its validators.
import com.holonplatform.core.Validator;
import com.holonplatform.core.property.BooleanProperty;
import com.holonplatform.core.property.PropertySet;
import com.holonplatform.core.property.StringProperty;
public interface SignUp {
public static final StringProperty FIRSTNAME = StringProperty.create("firstname")
.message("First Name")
.withValidator(Validator.min(3))
.withValidator(Validator.notNull())
;
public static final StringProperty LASTTNAME = StringProperty.create("lastname")
.message("Last Name")
.withValidator(Validator.min(3))
.withValidator(Validator.notNull())
;
public static final StringProperty USRHANDLE = StringProperty.create("userhandle")
.message("User Handle")
.withValidator(Validator.min(3))
.withValidator(Validator.notNull())
;
public static final StringProperty PWD1 = StringProperty.create("password1")
.message("Wanted Password")
.withValidator(Validator.min(3))
.withValidator(Validator.notNull())
;
public static final StringProperty PWD2 = StringProperty.create("firstname")
.message("Password again")
.withValidator(Validator.min(3))
.withValidator(Validator.notNull())
;
public static final StringProperty EMAIL = StringProperty.create("email")
.message("Email")
.withValidator(Validator.email())
;
public static final BooleanProperty ALLOW_MARKETING = BooleanProperty.create("allow_marketing")
.message("Allow Marketing")
;
public static final PropertySet<?> PROPERTIES = PropertySet.of(FIRSTNAME,LASTTNAME,USRHANDLE,PWD1,PWD2,ALLOW_MARKETING,EMAIL);
}
I prefer Holon Platform Vaadin flow APIs over core Vaadin APIs because of its builder methods. It is easy to chain the methods so where ever possible I’d use Holon Platform. So, here is an example of it for the concepts explained here https://vaadin.com/learn/tutorials/vaadin-quick-start
Yes, I know it is difficult to write CSS styles for a java programmer. All, he can do is, google and copy some styles that fits for him. So, I did the same. Here is the css file for cards.
.card {
/* Add shadows to create the "card" effect */
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
border-radius: 5px; /* 5px rounded corners */
}
/* On mouse-over, add a deeper shadow */
.card:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
/* Add some padding inside the card container */
.container {
padding: 2px 16px;
}
There are several card types available but achieving all from Java is not only super complex but also needs time & patience. So, I wish Vaadin makes some cards components in the future.