I want the system to show only certain location when user login. So I am using @Tab(name="FilterLocation", baseCondition="from DUN d, where d.dunCode = 'N8'") to show only the location with N8 but I think I am missing something for it to work. DUN is the entity and dunCode is the property. Please guide me. Thanks in advance.
Brian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the database table, I have cod_key for MOBILECC and MOBILEAC, both cod_key have own cod_value. For example, cod_value for MOBILECC is "60" and for MOBILEAC is "10 to 19". How can I display only the cod_value for MOBILECC at the property? I tried with
@Tab(name="MOBILECC", baseCondition="${COD_KEY}='MOBILECC'")
@Entity
public class Mobilecc {
...
}
but it is not working. The description list displays all cod_value instead of cod_value for MOBILECC only.
Thanks.
Brian
Last edit: Brian Cheong 2017-03-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to show the list of data for education only, but all data is shown from what I have in the database table. Which part I did wrongly? I am currently trying with:
@Table(name="activity_list")
@Tab(name="EducationOnly", baseCondition="${formType} = '5'")
public class Education {
...
@ManyToOne
@NoCreate
@NoModify
@ReadOnly
@DefaultValueCalculator(value=IntegerCalculator.class, properties=
@PropertyValue(name="value", value="5"))
@JoinColumn(name="TYPE_ID", nullable = false)
@DescriptionsList(descriptionProperties="typeDescription")
private Type formType;
Please note that in my Education property, I have a @DescriptionsList for the formType property. Please guide me.
Thanks.
Brian
Last edit: Brian Cheong 2017-04-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You're right the condition is not shown, surely you're not using the EducationOnly tab in that module. Could you put here the module definition from application.xml?
Help others in this forum as I help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<modulename="Education"><modelname="Education"/><tabname="EducationOnly"/> // To choose the tab for this module
<controllername="Education"/><controllername="DataAccessControl"/></module>
--------- Help others in this forum as I help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I want the system to show only certain location when user login. So I am using @Tab(name="FilterLocation", baseCondition="from DUN d, where d.dunCode = 'N8'") to show only the location with N8 but I think I am missing something for it to work. DUN is the entity and dunCode is the property. Please guide me. Thanks in advance.
Brian
In basecondition just add
@Tab(name="FilterLocation", baseCondition="${dunCode}='N8'")
instead
@Tab(name="FilterLocation", baseCondition="from DUN d, where d.dunCode = 'N8'")
Hi Autade,
In the database table, I have cod_key for MOBILECC and MOBILEAC, both cod_key have own cod_value. For example, cod_value for MOBILECC is "60" and for MOBILEAC is "10 to 19". How can I display only the cod_value for MOBILECC at the property? I tried with
but it is not working. The description list displays all cod_value instead of cod_value for MOBILECC only.
Thanks.
Brian
Last edit: Brian Cheong 2017-03-29
I found the solution of doing it by having a condition for the descriptionslist. Thanks,
Hi Autade,
I want to show the list of data for education only, but all data is shown from what I have in the database table. Which part I did wrongly? I am currently trying with:
Please note that in my Education property, I have a @DescriptionsList for the formType property. Please guide me.
Thanks.
Brian
Last edit: Brian Cheong 2017-04-06
Hi Brian,
Try:
If id the the @Id Type, and it is String.
---------
Help others in this forum as I help you.
Hi Javier,
I have tried with
but it is not working. The typeId is the property with @Id for the entity Type.
Thanks
Brian
Last edit: Brian Cheong 2017-04-11
Hi Brian,
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
Hi Brian,
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
Hi Brian,
Maybe you're not using the EducationOnly tab. Try to put show_sql to true in persistence.xml and have a look at the generated SQLs. It can give you some clue.
Help others in this forum as I help you.
Hi Javier,
The following is the stacktrace of the code:
It seems like the sql still select ALL eventhough I have prompted it to select certain id only. What should I do with it?
Thanks.
Brian
Hi Brian,
You're right the condition is not shown, surely you're not using the EducationOnly tab in that module. Could you put here the module definition from application.xml?
Help others in this forum as I help you.
Hi Javier,
This is the module that I have in application.xml:
Thanks.
Brian
Hi Brian,
Try this for your module definition:
---------
Help others in this forum as I help you.