Create secondary content

Add a secondary content (e.g. languages, skills, character, etc.) onto branch patch/content/secondary (based on feature/body).
PR should include:

Skills block
Experience block template
Experiences
Additional info

Created secondary content and closed issue


MFA Logon Rest API Issues

Hi, we are using a modified version of your site on our webserver to connect to the VBO server.
We have a POC environment which all behaves correctly and a PROD environment where we are having the issues.
We believe that both environments should be installed and configured the same but are seeing the issue only in PROD.
Lots of checks have been made to rule out any networking issues.
I don't think this is an issue with your code as we face the same errors using the swagger UI.
However, I thought I would get in touch and see if you or any other contributors has seen this issue before.
Log file used: C:\ProgramData\Veeam\Backup365\Logs\Veeam.Archiver.REST_xxxx_xx_xx_xx_xx_xx.log
To Reproduce

Use website or Swagger UI (swagger/ui/index#!/Auth/post_v5_token) to connect.
Use grant type:  _urn:ietf:params:oauth:grant-type:jwt-beare_r, client_id and assertion from previous steps.

Expected behaviour
As seen in our POC environment, below log entries for a successful AUTH:
25/02/2022 11:39:19   17 (15524) Connecting to Veeam Backup for Office 365 server at <IP_ADDRESS>:9194...
25/02/2022 11:39:19   18 (16304) Validating certificate chain...
25/02/2022 11:39:19   18 (16304) Certificate chain validation successfully completed.
25/02/2022 11:39:19   18 (16304) Validating certificate claims...
25/02/2022 11:39:19   18 (16304) Certificate claims:
25/02/2022 11:39:19   18 (16304)  Veeam Software

Errors in PROD environment
In PROD however, we see connection failure after 50 seconds, and the same for subsequent retries.
Log excerpt below:
25/02/2022 11:51:57   50 (6768) Connecting to Veeam Backup for Office 365 server at <IP_ADDRESS>:9194...
25/02/2022 11:52:47   50 (6768)  Connection failed
25/02/2022 11:52:47   50 (6768) Error: There was no endpoint listening at net.tcp://<IP_ADDRESS>:9194/ArchiverExchangeServiceOrg that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
25/02/2022 11:52:47   50 (6768) Type: System.ServiceModel.EndpointNotFoundException
25/02/2022 11:52:47   50 (6768) Stack:
25/02/2022 11:52:47   50 (6768)
Server stack trace:
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.CommunicationObject.EndOpen(IAsyncResult result)

Exception rethrown at [0]:
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.CommunicationObject.EndOpen(IAsyncResult result)

Exception rethrown at [1]:
   at Veeam.Engine.Wcf.PrimitiveServiceClient`1.Open(CancellationToken token)
   at Veeam.Archiver.Integration.ArchiverConnector`2.CreateArchiverConnection(TE events, ICertificateValidator certificateValidator, IServiceConnectionConfig connectionConfig, Nullable`1 cancellationToken)
25/02/2022 11:52:47   50 (6768) Connecting to Veeam Backup for Office 365 server at <IP_ADDRESS>:9194...
25/02/2022 11:53:37   50 (6768)  Connection failed

Desktop (please complete the following information):

OS: Windows Server 2019
Browser Chrome
Version VBO Build <IP_ADDRESS>0

Additional context
Full log file attached also.
Veeam.Archiver.REST_2022_02_24_16_18_15.log

Hi,
This looks like an issue within VB365 and is not related to the portal. I would advise opening an official Veeam support case for assistance here as I can't troubleshoot issues within the main application.

Hi,
This looks like an issue within VB365 and is not related to the portal. I would advise opening an official Veeam support case for assistance here as I can't troubleshoot issues within the main application.

Hi Niels,
Thanks for your reply,
I thought as much just wanted to cover all bases.
I shall close this issue now.
Many thanks,
Jordan


[FirebaseCore]: Wasm build crashes on launch in initializeApp

Is there an existing issue for this?

[X] I have searched the existing issues.

Which plugins are affected?
Core
Which platforms are affected?
Web
Description
I compiled an app to Wasm, but it crashes upon launch. I think, this is related to Firebase, but frankly, I'm a bit lost how to drill down the problem (luckily I found the --no-strip-wasm option), so I could at least get some debug symbols.
The relevant dependencies:
Dart SDK 3.5.0-36.0.dev
Flutter SDK 3.22.0-6.0.pre.25
├── cloud_firestore 4.16.1
├── firebase_core 2.29.0

The command to build the app:
flutter build web --wasm --no-strip-wasm

The crash:
JavaScriptError
     at FirebaseCoreWeb.initializeApp inner (http://localhost:8080/main.dart.wasm:wasm-function[15504]:0x279d9e)
    at _awaitHelperWithTypeCheck closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 (http://localhost:8080/main.dart.wasm:wasm-function[2020]:0x14f963)
    at closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 trampoline (http://localhost:8080/main.dart.wasm:wasm-function[2025]:0x14f9ca)
    at _RootZone.runUnary (http://localhost:8080/main.dart.wasm:wasm-function[1228]:0x13afb3)
    at _Future._propagateToListeners (http://localhost:8080/main.dart.wasm:wasm-function[1207]:0x13ab5c)
    at _Future._completeWithValue (http://localhost:8080/main.dart.wasm:wasm-function[1204]:0x13a777)
    at _Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 (http://localhost:8080/main.dart.wasm:wasm-function[1199]:0x13a724)
    at closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline (http://localhost:8080/main.dart.wasm:wasm-function[1202]:0x13a74e)

I tried to make some sense of the of the WAT and I think
(func $FirebaseCoreWeb.initializeApp inner (;15504;) (param $var0 (ref $_AsyncSuspendState_190)) (param $var1 (ref null $#Top)) (param $var2 (ref null $#Top)) (param $var3 (ref null $Object)) (result (ref null $#Top))

is the method where the exception is thrown eventually:
      catch_all
        local.get $var0
        struct.get $_AsyncSuspendState_190 $field5
        call $_JavaScriptError
        call $StackTrace.current
        call $_Completer.completeError
        drop
        br $label8
      end
      unreachable

This might map to this code however, there's no exception handling and there's no mention of JavaScriptError in this project. So it might be automatically generated by the Dart compiler.
Reproducing the issue
I reduced my app to
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
}

and I still get the exception, so, it's definitively that call. There's no root cause, unfortunately.
Firebase Core version
2.29.0
Flutter Version
3.22.0
Relevant Log Output
No response
Flutter dependencies

Expand Flutter dependencies snippet

Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments
Note: The app works just fine without wasm, so it isn't a configuration error.

Thanks for the report, I'm having a look

I was able to compile (flutter build web --wasm) without any issues using the latest flutter versino

Compiling isn't the issue. Running is.

@sma I'm able to run without issue as well using serve for instance, please provide a complete reproduction sample.

Here's a complete example (with the Firebase options redacted):
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  const options = FirebaseOptions(
    apiKey: '<...>',
    appId: '<...>',
    messagingSenderId: '<...>',
    projectId: '<...>',
  );
  await Firebase.initializeApp(options: options);
  runApp(const MaterialApp(home: Scaffold(body: Text('It works!'))));
}

The example works just fine with
$ flutter --version
Flutter 3.22.0-9.0.pre.18 • channel master • https://github.com/flutter/flutter.git
Framework • revision 53cba24de3 (9 hours ago) • 2024-04-11 21:07:19 -0700
Engine • revision 6b37b17099
Tools • Dart 3.5.0 (build 3.5.0-47.0.dev) • DevTools 2.34.1

using firebase_core 2.29.0.
When compiling the file with
flutter build web -t lib/bug.dart --wasm --no-strip-wasm

and using running the app locally with httpd as documented:
cd build/web
dhttpd '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin'

I get this crash in Chrome 123.0.6312.107:
    at FirebaseCoreWeb.initializeApp inner (http://localhost:8080/main.dart.wasm:wasm-function[6839]:0x1175eb)
    at _awaitHelperWithTypeCheck closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 (http://localhost:8080/main.dart.wasm:wasm-function[1764]:0xa9d15)
    at closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 trampoline (http://localhost:8080/main.dart.wasm:wasm-function[1769]:0xa9d7c)
    at _RootZone.runUnary (http://localhost:8080/main.dart.wasm:wasm-function[1028]:0x96ce0)
    at _Future._propagateToListeners (http://localhost:8080/main.dart.wasm:wasm-function[1007]:0x9682c)
    at _Future._completeWithValue (http://localhost:8080/main.dart.wasm:wasm-function[1004]:0x96447)
    at _Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 (http://localhost:8080/main.dart.wasm:wasm-function[999]:0x963f4)
    at closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline (http://localhost:8080/main.dart.wasm:wasm-function[1002]:0x9641e)

I switch on "break on exceptions" in the chrome dev tools and got this, but I'm not sure it's related to the crash:

As already mentioned, this crashes only with WASM, the "normal" JavaScript-Version works as expected, for example in Firefox 124.
I tested the sub expressions from the if and getDefaultAppConfig() returns undefined.
This seems to call this method and somehow the configuration passed in Dart to that Dart method isn't transported to JS via WASM … I'd guess.

If I should guess, I'd say that this code snippet from Firebase_core_web.dart is unable to catch the exception that occurs because there's no default configuration. The code tries to detect a default application before it tries into "manually" set the options.
    if (name == null || name == defaultFirebaseAppName) {
      bool defaultAppExists = false;

      try {
        app = firebase.app();
        defaultAppExists = true;
      } catch (e) {
        // noop
      }

Perhaps, that's a Dart compiler bug? IDK.

Has been fixed in the Dart compiler.

Was this fix part of the latest flutter release 3.22.0 ? I still have the same issue there.

IDK, I'm on master (with Dart 3.5) where it has been fixed.


fetch_access_token() no longer raises OAuthError but HTTPError instead.

Describe the bug
A change introduced in 1.0.0 makes fetch_access_token() return a requests.exceptions.HTTPError instead of an OAuthError.
Tested in Flask integration.
To Reproduce
Run code equivalent to this in a working Flask config.
try:
    token = oauth.myOauth2.fetch_access_token(
        username=request.form.get('username'),
        password=request.form.get('password')
    )
except OAuthError as e:
    if e.description:
        flash(e.description)
        return render_template('login.html')
    raise

Both valid and invalid user/pwd works as expected in 0.15.5. Valid login works in 1.0.0, but invalid raises an HTTPError.
The error response contains what looks like the expected json: {'error': 'invalid_grant', 'error_description': 'INVALID_CREDENTIALS'}
Expected behavior
An OAuthError exception is raised on invalid login.
Environment:

OS: Windows Server 2016
Python Version: 3.8.1
Authlib Version: 0.15.5 / 1.0.0

Additional context
All other packages are up to date pt.
I was advised that this is the correct way to do password grant flow.

Got it, it is raised by resp.raises_for_status().
Thanks for the report.

For what it's worth, the change in oauth2/client.py solved the issue for me.


add tests

Soon we will need tests to ensure the application is working correctly.
I think jest and react-testing-library will be here the most usefull but maybe theres some better tool for react-native.
Research, implement first test, document the decision

no separate tests


Adding mfa screens

Proposed Changes
Fixes #9456
Closes #9456
Resolves #9456

Added a route for Autheticate
Created Autheicate the account page
More?

@ohcnetwork/care-fe-code-reviewers

Merge Checklist

[ ] Add specs that demonstrate bug / test a new feature.
[ ] Update product documentation.
[ ] Ensure that UI text is kept in I18n files.
[ ] Prep screenshot or demo video for changelog entry, and attach it to issue.
[ ] Request for Peer Reviews
[ ] Completion of QA

Summary by CodeRabbit

New Features

Introduced a new authentication route at "/authenticate" for user login.
Added a new Authenticate component that provides a user-friendly authentication interface with multiple login methods.

Accessibility Enhancements

Improved accessibility features, including alt text for images and links.

Closes #9456

Closes #9456

@coderabbitai full review

you can re-open this PR with develop as base branch @AnveshNalimela


Feat: RenderCommand factory

@ronimizy are we using codestyle without additional parentheses when inside block is 1 line?

@ronimizy are we using codestyle without additional parentheses when inside block is 1 line?

yep


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/OPS-E2E-PPE/docs-archive-test

Docs Build status updates of commit d1f34db:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-09-25-12-40-16 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-09-25-12-40-16

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


try switching from glpk to highs, see what happens

closes #57

(Not to be merged until HiGHS is proven less than or equally as surprising as GLPK.)

So there's an issue with the solution of MMDF, looks to be quite a bit off the expected solution. Maybe that's biased by us comparing from previous solvers, but the difference is MAN WAY OFF all acceptable tolerances.
As the other issue HiGHS is for whatever reason verbose by default (rule of silence where?!). Can that be somehow disabled globally so that we don't need to put an extra solver setting to literally all analysis function calls?

You can use JuMP.set_silent(model) or optimizer = MOI.OptimizerWithAttributes(HiGHS.Optimizer, MOI.Silent() => true).
You could probably also add a ; silent flag as well. Different solvers have different defaults.
For the error: what are the objective values of the two solutions? Is it mmdf_solution.min_driving_force ? If so, HiGHS is finding a solution with that objective value. Do you have evidence that the [-6, -5] solution is unique? Perhaps there are multiple (near) optimal solutions?

@odow ok that sounds like we will have some default settings applied to all problems, and probably have an explicit "unsilence" setting instead.
Re the value, the "min driving force" is the maximized objective (it's called "Maximize the Minimal Driving Force" or so). Might not be a HiGHS problem, the code is new, maybe we messed up something entirely different. The range is used there instead of tolerance (I didn't even want to pretend we have an exact number there).

I see what you mean by the "minimal surprise" rule. Looking at the logging for the MMDF model, there's nothing to suggest that HiGHS is concerned about the solution process (and it's just a small LP) so the suggestion of @odow about non-uniqueness is the most likely reason, and the objective function test is wise.
More generally, it is common for LPs to have non-unique solutions, so COBREXA folk can't expect HiGHS to get the same solution as GLPK.

More generally, it is common for LPs to have non-unique solutions, so COBREXA folk can't expect HiGHS to get the same solution as GLPK.

yeah I know. The tested value should be the objective value, which should be same (sans precision) for all solvers, right?
Anyway might be the case that simply the test is wrong. I'm in summer mode now, will try to have a deeper look asap :D

I notice that this is "log_concentrations":
https://github.com/COBREXA/COBREXA.jl/blob/6134fa6e5ac22e453ceb7fa2f218dfaa9deeedfe/docs/src/examples/05c-mmdf.jl#L124
Does this mean the primal solution is between 1e-6 and 1e-5? If so, that is close to HiGHS' default feasibility tolerance of 1e-7, and the value of -13 is essentially "zero".
I would strongly encourage you to reformulate your models to keep non-zero primal values above 1e-4 or so.

@odow ah OK issue solved, the test is for non-objective value. As I said previously, currently in summer mode with a whimsy cellphone, didn't notice this issue 😅
(maybe we should actually abstract out the solver package and test at least 2 different ones :D )
The concentrations are logarithmized already, the values that the solvers see are just the exponents (ie. relatively sane scale).

TODO: to fix the test while keeping it sane let's demonstrate concentration variability analysis in this


HIVE-26017 : Insert with partition value containing colon and space is creating partition having wrong value.

…

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

+1, Looks good to me


WE-703 show all jobs as admin

Fixes
This pull request fixes WE-703
Description
Add a toggle in jobs view only in msalEnabled mode for users with the 'admin' role.
The toggle allows browsing all job infos stored on the server, regardless of the user.
Type of change

New feature (non-breaking change which adds functionality)

Impacted Areas in Application

Frontend, API

Checklist:
Please tick all the boxes or remove the ones that aren't needed and explain why
Communication

[x] PR is related to an issue
[ ] I have made corresponding changes to the documentation

Code quality

[x] Code follows the style guidelines
[x] I have self-reviewed my code
[x] No new warnings are generated

Test coverage

[x] Existing tests pass
[ ] New code is covered by passing tests

Further comments
Should users with the 'developer' role also be allowed to view all jobs to ease debugging?

Should users with the 'developer' role also be allowed to view all jobs to ease debugging?
Yes I agree that would be useful 👍


jsf 2.3 User Signup not working

Hello I need Help I have the definitive guide to jsf 2.3 but I can not find more details about user sign up process and its bean. your imediate help will be highly appriciated.

<ui:composition template="/WEB-INF/templates/page.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"

<ui:define name="content">
	<h:form id="signup">
		<fieldset>
			<h:outputLabel for="email" value="#{text['label.email']}" />
			<h:inputText id="email" required="true" value="#{signup.email}" />
			<h:message for="email" styleClass="message" />

			<h:commandButton id="submit" action="#{signup.submit}" value="#{text['label.signup']}" />
			<h:message for="signup" styleClass="message" />
		</fieldset>
	</h:form>
</ui:define>

</ui:composition>
no bean for this page are refered

Hi @msafiri1, thanks for raising an issue. Please make sure to properly format your code examples and don't open two issues (https://github.com/rieckpil/blog-tutorials/issues/6) for the same problem in parallel. This makes it hard for me to help you.
In addition, please provide more information about your application server, Java EE version, Java version, Maven project, etc.
As this is not directly related to a blog post of mine, I can invest some time to help you if you properly format everything and give more information about the context. For faster support, make sure to also post this issue on StackOverflow
PS: I've closed your second issue and please update this one.

I have implements using
https://javatutorial.net/glassfish-form-based-authentication-example
Please advise how to add other user roles since it has only user role
On Thu, Nov 14, 2019 at 8:03 AM Philip Riecks<EMAIL_ADDRESS>wrote:

Hi @msafiri1 https://github.com/msafiri1, thanks for raising an issue.
Please make sure to properly format your code examples and don't open two
issues (#6 https://github.com/rieckpil/blog-tutorials/issues/6) for the
same problem in parallel. This makes it hard for me to help you.
In addition, please provide more information about your application
server, Java EE version, Java version, Maven project, etc.
As this is not directly related to a blog post of mine, I can invest some
time to help you if you properly format everything and give more
information about the context. For faster support, make sure to also post
this issue on StackOverflow https://stackoverflow.com/
PS: I've closed your second issue and please update this one.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZDNHOEWEJDKHPCSKBLQTTS27A5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEAWGPA#issuecomment-553739068,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZF3AUJATDR4UBL2VHDQTTS27ANCNFSM4JMUDXKQ
.

Hi @msafiri1 as I am not the author of this article I can just gues how to achieve this.
The article says the following for roles

The field groupname is used to give a role to given user. This table is a mapping table with user id mapped to some role. To keep this example simple, all accounts created in this tutorial will have the “users” role. You can add more roles if you need to. Roles are not predefined, you can name them as you like. The difference between the roles comes with your implementation. For example if you have “administrator” role, you will want to give it more privileges than “users”. You have to restrict the one role and give more options to the other one programatically , managing this in your own code.

So I assume you just need more rows in the user_groups table

does that mean i dont need to add the users in the registration part like
having the dropdown section where users will be selecting there roles as
admin, user and many others
On Sat, Nov 16, 2019 at 11:33 AM Philip Riecks<EMAIL_ADDRESS>wrote:

Hi @msafiri1 https://github.com/msafiri1 as I am not the author of this
article I can just gues how to achieve this.
The article says the following for roles
The field groupname is used to give a role to given user. This table is a
mapping table with user id mapped to some role. To keep this example
simple, all accounts created in this tutorial will have the “users” role.
You can add more roles if you need to. Roles are not predefined, you can
name them as you like. The difference between the roles comes with your
implementation. For example if you have “administrator” role, you will want
to give it more privileges than “users”. You have to restrict the one role
and give more options to the other one programatically , managing this in
your own code.
So I assume you just need more rows in the user_groups table
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZFGYXF3DJI4PFYQZQTQT647TA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHNQTQ#issuecomment-554621006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZCHOF6QJQKSQJXMHKDQT647TANCNFSM4JMUDXKQ
.

That depends if you want your users to select their roles for themselves or only assign them the user role. With the first approach, you can add a dropdown to the registration page and let the user pick the role he wants to have otherwise just assign them the user role and if some of the users want to be an admin you have to manually adjust this

Well, its just unfortunate you have responded late but I know you might be
busy with other tasks, Though your implementation has all what i want in my
project except that I am facing many challenges when trying to implement
it, the other problem I think its because am using jsf primefaces and you
are using omnifaces
On Sat, Nov 16, 2019 at 11:37 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

does that mean i dont need to add the users in the registration part like
having the dropdown section where users will be selecting there roles as
admin, user and many others
On Sat, Nov 16, 2019 at 11:33 AM Philip Riecks<EMAIL_ADDRESS>wrote:

Hi @msafiri1 https://github.com/msafiri1 as I am not the author of
this article I can just gues how to achieve this.
The article says the following for roles
The field groupname is used to give a role to given user. This table is a
mapping table with user id mapped to some role. To keep this example
simple, all accounts created in this tutorial will have the “users” role.
You can add more roles if you need to. Roles are not predefined, you can
name them as you like. The difference between the roles comes with your
implementation. For example if you have “administrator” role, you will want
to give it more privileges than “users”. You have to restrict the one role
and give more options to the other one programatically , managing this in
your own code.
So I assume you just need more rows in the user_groups table
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZFGYXF3DJI4PFYQZQTQT647TA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHNQTQ#issuecomment-554621006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZCHOF6QJQKSQJXMHKDQT647TANCNFSM4JMUDXKQ
.

oooh no we dont want to manually if am to continue with your
implementation can it take me many hrs? are you around to help whenever am
stuck?
On Sat, Nov 16, 2019 at 11:41 AM Philip Riecks<EMAIL_ADDRESS>wrote:

That depends if you want your users to select their roles for themselves
or only assign them the user role. With the first approach, you can add a
dropdown to the registration page and let the user pick the role he wants
to have otherwise just assign them the user role and if some of the users
want to be an admin you have to manually adjust this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZHODISC2KHZFHBVCIDQT653JA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHNUVI#issuecomment-554621525,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZCTCW627NK52WVIGP3QT653JANCNFSM4JMUDXKQ
.

the following is what I have done in my usergroup table
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="usergroup")
public class Usergroup implements Serializable {
private static final long serialVersionUID =<PHONE_NUMBER>986169065L;
public static final String USERS_GROUP = "users";
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";
@Id
@Column(name="username", nullable=false, length=255)
private String username;
@Column(name="groupname", nullable=false, length=32)
private String groupname;
public Usergroup() {
}

I have added  the following roles
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";
in addition to the first one below
public static final String USERS_GROUP = "users";
now in my EJB the following is the code
I have created the following objects
Usergroup usergroup2=new Usergroup();
usergroup2.setUsername(user.getEmail());
usergroup2.setGroupname(usergroup.ADMIN_GROUP);
            Usergroup usergroup3=new Usergroup();
            usergroup3.setUsername(user.getEmail());
            usergroup3.setGroupname(usergroup.SC_GROUP);

            Usergroup usergroup4=new Usergroup();
            usergroup4.setUsername(user.getEmail());
            usergroup4.setGroupname(usergroup.CEB_GROUP);

in addition to the first one below
Usergroup usergroup = new Usergroup();
usergroup.setUsername(user.getEmail());
usergroup.setGroupname(usergroup.USERS_GROUP);
now I was trying to create a condtion as below
if(user.equals(usergroup))
em.persist(user);
em.persist(usergroup);
if(user.equals(usergroup2))
em.persist(user);
em.persist(usergroup2);
if(user.equals(usergroup3))
em.persist(user);
em.persist(usergroup3);
if(user.equals(usergroup4));
em.persist(user);
em.persist(usergroup3);
return user;
so that if the user falls in one of the following objects , then should be
added to the database , the full code below
/*

To change this license header, choose License Headers in Project
Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
package com.cims2019EJB;

import com.cims2019SecurityAuthenticationUtils.AuthenticationUtils;
import com.cims2019Entity.User;
import com.cims2019Entity.Usergroup;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*

@author Emmnauel Msafri Phiri
*/
@Named(value="roles")
@Stateless
public class UserEJB{
@PersistenceContext(unitName="com.CardManager-01_CARD_MANAGEMENT_2019_war_1.0PU")
private EntityManager em;
/public static final String USERS_GROUP = "users";
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";/
public User createUser(User user) {
try {
user.setPassword(AuthenticationUtils.encodeSHA256(user.getPassword()));
} catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
e.printStackTrace();
}
Usergroup usergroup = new Usergroup();
usergroup.setUsername(user.getEmail());
usergroup.setGroupname(usergroup.USERS_GROUP);
         Usergroup usergroup2=new Usergroup();
         usergroup2.setUsername(user.getEmail());
         usergroup2.setGroupname(usergroup.ADMIN_GROUP);

         Usergroup usergroup3=new Usergroup();
         usergroup3.setUsername(user.getEmail());
         usergroup3.setGroupname(usergroup.SC_GROUP);

         Usergroup usergroup4=new Usergroup();
         usergroup4.setUsername(user.getEmail());
         usergroup4.setGroupname(usergroup.CEB_GROUP);

         if(user.equals(usergroup))

em.persist(user);
em.persist(usergroup);
if(user.equals(usergroup2))
em.persist(user);
em.persist(usergroup2);
if(user.equals(usergroup3))
em.persist(user);
em.persist(usergroup3);
if(user.equals(usergroup4));
em.persist(user);
em.persist(usergroup3);
return user;
}
public User findUserById(String username) {
TypedQuery query = em.createNamedQuery("findUserByUsername",
User.class);
query.setParameter("username", username);
User user = null;
try {
user = query.getSingleResult();
} catch (Exception e) {
//getSingleResult throws NoResultException in case there is no user in DB
//ignore exception and return NULL for user instead
}
return user;
}
}

On Sat, Nov 16, 2019 at 11:45 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

oooh no we dont want to manually if am to continue with your
implementation can it take me many hrs? are you around to help whenever am
stuck?
On Sat, Nov 16, 2019 at 11:41 AM Philip Riecks<EMAIL_ADDRESS>wrote:

That depends if you want your users to select their roles for themselves
or only assign them the user role. With the first approach, you can add
a dropdown to the registration page and let the user pick the role he wants
to have otherwise just assign them the user role and if some of the
users want to be an admin you have to manually adjust this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZHODISC2KHZFHBVCIDQT653JA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHNUVI#issuecomment-554621525,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZCTCW627NK52WVIGP3QT653JANCNFSM4JMUDXKQ
.

and the following is my jsf page

Register

Create new account

Position:

E-Mail:

Password:

Confirm
password:
value="#{registerView.confirmPassword}" required="true"
requiredMessage="Please confirm your
password">
</h:inputSecret>
<h:commandButton
action="#{registerView.register()}" value="Register"></h:commandButton>
                </h:panelGrid>
            </h:panelGrid>
        </h:form>

        <h:link value="I already have an account" outcome="login.xhtml"

/>

</h:body>

On Sat, Nov 16, 2019 at 11:51 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

the following is what I have done in my usergroup table
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="usergroup")
public class Usergroup implements Serializable {
private static final long serialVersionUID =<PHONE_NUMBER>986169065L;
public static final String USERS_GROUP = "users";
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";
@Id
@Column(name="username", nullable=false, length=255)
private String username;
@Column(name="groupname", nullable=false, length=32)
private String groupname;
public Usergroup() {
}

I have added  the following roles
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";
in addition to the first one below
public static final String USERS_GROUP = "users";
now in my EJB the following is the code
I have created the following objects
Usergroup usergroup2=new Usergroup();
usergroup2.setUsername(user.getEmail());
usergroup2.setGroupname(usergroup.ADMIN_GROUP);
            Usergroup usergroup3=new Usergroup();
            usergroup3.setUsername(user.getEmail());
            usergroup3.setGroupname(usergroup.SC_GROUP);

            Usergroup usergroup4=new Usergroup();
            usergroup4.setUsername(user.getEmail());
            usergroup4.setGroupname(usergroup.CEB_GROUP);

in addition to the first one below
Usergroup usergroup = new Usergroup();
usergroup.setUsername(user.getEmail());
usergroup.setGroupname(usergroup.USERS_GROUP);
now I was trying to create a condtion as below
if(user.equals(usergroup))
em.persist(user);
em.persist(usergroup);
if(user.equals(usergroup2))
em.persist(user);
em.persist(usergroup2);
if(user.equals(usergroup3))
em.persist(user);
em.persist(usergroup3);
if(user.equals(usergroup4));
em.persist(user);
em.persist(usergroup3);
return user;
so that if the user falls in one of the following objects , then should be
added to the database , the full code below
/*

To change this license header, choose License Headers in Project
Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
package com.cims2019EJB;

import com.cims2019SecurityAuthenticationUtils.AuthenticationUtils;
import com.cims2019Entity.User;
import com.cims2019Entity.Usergroup;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*

@author Emmnauel Msafri Phiri
*/
@Named(value="roles")
@Stateless
public class UserEJB{

@PersistenceContext(unitName="com.CardManager-01_CARD_MANAGEMENT_2019_war_1.0PU")
private EntityManager em;
/public static final String USERS_GROUP = "users";
public static final String ADMIN_GROUP = "admin";
public static final String SC_GROUP = "sc";
public static final String CEB_GROUP = "ceb";/
public User createUser(User user) {
try {
user.setPassword(AuthenticationUtils.encodeSHA256(user.getPassword()));
} catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
e.printStackTrace();
}
Usergroup usergroup = new Usergroup();
usergroup.setUsername(user.getEmail());
usergroup.setGroupname(usergroup.USERS_GROUP);
            Usergroup usergroup2=new Usergroup();
            usergroup2.setUsername(user.getEmail());
            usergroup2.setGroupname(usergroup.ADMIN_GROUP);

            Usergroup usergroup3=new Usergroup();
            usergroup3.setUsername(user.getEmail());
            usergroup3.setGroupname(usergroup.SC_GROUP);

            Usergroup usergroup4=new Usergroup();
            usergroup4.setUsername(user.getEmail());
            usergroup4.setGroupname(usergroup.CEB_GROUP);

            if(user.equals(usergroup))

em.persist(user);
em.persist(usergroup);
if(user.equals(usergroup2))
em.persist(user);
em.persist(usergroup2);
if(user.equals(usergroup3))
em.persist(user);
em.persist(usergroup3);
if(user.equals(usergroup4));
em.persist(user);
em.persist(usergroup3);
return user;
}
public User findUserById(String username) {
TypedQuery query = em.createNamedQuery("findUserByUsername",
User.class);
query.setParameter("username", username);
User user = null;
try {
user = query.getSingleResult();
} catch (Exception e) {
//getSingleResult throws NoResultException in case there is no user in DB
//ignore exception and return NULL for user instead
}
return user;
}
}

On Sat, Nov 16, 2019 at 11:45 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

oooh no we dont want to manually if am to continue with your
implementation can it take me many hrs? are you around to help whenever am
stuck?
On Sat, Nov 16, 2019 at 11:41 AM Philip Riecks<EMAIL_ADDRESS>wrote:

That depends if you want your users to select their roles for themselves
or only assign them the user role. With the first approach, you can add
a dropdown to the registration page and let the user pick the role he wants
to have otherwise just assign them the user role and if some of the
users want to be an admin you have to manually adjust this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZHODISC2KHZFHBVCIDQT653JA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHNUVI#issuecomment-554621525,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZCTCW627NK52WVIGP3QT653JANCNFSM4JMUDXKQ
.

me using Omnifaces shouldn't be the problem. PrimeFaces is more a UI component library whereas Omnifaces is a JSF utility library, not a JSF UI/component library.
This not formatted code here in the issue makes it hard for me to help you. Please upload your full project (if possible) to GitHub and send me the link otherwise it's too tidious

closed due to inactivity of the creator of the issue

ok
On Mon, Dec 2, 2019 at 7:38 AM Philip Riecks<EMAIL_ADDRESS>wrote:

closed due to inactivity of the creator of the issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZGHJT35T6YNO5LBZHTQWSNNHA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFSJKLY#issuecomment-560239919,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZBHQJVTATSIAHF5IN3QWSNNHANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

Filip I want to learn simpler way to audit two database tables in java
using jsf on front end
On 2 Dec 2019 8:58 am, "Msafiri phiri"<EMAIL_ADDRESS>wrote:

ok
On Mon, Dec 2, 2019 at 7:38 AM Philip Riecks<EMAIL_ADDRESS>wrote:

closed due to inactivity of the creator of the issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5?email_source=notifications&email_token=ADZGFZGHJT35T6YNO5LBZHTQWSNNHA5CNFSM4JMUDXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFSJKLY#issuecomment-560239919,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZBHQJVTATSIAHF5IN3QWSNNHANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

What do you exactly mean by auditing two database tables? If you want to audit on your JPA entities I can recommend Hibernate Envers.
If you are looking for  a solution to make CRUD operations on a database table using JSF, consider reading the following blog posts:

https://rieckpil.de/howto-create-nice-looking-jsf-2-3-applications-with-primefaces-7-0/
https://rieckpil.de/howto-simple-crud-table-with-jsf-2-3-and-primefaces/

But my project is using eclipse link how easily can I implement it please
help?
On Tue, Apr 28, 2020 at 10:41 PM Philip Riecks<EMAIL_ADDRESS>wrote:

What do you exactly mean by auditing two database tables? If you want
to audit on your JPA entities I can recommend Hibernate Envers
https://docs.jboss.org/envers/docs/.
If you are looking for a solution to make CRUD operations on a database
table using JSF, consider reading the following blog posts:

https://rieckpil.de/howto-create-nice-looking-jsf-2-3-applications-with-primefaces-7-0/
https://rieckpil.de/howto-simple-crud-table-with-jsf-2-3-and-primefaces/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-621001758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZHTOT3LMOZBTOSDPGDRO64XDANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

I have no real experience with doing such things with EclipseLink, but quickly found the following:

https://stackoverflow.com/questions/5223201/hibernate-envers-for-eclipselink-entity-auditing

I guess there is no ready-to-use library for EclipseLink and you have to write it for yourself.

https://javatutorial.net/glassfish-form-based-authentication-example
Please also check via the above given link, though it might not be your
work but maybe you can help out I want to automatically update the
groupcolumn soon after I update the user table full code as below:
/*

To change this license header, choose License Headers in Project
Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
package com.cims2019Entity;

/**
*

@author Emmanuel Msafiri Phiri
*/
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
//import javax.xml.bind.annotation.XmlRootElement;

@Entity
@NamedQueries({
@NamedQuery(name = "findUsergroupByUsername", query = "SELECT u FROM
Usergroup u WHERE u.username = :username"),
//    @NamedQuery(name = "findAll", query = "SELECT u FROM Usergroup u"),
@NamedQuery(name = "findUsergroupBygroupname", query = "SELECT u FROM
Usergroup u WHERE u.groupname = :groupname")
})
@Table(name = "usergroup")
//@XmlRootElement
public class Usergroup implements Serializable {
private static final long serialVersionUID =<PHONE_NUMBER>986169065L;
public static final String ADMIN_GROUP = "admin";
public static final String STANDARDUSER_GROUP = "standardUser";
public static final String ZOMBA_GROUP = "zomba";
public static final String CEB_GROUP = "ceb";
public static final String BALAKA_GROUP = "Balaka";
public static final String CAPITALCITY_GROUP = "CapitalCity";
public static final String CHICHIRI_GROUP = "Chichiri";
public static final String CROSSROADS_GROUP = "Crossroads";
public static final String CUSTOMSROAD_GROUP = "CustomsRoad";
public static final String GATEWAY_GROUP = "GateWay";
public static final String HENDERSONSTREET_GROUP = "HendeersonStreet";
public static final String KIA_GROUP = "Kia";
public static final String KARONGA_GROUP = "Karonga";
public static final String KASUNGU_GROUP = "Kasungu";
public static final String LILONGWE_GROUP = "Lilongwe";
public static final String LIWONDE_GROUP = "Liwonde";
public static final String MANGOCHI_GROUP = "Mangochi";
public static final String MCHINJI_GROUP = "Mchinji";
public static final String MPONERA_GROUP = "Mponera";
public static final String MULANJE_GROUP = "Mulanje";
public static final String MWANZA_GROUP = "Mwanza";
public static final String MZIMBA_GROUP = "Mzimba";
public static final String NCHALO_GROUP = "Nchalo";
public static final String NTHEU_GROUP = "Ntheu";
public static final String SALIMA_GROUP = "Salima";
public static final String SOUTHEND_GROUP = "SouthEnd";
public static final String THYOLO_GROUP = "Thyolo";
public static final String VICTORIAAVENUE_GROUP = "VictoriaAvenue";
public static final String BALAKAAUTHORISER_GROUP = "Balakaauthoriser";
public static final String ZOMBAAUTHORISER_GROUP = "zomba";
public static final String CAPITALCITYAUTHORISER_GROUP =

"CapitalCityauthoriser";
public static final String CHICHIRIAUTHORISER_GROUP =
"Chichiriauthoriser";
public static final String CROSSROADSAUTHORISER_GROUP =
"Crossroadsauthoriser";
public static final String CUSTOMSROADAUTHORISER_GROUP =
"CustomsRoadauthoriser";
public static final String GATEWAYAUTHORISER_GROUP =
"GateWayauthoriser";
public static final String HENDERSONSTREETAUTHORISER_GROUP =
"HendeersonStreetauthoriser";
public static final String KIAAUTHORISER_GROUP = "Kiaauthoriser";
public static final String KARONGAAUTHORISER_GROUP =
"Karongaauthoriser";
public static final String KASUNGUAUTHORISER_GROUP =
"Kasunguauthoriser";
public static final String LILONGWEAUTHORISER_GROUP =
"Lilongweauthoriser";
public static final String LIWONDEAUTHORISER_GROUP =
"Liwondeauthoriser";
public static final String MANGOCHIAUTHORISER_GROUP =
"Mangochiauthoriser";
public static final String MCHINJIAUTHORISER_GROUP =
"Mchinjiauthoriser";
public static final String MPONERAAUTHORISER_GROUP =
"Mponeraauthoriser";
public static final String MULANJEAUTHORISER_GROUP =
"Mulanjeauthoriser";
public static final String MWANZAAUTHORISER_GROUP = "Mwanzaauthoriser";
public static final String MZIMBAAUTHORISER_GROUP = "Mzimbaauthoriser";
public static final String NCHALOAUTHORISER_GROUP = "Nchaloauthoriser";
public static final String NTHEUAUTHORISER_GROUP = "Ntheuauthoriser";
public static final String SALIMAAUTHORISER_GROUP = "Salimaauthoriser";
public static final String SOUTHENDAUTHORISER_GROUP =
"SouthEndauthoriser";
public static final String THYOLOAUTHORISER_GROUP = "Thyoloauthoriser";
public static final String VICTORIAAVENUEAUTHORISER_GROUP =
"VictoriaAvenueauthoriser";
public static final String SC_AUTHERIZER_GROUP = "scAuthorizer";
//        public static final String SC_AUTHERIZER_GROUP = "sc";
public static final String GENERAL_CEB_GROUP_GROUP = "generalceb";
public static final String STANDARD_USER_GROUP = "standardUser";
public static final String ServiceCentreAuthoriser_USER_GROUP =
"serviceCentreAuthoriser";
@Id
@Column(name = "username", nullable = false, length = 255)
private String username;
//        @Column(name="USER_User_id", nullable=false, length=255)
@JoinColumn(name = "groupname", nullable = false, referencedColumnName
= "groupname")
private String groupname;
//         @JoinColumn(name = "USER_User_id", referencedColumnName =
"User_id")
//         @ManyToOne
//         private User uSERUserid;
//        @JoinColumn(name = "USER_User_id", referencedColumnName =
"groupname")
//        @ManyToOne
//        private User uSERUserid;
//        @JoinColumn(name = "groupname", referencedColumnName =
"groupname")
//        @ManyToOne
//        private Usergroup groupname;
public Usergroup() {
}

public Usergroup(String username, String groupname) {
    this.username = username;
    this.groupname = groupname;
}

public String getUsername() {
    return username;
}

public void setUsername(String username) {
    this.username = username;
}

public String getGroupname() {
    return groupname;
}

public void setGroupname(String groupname) {
    this.groupname = groupname;
}

//    public User getuSERUserid() {
//        return uSERUserid;
//    }
//
//    public void setuSERUserid(User uSERUserid) {
//        this.uSERUserid = uSERUserid;
//    }
}
Thats the usergroup entity and below is the user table
package com.cims2019Entity;
import com.cims2019ConWithCortex.CmsDatabase;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.annotation.XmlTransient;
/**
*

@author Emmanuel Msafiri Phiri
*/
@Entity
//@Audited // that's the important part :)
@NamedQueries({
@NamedQuery(name = "findUserByUsername", query = "SELECT u FROM User u
WHERE u.username = :username"),
@NamedQuery(name = "findAll", query = "SELECT u FROM User u"),
@NamedQuery(name = "findUserByemail", query = "SELECT u FROM User u
WHERE u.email = :email"),
@NamedQuery(name = "findUserByServiceCentre", query = "SELECT u FROM
User u WHERE u.ServiceCentre = :serviceCentre"),
@NamedQuery(name = "findUserBygroupname", query = "SELECT u FROM User u
WHERE u.groupname = :groupname")
})
@Table(name = "user")
public class User implements Serializable {
@OneToOne(mappedBy = "email")
private Collection cortexCollection;
private static final long serialVersionUID = -5892169641074303723L;
@Id
@Column(name = "Email", nullable = true, length = 255)
private String email;
@Column(name = "UserId", nullable = true, length = 255)
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer userId;
@Column(name = "password", nullable = true, length = 64)
private String password;
@Column(name = "Username", nullable = true, length = 30)
private String username;
@Column(name = "groupname", nullable = true, length = 30)
private String groupname;
@Column(name = "ServiceCentre", nullable = false, length = 30)
private String ServiceCentre;
@Column(name = "FullName", nullable = true, length = 50)
private String fullname;
@Column(name = "AccessClassID", nullable = true, length = 30)
private String accessClassid;
@Column(name = "PhoneNumber", nullable = true, length = 30)
private String phoneNumber;
@Column(name = "DateandTimeofLastPasswordChange", nullable = true,
length = 30, updatable = false,insertable = false)
private String dateandTimeofLastPasswordChange;
@Column(name = "DTVUserLastAttemptoSystem", nullable = true, length =
30,  updatable = false,insertable = false)
private String dTVUserLastAttemptoSystem;
@Column(name = "DTVUserSusscessifulyaccessedSystem", nullable = true,
length = 30)
private String dTVUserSusscessifulyaccessedSystem;
@Column(name = "DTVUserwasLockedOutofSystem", nullable = true, length =

private String dTVUserwasLockedOutofSystem;
@Column(name = "Loggedin", nullable = true, length = 30)
private String Loggedin;
@Column(name = "AuthencticationType", nullable = true, length = 30)
private String authencticationType;
@Column(name = "Autherised", nullable = true, length = 30)
private String authorized;
@Column(name = "FirstName", nullable = true, length = 30)
private String firstname;
@Column(name = "LastName", nullable = true, length = 30)
private String lastname;
//        @Column(name="FullName", nullable=false, length=30)
//        private String fullname;
//        @Column(name="PhoneNumber", nullable=false, length=30)
//        private String phoneNumber;
//        @Column(name="DateAndTimeLastPasswordChanged", nullable=false,
length=30)
//        private String DateAndTimeLastPasswordChanged;
//        @Column (name="DateAndTimeUserLastAtemptToAccessTheSystem",
nullable=false,length=30)
//        private String DateAndTimeUserLastAtemptToAccessTheSystem;
//        @Column(name="DateAndTimeUserWasLockedOutOfTheSystem",
nullable=false, length=30)
//        private String DateAndTimeUserWasLockedOutOfTheSystem;
public User() {
}
public User(String email, String password, String username, String
groupname, String ServiceCentre, String fullname, String accessClassid,
String phoneNumber, String dateandTimeofLastPasswordChange, String
dTVUserLastAttemptoSystem, String dTVUserSusscessifulyaccessedSystem,
String dTVUserwasLockedOutofSystem, String authencticationType) {
this.email = email;
this.password = password;
this.username = username;
this.groupname = groupname;
this.ServiceCentre = ServiceCentre;
this.fullname = fullname;
this.accessClassid = accessClassid;
this.phoneNumber = phoneNumber;
this.dateandTimeofLastPasswordChange =
dateandTimeofLastPasswordChange;
this.dTVUserLastAttemptoSystem = dTVUserLastAttemptoSystem;
this.dTVUserSusscessifulyaccessedSystem =
dTVUserSusscessifulyaccessedSystem;
this.dTVUserwasLockedOutofSystem = dTVUserwasLockedOutofSystem;
this.authencticationType = authencticationType;
}
public User(HttpServletRequest request, HttpServletResponse response) {
throw new UnsupportedOperationException("Not supported yet."); //To
change body of generated methods, choose Tools | Templates.
}
public String getFullname() {
return fullname;
}
public String getLoggedin() {
return Loggedin;
}
public String getAuthorized() {
return authorized;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public void setAuthorized(String authorized) {
this.authorized = authorized;
}
public void setLoggedin(String Loggedin) {
this.Loggedin = Loggedin;
}
public void setFullname(String fullname) {
this.fullname = fullname;
}
public String getAccessClassid() {
return accessClassid;
}
public void setAccessClassid(String accessClassid) {
this.accessClassid = accessClassid;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getDateandTimeofLastPasswordChange() {
return dateandTimeofLastPasswordChange;
}
public void setDateandTimeofLastPasswordChange(String
dateandTimeofLastPasswordChange) {
this.dateandTimeofLastPasswordChange =
dateandTimeofLastPasswordChange;
}
public String getdTVUserLastAttemptoSystem() {
return dTVUserLastAttemptoSystem;
}
public void setdTVUserLastAttemptoSystem(String
dTVUserLastAttemptoSystem) {
this.dTVUserLastAttemptoSystem = dTVUserLastAttemptoSystem;
}
public String getdTVUserSusscessifulyaccessedSystem() {
return dTVUserSusscessifulyaccessedSystem;
}
public void setdTVUserSusscessifulyaccessedSystem(String
dTVUserSusscessifulyaccessedSystem) {
this.dTVUserSusscessifulyaccessedSystem =
dTVUserSusscessifulyaccessedSystem;
}
public String getdTVUserwasLockedOutofSystem() {
return dTVUserwasLockedOutofSystem;
}
public void setdTVUserwasLockedOutofSystem(String
dTVUserwasLockedOutofSystem) {
this.dTVUserwasLockedOutofSystem = dTVUserwasLockedOutofSystem;
}
public String getAuthencticationType() {
return authencticationType;
}
public void setAuthencticationType(String authencticationType) {
this.authencticationType = authencticationType;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return username;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getGroupname() {
return groupname;
}
public void setGroupname(String groupname) {
this.groupname = groupname;
}
public String getServiceCentre() {
return ServiceCentre;
}
public void setServiceCentre(String ServiceCentre) {
this.ServiceCentre = ServiceCentre;
}
public void setName(String username) {
this.username = username;
}
@XmlTransient
public Collection getCortexCollection() {
return cortexCollection;
}
public void setCortexCollection(Collection cortexCollection) {
this.cortexCollection = cortexCollection;
}
public String resetCimsUserPassword(String recipient) {
throw new UnsupportedOperationException("Not supported yet."); //To
change body of generated methods, choose Tools | Templates.
}

//    public void setGroupname(Usergroup groupname) {
//        throw new UnsupportedOperationException("Not supported yet.");
//To change body of generated methods, choose Tools | Templates.
//    }
}
Both tables have one column in common called grouname, I want if I update
user table, the Usergroup table column shoudl also get updated, help please
On Wed, Apr 29, 2020 at 3:54 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

But my project is using eclipse link how easily can I implement it please
help?
On Tue, Apr 28, 2020 at 10:41 PM Philip Riecks<EMAIL_ADDRESS>wrote:

What do you exactly mean by auditing two database tables? If you want
to audit on your JPA entities I can recommend Hibernate Envers
https://docs.jboss.org/envers/docs/.
If you are looking for a solution to make CRUD operations on a database
table using JSF, consider reading the following blog posts:

https://rieckpil.de/howto-create-nice-looking-jsf-2-3-applications-with-primefaces-7-0/
https://rieckpil.de/howto-simple-crud-table-with-jsf-2-3-and-primefaces/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-621001758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZHTOT3LMOZBTOSDPGDRO64XDANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

--
Emmanuel Msafiri Phiri
0881492239

any help philip?
On Wed, Apr 29, 2020 at 4:01 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

https://javatutorial.net/glassfish-form-based-authentication-example
Please also check via the above given link, though it might not be your
work but maybe you can help out I want to automatically update the
groupcolumn soon after I update the user table full code as below:
/*

To change this license header, choose License Headers in Project
Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
package com.cims2019Entity;

/**
*

@author Emmanuel Msafiri Phiri
*/
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
//import javax.xml.bind.annotation.XmlRootElement;

@Entity
@NamedQueries({
@NamedQuery(name = "findUsergroupByUsername", query = "SELECT u FROM
Usergroup u WHERE u.username = :username"),
//    @NamedQuery(name = "findAll", query = "SELECT u FROM Usergroup u"),
@NamedQuery(name = "findUsergroupBygroupname", query = "SELECT u FROM
Usergroup u WHERE u.groupname = :groupname")
})
@Table(name = "usergroup")
//@XmlRootElement
public class Usergroup implements Serializable {
private static final long serialVersionUID =<PHONE_NUMBER>986169065L;
public static final String ADMIN_GROUP = "admin";
public static final String STANDARDUSER_GROUP = "standardUser";
public static final String ZOMBA_GROUP = "zomba";
public static final String CEB_GROUP = "ceb";
public static final String BALAKA_GROUP = "Balaka";
public static final String CAPITALCITY_GROUP = "CapitalCity";
public static final String CHICHIRI_GROUP = "Chichiri";
public static final String CROSSROADS_GROUP = "Crossroads";
public static final String CUSTOMSROAD_GROUP = "CustomsRoad";
public static final String GATEWAY_GROUP = "GateWay";
public static final String HENDERSONSTREET_GROUP = "HendeersonStreet";
public static final String KIA_GROUP = "Kia";
public static final String KARONGA_GROUP = "Karonga";
public static final String KASUNGU_GROUP = "Kasungu";
public static final String LILONGWE_GROUP = "Lilongwe";
public static final String LIWONDE_GROUP = "Liwonde";
public static final String MANGOCHI_GROUP = "Mangochi";
public static final String MCHINJI_GROUP = "Mchinji";
public static final String MPONERA_GROUP = "Mponera";
public static final String MULANJE_GROUP = "Mulanje";
public static final String MWANZA_GROUP = "Mwanza";
public static final String MZIMBA_GROUP = "Mzimba";
public static final String NCHALO_GROUP = "Nchalo";
public static final String NTHEU_GROUP = "Ntheu";
public static final String SALIMA_GROUP = "Salima";
public static final String SOUTHEND_GROUP = "SouthEnd";
public static final String THYOLO_GROUP = "Thyolo";
public static final String VICTORIAAVENUE_GROUP = "VictoriaAvenue";
public static final String BALAKAAUTHORISER_GROUP = "Balakaauthoriser";
public static final String ZOMBAAUTHORISER_GROUP = "zomba";
public static final String CAPITALCITYAUTHORISER_GROUP =

"CapitalCityauthoriser";
public static final String CHICHIRIAUTHORISER_GROUP =
"Chichiriauthoriser";
public static final String CROSSROADSAUTHORISER_GROUP =
"Crossroadsauthoriser";
public static final String CUSTOMSROADAUTHORISER_GROUP =
"CustomsRoadauthoriser";
public static final String GATEWAYAUTHORISER_GROUP =
"GateWayauthoriser";
public static final String HENDERSONSTREETAUTHORISER_GROUP =
"HendeersonStreetauthoriser";
public static final String KIAAUTHORISER_GROUP = "Kiaauthoriser";
public static final String KARONGAAUTHORISER_GROUP =
"Karongaauthoriser";
public static final String KASUNGUAUTHORISER_GROUP =
"Kasunguauthoriser";
public static final String LILONGWEAUTHORISER_GROUP =
"Lilongweauthoriser";
public static final String LIWONDEAUTHORISER_GROUP =
"Liwondeauthoriser";
public static final String MANGOCHIAUTHORISER_GROUP =
"Mangochiauthoriser";
public static final String MCHINJIAUTHORISER_GROUP =
"Mchinjiauthoriser";
public static final String MPONERAAUTHORISER_GROUP =
"Mponeraauthoriser";
public static final String MULANJEAUTHORISER_GROUP =
"Mulanjeauthoriser";
public static final String MWANZAAUTHORISER_GROUP = "Mwanzaauthoriser";
public static final String MZIMBAAUTHORISER_GROUP = "Mzimbaauthoriser";
public static final String NCHALOAUTHORISER_GROUP = "Nchaloauthoriser";
public static final String NTHEUAUTHORISER_GROUP = "Ntheuauthoriser";
public static final String SALIMAAUTHORISER_GROUP = "Salimaauthoriser";
public static final String SOUTHENDAUTHORISER_GROUP =
"SouthEndauthoriser";
public static final String THYOLOAUTHORISER_GROUP = "Thyoloauthoriser";
public static final String VICTORIAAVENUEAUTHORISER_GROUP =
"VictoriaAvenueauthoriser";
public static final String SC_AUTHERIZER_GROUP = "scAuthorizer";
//        public static final String SC_AUTHERIZER_GROUP = "sc";
public static final String GENERAL_CEB_GROUP_GROUP = "generalceb";
public static final String STANDARD_USER_GROUP = "standardUser";
public static final String ServiceCentreAuthoriser_USER_GROUP =
"serviceCentreAuthoriser";
@Id
@Column(name = "username", nullable = false, length = 255)
private String username;
//        @Column(name="USER_User_id", nullable=false, length=255)
@JoinColumn(name = "groupname", nullable = false, referencedColumnName
= "groupname")
private String groupname;
//         @JoinColumn(name = "USER_User_id", referencedColumnName =
"User_id")
//         @ManyToOne
//         private User uSERUserid;
//        @JoinColumn(name = "USER_User_id", referencedColumnName =
"groupname")
//        @ManyToOne
//        private User uSERUserid;
//        @JoinColumn(name = "groupname", referencedColumnName =
"groupname")
//        @ManyToOne
//        private Usergroup groupname;
public Usergroup() {
}

public Usergroup(String username, String groupname) {
    this.username = username;
    this.groupname = groupname;
}

public String getUsername() {
    return username;
}

public void setUsername(String username) {
    this.username = username;
}

public String getGroupname() {
    return groupname;
}

public void setGroupname(String groupname) {
    this.groupname = groupname;
}

//    public User getuSERUserid() {
//        return uSERUserid;
//    }
//
//    public void setuSERUserid(User uSERUserid) {
//        this.uSERUserid = uSERUserid;
//    }
}
Thats the usergroup entity and below is the user table
package com.cims2019Entity;
import com.cims2019ConWithCortex.CmsDatabase;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.annotation.XmlTransient;
/**
*

@author Emmanuel Msafiri Phiri
*/
@Entity
//@Audited // that's the important part :)
@NamedQueries({
@NamedQuery(name = "findUserByUsername", query = "SELECT u FROM User u
WHERE u.username = :username"),
@NamedQuery(name = "findAll", query = "SELECT u FROM User u"),
@NamedQuery(name = "findUserByemail", query = "SELECT u FROM User u
WHERE u.email = :email"),
@NamedQuery(name = "findUserByServiceCentre", query = "SELECT u FROM
User u WHERE u.ServiceCentre = :serviceCentre"),
@NamedQuery(name = "findUserBygroupname", query = "SELECT u FROM User
u WHERE u.groupname = :groupname")
})
@Table(name = "user")
public class User implements Serializable {
@OneToOne(mappedBy = "email")
private Collection cortexCollection;
private static final long serialVersionUID = -5892169641074303723L;
@Id
@Column(name = "Email", nullable = true, length = 255)
private String email;
@Column(name = "UserId", nullable = true, length = 255)
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer userId;
@Column(name = "password", nullable = true, length = 64)
private String password;
@Column(name = "Username", nullable = true, length = 30)
private String username;
@Column(name = "groupname", nullable = true, length = 30)
private String groupname;
@Column(name = "ServiceCentre", nullable = false, length = 30)
private String ServiceCentre;
@Column(name = "FullName", nullable = true, length = 50)
private String fullname;
@Column(name = "AccessClassID", nullable = true, length = 30)
private String accessClassid;
@Column(name = "PhoneNumber", nullable = true, length = 30)
private String phoneNumber;
@Column(name = "DateandTimeofLastPasswordChange", nullable = true,
length = 30, updatable = false,insertable = false)
private String dateandTimeofLastPasswordChange;
@Column(name = "DTVUserLastAttemptoSystem", nullable = true, length =
30,  updatable = false,insertable = false)
private String dTVUserLastAttemptoSystem;
@Column(name = "DTVUserSusscessifulyaccessedSystem", nullable = true,
length = 30)
private String dTVUserSusscessifulyaccessedSystem;
@Column(name = "DTVUserwasLockedOutofSystem", nullable = true, length
= 30)
private String dTVUserwasLockedOutofSystem;
@Column(name = "Loggedin", nullable = true, length = 30)
private String Loggedin;
@Column(name = "AuthencticationType", nullable = true, length = 30)
private String authencticationType;
@Column(name = "Autherised", nullable = true, length = 30)
private String authorized;
@Column(name = "FirstName", nullable = true, length = 30)
private String firstname;
@Column(name = "LastName", nullable = true, length = 30)
private String lastname;
//        @Column(name="FullName", nullable=false, length=30)
//        private String fullname;
//        @Column(name="PhoneNumber", nullable=false, length=30)
//        private String phoneNumber;
//        @Column(name="DateAndTimeLastPasswordChanged", nullable=false,
length=30)
//        private String DateAndTimeLastPasswordChanged;
//        @Column (name="DateAndTimeUserLastAtemptToAccessTheSystem",
nullable=false,length=30)
//        private String DateAndTimeUserLastAtemptToAccessTheSystem;
//        @Column(name="DateAndTimeUserWasLockedOutOfTheSystem",
nullable=false, length=30)
//        private String DateAndTimeUserWasLockedOutOfTheSystem;
public User() {
}
public User(String email, String password, String username, String
groupname, String ServiceCentre, String fullname, String accessClassid,
String phoneNumber, String dateandTimeofLastPasswordChange, String
dTVUserLastAttemptoSystem, String dTVUserSusscessifulyaccessedSystem,
String dTVUserwasLockedOutofSystem, String authencticationType) {
this.email = email;
this.password = password;
this.username = username;
this.groupname = groupname;
this.ServiceCentre = ServiceCentre;
this.fullname = fullname;
this.accessClassid = accessClassid;
this.phoneNumber = phoneNumber;
this.dateandTimeofLastPasswordChange =
dateandTimeofLastPasswordChange;
this.dTVUserLastAttemptoSystem = dTVUserLastAttemptoSystem;
this.dTVUserSusscessifulyaccessedSystem =
dTVUserSusscessifulyaccessedSystem;
this.dTVUserwasLockedOutofSystem = dTVUserwasLockedOutofSystem;
this.authencticationType = authencticationType;
}
public User(HttpServletRequest request, HttpServletResponse response) {
throw new UnsupportedOperationException("Not supported yet.");
//To change body of generated methods, choose Tools | Templates.
}
public String getFullname() {
return fullname;
}
public String getLoggedin() {
return Loggedin;
}
public String getAuthorized() {
return authorized;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public void setAuthorized(String authorized) {
this.authorized = authorized;
}
public void setLoggedin(String Loggedin) {
this.Loggedin = Loggedin;
}
public void setFullname(String fullname) {
this.fullname = fullname;
}
public String getAccessClassid() {
return accessClassid;
}
public void setAccessClassid(String accessClassid) {
this.accessClassid = accessClassid;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getDateandTimeofLastPasswordChange() {
return dateandTimeofLastPasswordChange;
}
public void setDateandTimeofLastPasswordChange(String
dateandTimeofLastPasswordChange) {
this.dateandTimeofLastPasswordChange =
dateandTimeofLastPasswordChange;
}
public String getdTVUserLastAttemptoSystem() {
return dTVUserLastAttemptoSystem;
}
public void setdTVUserLastAttemptoSystem(String
dTVUserLastAttemptoSystem) {
this.dTVUserLastAttemptoSystem = dTVUserLastAttemptoSystem;
}
public String getdTVUserSusscessifulyaccessedSystem() {
return dTVUserSusscessifulyaccessedSystem;
}
public void setdTVUserSusscessifulyaccessedSystem(String
dTVUserSusscessifulyaccessedSystem) {
this.dTVUserSusscessifulyaccessedSystem =
dTVUserSusscessifulyaccessedSystem;
}
public String getdTVUserwasLockedOutofSystem() {
return dTVUserwasLockedOutofSystem;
}
public void setdTVUserwasLockedOutofSystem(String
dTVUserwasLockedOutofSystem) {
this.dTVUserwasLockedOutofSystem = dTVUserwasLockedOutofSystem;
}
public String getAuthencticationType() {
return authencticationType;
}
public void setAuthencticationType(String authencticationType) {
this.authencticationType = authencticationType;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return username;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getGroupname() {
return groupname;
}
public void setGroupname(String groupname) {
this.groupname = groupname;
}
public String getServiceCentre() {
return ServiceCentre;
}
public void setServiceCentre(String ServiceCentre) {
this.ServiceCentre = ServiceCentre;
}
public void setName(String username) {
this.username = username;
}
@XmlTransient
public Collection getCortexCollection() {
return cortexCollection;
}
public void setCortexCollection(Collection cortexCollection) {
this.cortexCollection = cortexCollection;
}
public String resetCimsUserPassword(String recipient) {
throw new UnsupportedOperationException("Not supported yet.");
//To change body of generated methods, choose Tools | Templates.
}

//    public void setGroupname(Usergroup groupname) {
//        throw new UnsupportedOperationException("Not supported yet.");
//To change body of generated methods, choose Tools | Templates.
//    }
}
Both tables have one column in common called grouname, I want if I update
user table, the Usergroup table column shoudl also get updated, help please
On Wed, Apr 29, 2020 at 3:54 AM Msafiri phiri<EMAIL_ADDRESS>wrote:

But my project is using eclipse link how easily can I implement it please
help?
On Tue, Apr 28, 2020 at 10:41 PM Philip Riecks<EMAIL_ADDRESS>wrote:

What do you exactly mean by auditing two database tables? If you want
to audit on your JPA entities I can recommend Hibernate Envers
https://docs.jboss.org/envers/docs/.
If you are looking for a solution to make CRUD operations on a database
table using JSF, consider reading the following blog posts:

https://rieckpil.de/howto-create-nice-looking-jsf-2-3-applications-with-primefaces-7-0/
https://rieckpil.de/howto-simple-crud-table-with-jsf-2-3-and-primefaces/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-621001758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZHTOT3LMOZBTOSDPGDRO64XDANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

--
Emmanuel Msafiri Phiri
0881492239

--
Emmanuel Msafiri Phiri
0881492239

Hey @msafiri1, I'm sorry I can't help you on this. Consider asking the question on StackOverflow

ok noted Philip thanks.
On Wed, Apr 29, 2020 at 5:13 AM Philip Riecks<EMAIL_ADDRESS>wrote:

Hey @msafiri1 https://github.com/msafiri1, I'm sorry I can't help you
on this. Consider asking the question on StackOverflow
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-621163456,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZH7WWJU5CO6TJACH7DRPAKYLANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

Philip do you have any recommended site for java ee videos?
On Wed, Apr 29, 2020 at 2:21 PM Msafiri phiri<EMAIL_ADDRESS>wrote:

ok noted Philip thanks.
On Wed, Apr 29, 2020 at 5:13 AM Philip Riecks<EMAIL_ADDRESS>wrote:

Hey @msafiri1 https://github.com/msafiri1, I'm sorry I can't help you
on this. Consider asking the question on StackOverflow
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-621163456,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZH7WWJU5CO6TJACH7DRPAKYLANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

--
Emmanuel Msafiri Phiri
0881492239

Hey @msafiri1,
yes, I collected a list of good Java EE resources (videos, websites, books) here: https://rieckpil.de/essential-java-jakarta-ee-developer-resources/

Philip I have an issue with my system, when I login and presh the refresh
button, it takes me back to the login page how can I resolve this issue? am
using jsf please help ASAP
On Sat, May 9, 2020 at 3:19 PM Philip Riecks<EMAIL_ADDRESS>wrote:

Hey @msafiri1 https://github.com/msafiri1,
yes, I collected a list of good Java EE resources (videos, websites,
books) here:
https://rieckpil.de/essential-java-jakarta-ee-developer-resources/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rieckpil/blog-tutorials/issues/5#issuecomment-626175187,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZGFZGICUAQBRYLU5SUFIDRQVJ6BANCNFSM4JMUDXKQ
.

--
Emmanuel Msafiri Phiri
0881492239

Hey @msafiri1,
please understand it is hard for me to help you with the amount of information you provide me with your problem. If you provide me the source code of your system (e.g. upload to GitHub) with all required information (OS, Java version, application server, etc.) and describe the problem in a clear & concise way, I can have a look at it.


test(package-lock.json): remove package-lock.json

remove package-lock.json file causing test failure
[#145389357]

Coverage remained the same at 89.366% when pulling 3f149680f8f48a681d70569562b4991f1333617f on debugging-test-failure into 8d5b795bc57cb28b2b0c797c8bb916ab090428fd on develop.

Coverage remained the same at 89.366% when pulling 217cf0cf0a1d3dfae329dce0737a9e9e07461cd8 on debugging-test-failure into 8d5b795bc57cb28b2b0c797c8bb916ab090428fd on develop.

Coverage remained the same at 89.366% when pulling e812a58f38bca9e77949fcabc67e46210abd7a8c on debugging-test-failure into 8d5b795bc57cb28b2b0c797c8bb916ab090428fd on develop.

Coverage remained the same at 89.366% when pulling cfd81305f5c8008ed3670dc08b0376dadd5bd7b6 on debugging-test-failure into 8d5b795bc57cb28b2b0c797c8bb916ab090428fd on develop.


Possible bugs in pg_explainer.py

Thank you again for your great work!
However, I encountered some confusing coding snippets in your implementation in the script, GraphXAI/graphxai/explainers/pg_explainer.py (Lines 119-123):
        if self.explain_graph:
            h = torch.cat([h1, h2], dim=1)
        else:
            h3 = emb.repeat(h1.shape[0], 1)
            h = torch.cat([h1, h2], dim=1)

I believe that "self.explain_graph = True" corresponds to graph-level explanation, while "self.explain_graph = False" corresponds to node-level explanation. However, in your implementation (I know that you adapted this from the DIG library), the h3 = emb.repeat(h1.shape[0], 1) is defined but never used. So how to distinguish graph-level explanation and node-level explanation?

Hello, thanks for bringing this to our attention!
As you have pointed out, h3 is not used, and those lines of code are very redundant. The difference with the option self.explain_graph is actually handled upstream of the __emb_to_edge_mask function in which you are referring to these lines of code. If you look here (where self.explain_graph==True) and then here (where self.explain_graph==False), you see that the edge index fed to the function is different, i.e., it’s the full edge index in the former line and the subsetted edge index w.r.t. the given node in the latter line. This is where the graph vs. node differentiation is made in our implementation. However, the code you've pointed out is redundant; we apologize for this confusion, and we will remove this in a future push to the repository.
Please let us know if you have any other issues with the PGExplainer functionality or anything else in the library. Thanks again!

Owen and GraphXAI team


add missing comma to settings

Sublime gives error when you directly copy settings from here to sublime. This fixes the issue.

@mehmetkz61 Thank you for this PR!!
@shout-star Could you merge it.

@mehmetkz61 Thanks!!


Add generic typing to CheckboxListTile

Use case
The radio list tile is defined like
class RadioListTile<T> extends StatelessWidget
but checkbox counter part does not have a generic typing
class CheckboxListTile extends StatelessWidget {
Proposal
Add generic typing to the CheckboxListTile

Hi @vasilich6107
Those two widgets behave differently so I think the can't be compared.
Can you please share your use case? the you shared is just a comparison not a valid expected use case.
Thank you

Hi @vasilich6107
Those two widgets behave differently so I think the can't be compared.
Can you please share your use case? the you shared is just a comparison not a valid expected use case.
Thank you

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


식품 찜 기능을 구현한다

Hey team! Please add your planning poker estimate with Zenhub @snowcrab382 @JuHyeokParkk @Jureamer


Preventing Interaction of 3d Objects Behind a 2d Unity Canvas

Describe the bug
On our mobile app utilizing MRTK, we have a 2d unity canvas that overlays half the screen. When dragging or clicking on the 2d panel, 3d objects behind it are affected. Have tried many potential fixes including changing the Pointer Raycast Layer Masks options in the Input -> Pointers section of the MRTK configurable options, but having no luck.
To reproduce
Steps to reproduce the behavior:

Load the HandInteractionExamples MRTK demo scene.
Create a 2d Unity canvas game object.
Add an image child inside the Unity canvas.
Drag around and click on the image and notice how interactable 3d objects behind the canvas are moved/affected.

Expected behavior
Interactions on the 2d Unity canvas should prevent pointers from interacting with interactable objects behind the canvas.
Screenshots
https://user-images.githubusercontent.com/46169876/124505963-e22f3480-dd87-11eb-9fd9-a55d495443da.mov
Your setup (please complete the following information)

Unity version 2019.4.8
MRTK Version 2.4

Target platform (please complete the following information)

Mobile - IOS/Android

Hello @seancheno, thank you for your Mobile Platform bug submission. I will investigate this issue and then assign it to the appropriate person. I will update this issue when I finish investigating.

@elbuhofantasma any update on this?

Quick update @elbuhofantasma I posted a thread on the unity forum. Someone replied saying Is your canvas in screen space or world space? XR doesn't support screen space UIs, only world space.
We are using screen space for our canvas and cannot change it, thus are hoping there is a way to have this particular issue solved while still using a screen space unity canvas.

Just wanted to bump this thread and see if a potential fix of workaround to this issue has been found. Thank you.

Hello @seancheno I apologize for not giving any updates for this long. Some other duties took precedence until now.
I have not found a workaround just yet, as my investigation paused on this issue paused for a little bit. However starting tomorrow I am putting all of my focus on this repo's issues. This issue is first on my list tomorrow morning.
One suggestion I have to try until I conclude the investigation is to use try the LegacyXR pipeline. This would be a temporary fix as we are recommending Unity 2020 and OpenXR, and LegacyXR is in the process of being deprecated in the MRTK.

Thank you very much for the reply and information. I am eager to see what you uncover after digging into this issue. Your time is greatly appreciated. I will look into the workaround, but am suspecting that with our current setup, switching back to legacy might cause some issues. Thus, really hoping for the best as you dig into this issue.  Will stay tuned.

Heads up that this issue should be fixed going into MRTK v3

Closing for now, since raycasts blocking selection is only really feasible when the UI is also in world space. Other confusion points regarding this and the Pointing Raycast Layermasks should be fixed with #10508


Make command error

when i run install bash file ( install.sh ) he show me this error "make: *** No targets specified and no makefile found.  Stop."
can any one help me?
and thanks

You need to install cmake - this can be done on debian-based machines with the following command:
sudo apt install cmake


Need to restrict user to take the screen shot , can i use this in my whole app , and can i implement this. Can you please help me in this.

Try this - this will restrict the entire window.
func makeSecure(window: UIWindow) {
        let field = UITextField()

        let view = UIView(frame: CGRect(x: 0, y: 0, width: field.frame.self.width, height: field.frame.self.height))

        let image = UIImageView(image: UIImage(named: "whiteImage"))
        image.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)

        field.isSecureTextEntry = true

        window.addSubview(field)
        view.addSubview(image)

        window.layer.superlayer?.addSublayer(field.layer)
        field.layer.sublayers?.last!.addSublayer(window.layer)

        field.leftView = view
        field.leftViewMode = .always
}


Need to correct the OS Listed in Deployed Version

I found out that in the deployed version of our website, in the FAQ section, the operating systems for which SDT have data files, are not correct and just showing a few of them as can be seen in the screenshot that I've attached.

But, when I checked the code, all the OS are updated.

We need to solve this issue. @pleia2 and @arshPratap any thoughts?

I have manually updated the version in production, but this has nothing to do with the project itself and is only a production problem.
Can you open a new Issue in https://github.com/openmainframeproject/software-discovery-tool-deploy to note that it doesn't appear that the core code is being updated reliably? I know this to be true, but we should have an open issue to start addressing this problem.

Thanks @pleia2 for reviewing this issue. I've raised an issue accordingly as asked please take a look here https://github.com/openmainframeproject/software-discovery-tool-deploy/issues/10

@Princee215  Thanks for this !


Develop a downloader app for HFP dumps

We need a convenient way to extract subsets of HFP history data from large dumps in Azure Storage for this tool. Building a direct pipe from Azure Storage (or from Transitlog db, for example) to sujuiko db is not reasonable, because we have to do a lot of pre-processing, filtering and validation to the data before importing it to the db. So we want to store intermediate data locally (eventually, on server) in smaller dumps for easy inspection and transformation.

[x] Plan a utility tool for inspecting and downloading available HFP datasets from Azure Storage
[x] Working version of dataset inspection / listing
[ ] Working version of selected dataset downloading

[ ] Only select required columns
[ ] Apply type casts to columns when needed
[ ] Distribute results into different csv files by attribute(s)
[ ] Filter results by attribute(s)

This app is being developed in a separate repository.


[MM-13499] Migrate components/admin_console/server_logs to TypeScript

Summary

This PR is a part of the mattermost-webapp migration to Typescript work.
Ticket Link

Fixes https://github.com/mattermost/mattermost-server/issues/13499
Related Pull Requests

Has server changes N/A
Has redux changes N/A
Has mobile changes N/A

Screenshots

There should be no functionality changes as the result of the PR.

/update-branch

/update-branch

Thanks @clarmso for the contribution. Since all reviews are done and a review complete label has been put, I will merge this PR.

@devinbinnie When you have time, could you update https://mattermost.atlassian.net/plugins/servlet/mobile?originPath=%2Fbrowse%2FMM-20573#issue/MM-20573 . Thanks!


Support IDocumentProvider methods named GenerateAsync

Is this a Bug or Feature request?
Enhancement that's part of #7947. Adds support for a different IDocumentProvider.
Could also be considered a bug since the features/client.code.generation branch is inconsistent with what we're doing in the RSuter/NSwag#1658 PR.
Steps to reproduce (preferably a link to a GitHub repo with a repro project)

Create new console project
Add reference to manually-built NSwag.MSBuild.CodeGeneration package (relying on the Microsoft.Extensions.ApiDescription.Design package -- version 2.2.0-a-preview3-client-code-generation-19114 in my local NSwag build)
Add the following to the .csproj file, referring to a server project that uses manually built NSwag.AspNetCore:

<ServiceProjectReference Include="../TrialNSwag/TrialNSwag.csproj"
    CodeGenerator="NSwagCSharp"
    DocumentPath="TrialNSwag1.json"
    GenerateNSwagCSharpOptions="/GenerateExceptionClasses:false" />

dotnet build

Expected
Successful build
Actual
GenerateDefaultDocument:
    dotnet C:\Users\dougbu\.nuget\packages\microsoft.extensions.apidescription.design\2.2.0-preview3-t0071b0e8a\build\/../tools/dotnet-getdocument.dll --project C:\dd\Projects\CodeGeneration.II\TrialNSwag\TrialNSwag.csproj --framework netcoreapp2.1 --output C:\dd\Projects\CodeGeneration.II\ClientConsole\TrialNSwag1.json --configuration Debug
  Using document name 'v1'.
  Using method 'Generate'.
  Using service 'Microsoft.Extensions.ApiDescription.IDocumentProvider'.
  System.NullReferenceException: Object reference not set to an instance of an object.

Description of the problem
The dotnet-getdocument tool included in the Microsoft.Extensions.ApiDescription.Design package (actually its inside man) looks only for methods named Generate in the IDocumentProvider service. This doesn't match what @rynowak did in the RSuter/NSwag#1658 PR. (@RSuter's prefers the async pattern here.)
Fix is to try GenerateAsync first and Generate second. Support Task and Task<bool> if GenerateAsync is found; void and bool otherwise.
Version of Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.App or Microsoft.AspNetCore.All
See the features/client.code.generation branch. That work is intended for the 2.2 Preview 3 milestone.

37e562902f


fix icons

Supercedes https://github.com/utopia-rise/fmod-gdextension/pull/175
(does not remove Godot cache)

Why there is a change of godot-cpp submodule ?

@piiertho great catch! It seems that I still had locally the godot-4.1.1-stable tag checked out and since then this repo upgraded to godot-4.1.2-stable tag already. I now fixed that!


Represent (coordinate) variables "symbolically"

I'm working with a GRIB2 file, and am interested in minimizing the size of the references file. Currently, the largest values in the references come from the base64-encoded coordinates that were inlined in the references:
  'latitude/0': 'base64:AAAAAACAVkBmZmZ...',

This specific variable (and longitude, step,  and perhaps time) can be represented "symbolically" (maybe not the right name), with something like a range(90, -90.1, -0.4).
My questions:

Does something like this make sense to try?
Does this instead belong in Zarr instead? It seems more generally useful to compress the size of the data, beyond just what Kerchunk inlines (though I'd still want it in Kerchunk, so that inlined references can benefit from it).

Somewhat annoyingly, there are floating point inaccuracies between what I get from np.arange and what's coming out of cfgrib. But hopefully those can be solved.

This is certainly something that kerchunk could do, with effectively our own codec to expand whatever representation into an array at read time. That would be simple for linear coordinates, but GRIB allows for many complex coordinate definitions. I suppose it's possible to extract the parameters of whatever the coordinate system is, but we probably don't want to implement the coordinate generation algorithms, but  call the appropriate functions in eccodes itself, if we can.
This all connects to the possibility of analytical coordinates in xarray. Perhaps we shouldn't be making arrays even at read time but making xarray indexes.

There's a CF convention for that!
We could totally interpret those as a "functional xarray index" too.

There's a CF convention for that

(plus also the FITS WCS ways to define the same; you won't get these from geo-datasets, but I think they may be more general)

People on this thread might be interested in the intake-stac sprint https://github.com/intake/intake-stac/issues/159

Thanks @dcherian. IIUC, the coordinate subsampling you linked to is essentially the same as range(0, 10, 1)? We just have two "tie points" (the first and last point) and then linearly interpolate between them?
Do you know if this decoding is implemented in cf-xarray or xarray.conventions.decode_cf_variable? I didn't see it at https://cf-xarray.readthedocs.io/en/latest/coding.html or in a glanace at decode_cf_variable.

It has not been implemented.

We just have two "tie points" (the first and last point) and then linearly interpolate between them?

Yes I think so, that's why it clicked in my head. I don't know what you would do for all the other GRIB coordinate systems

We just have two "tie points"

This is also essentially the case in standard TIFF, but of course more complex geometries are possible in practice, and GRIB has many models.


clipBehavior is not sent to pushClipRect/ClipRectLayer in some places

Will investigate, add the missing clipBehavior, and related tests.

CC @Hixie @GaryQian

After a preliminary investigation, I think that it would be a difficult choice to default all ClipRect behavior to Clip.none. ClipRect is used very often and it generates the cull rect that accelerates the engine (e.g., whether paint bounds is empty...)

I thought we'd removed most of the ClipRects? We really shouldn't need to clip most things.

We had removed most of ClipPaths and ClipRRects, but there are many ClipRects left. ClipRect is such a special clip that its performance benefit probably outweigh its performance cost.

According to our discussion, we'll first try:

Set default clipBehavior to Clip.none in RenderFlex, RenderFittedBox, RenderUnconstrainedBox, RenderStack, and RenderWrap
Set default clipBehavior to Clip.hardEdge in RenderEditable, RenderListWheenViewport, RenderSingleChildViewport, and RenderViewportBase (those are all scrolling viewports)

We'll figure out what to do with RenderAnimatedSize, RenderAndroidView, and RenderFlow
later.
For all the above RenderObjects, we'll plugin the clipBehavior.


Update app.py

GitHub pull requests to this repo are public. By committing your secret to your code you just exposed it to the public. We've reset your client secret for you and suggest being more careful in the future.


nixos/xen: declarative libxenlight, part I

Splits up the Xen module into smaller files.
Makes the oxenstored configuration compliant with RFC 0042.
Creates the xl format generator.
Makes /etc/xl.conf configurable.

No guest stuff yet. That's part II.
I would like to apologise in advance to whoever reviews formats.nix.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Commits have been fixed. It should now be much easier to review commit by commit.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/2144


Merge Download & Play Button

Currently, the download and play button is a separated. To me this is a bit redundant.
We can simply merge the button and make it "Download" if the user haven't downloaded it, and "Play" after the user have downloaded it.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41425306-merge-download-play-button?utm_campaign=plugin&utm_content=tracker%2F715506&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F715506&utm_medium=issues&utm_source=github).

Closed via #418!


fix(a11y): accordion needs tab index -1 when aria hidden

As per this axe rule content inside of aria-hidden should not be focusable.
https://dequeuniversity.com/rules/axe/4.2/aria-hidden-focus?application=axeAPI

:tada: This PR is included in version 4.43.7 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: